TL; DR "shield walls are viable if (and only if) you have enough motivated people with enough time"
You want your shield wall to be sufficiently long that it's hard to unravel it form both ends at the same time.
You want to make sure your shields are overlapping and all your shield-bearers use the same shield arm. The overlap should, ideally, be "elbow-side of shield on top of the other shield in that direction", that forms a somewhat stronger wall.
You want your shield wall to be well-trained in "being a shield wall" (a rough estimate is somewhere between 30h to 100h of formation training, before the shield wall is able to move coherently), especially if you want to incorporate movement of the shield wall. For a completely static shield wall, this is somewhat simpler (you only need to ensure people know how to stand and how to protect the people either side of them, as well as themselves, with their weapon).
You want long weapons behind your shield wall, that can attack your opponents over the shield wall. Spears, axes, various polearms, maybe two-handed swords, are useful weapons here.
You want a small amount of mobile units (either single fighters or small groups) that can swarm around the edges and, possibly, across the field at large.
If you have access to projectile weapons, you also want those, protected behind your shield wall, sufficiently trained so they attack over the shield wall.
You want at least one person (preferably more) with a strong voice, who can command the shield wall. It is probably better if this person is behind the shield wall, since that lessens the risk of losing them. They also need to have some experience in decent tactical decisions.
If you have enough people, you can form multiple shield walls that operate in a way so as to reinforce another (V formations, various overlaps, ...)
It is not viable unless you have 30+ people willing to spend weeks (or months) of training to be able to work together.