stability near the center of 4 positive point charges forming a square Say the 4 point charges are fixed at (1,0), (-1,0), (0,1), (0,-1) in the xy plane. Put a positive test charge. Right at the center of the square, there's no net force on the test charge. Perturbed along x or y, there'll be a restoring force pushing the test charge back to the center. If one plots the electric potential contour, the region near the center seems to be a local minimum. But according to Earnshaw's theorem, there can't be any stable electrostatic equilibrium. Where's the paradox? Assume the test charge isn't allowed to move in the z direction and consider the stability only in the xy plane!
 A: The problem is that you "Assume the test charge isn't allowed to move in the z direction and consider the stability only in the xy plane!". Earnshaw's theorem (as stated on Wikipedia) states that equilibrium cannot be maintained solely by the electrostatic interaction of the charges. If the test charge cannot move in the $z$ direction, it means it is constrained to the $x-y$ plane by some other force.
For a single point charge, one can see Earnshaw's theorem as a consequence Gauss's law. The flux of an electric field through an arbitrarily small surface around the charge must be zero, so the field cannot point inside the surface everywhere. Here the field points towards the charge in the $x-y$ plane, but points outside in the $z$ direction (and many other directions outside the plane). You are bypassing this by freezing the unstable ($z$) direction, therefore the theorem does not hold.
Note that the charges "know" they actually live in a three-dimensional world, because they interact via a three-dimensional electrostatic potential. In a truly two-dimensional world, the charges would interact through a logarithmic potential.
With the same configuration of charges in the vertices of a square, but such a logarithmic potential, the centre of the square is indeed an unstable equilibrium point.
