The local density of states (LDOS) of two-dimensional square lattice photonic crystal (PhC) defect cavity is studied. The results show that the LDOS in the centre is greatly reduced, while the LDOS at the point off the centre (for example, at the point (0.3a, 0.4a), where a is the lattice constant) is extremely enhanced. Further, the disordered radii are introduced to imitate the real devices fabricated in our experiment, and then we study the LDOS of PhC cavity with configurations of different disordered radii. The results show that in the disordered cavity, the LDOS in the centre is still greatly reduced, while the LDOS at the point (0.3a, 0.4a) is still extremely enhanced. It shows that the LDOS analysis is useful. When a laser is designed on the basis of the square lattice PhC rod cavity, in order to enhance the spontaneous emission, the active materials should not be inserted in the centre of the cavity, but located at positions off the centre. So LDOS method gives a guide to design the positions of the active materials (quantum dots) in the lasers.