Domain walls separating regions of ferroelectric material with polarization oriented in di erent directions are crucial for applications of ferroelectrics. Rational design of ferroelectric materials requires the development of a theory describing how compositional and environmental changes a ect domain walls. To model domain wall systems, a discrete microscopic Landau– Ginzburg–Devonshire (dmLGD) approach with A- and B-site cation displace- ments serving as order parameters is developed. Application of dmLGD to the classic BaTiO3, KNbO3, and PbTiO3 ferroelectrics shows that A–B cation repulsion is the key interaction that couples the polarization in neighboring unit cells of the material. dmLGD decomposition of the total energy of the system into the contributions of the individual cations and their interactions enables the prediction of di erent properties for a wide range of ferroelectric perovskites based on the results obtained for BaTiO3, KNbO3, and PbTiO3 only. It is found that the information necessary to estimate the structureand energy of domain-wall “defects” can be extracted from single-domain 5-atom rst-principles calculations, and that “defect-like” domain walls o er a simple model system that sheds light on the relative stabilities of the ferro- electric, antiferroelectric, and paraelectric bulk phases. The dmLGD approach provides a general theoretical framework for understanding and designing ferroelectric perovskite oxides.