31P nuclear magnetic resonance (NMR) chemical shifts were shown to be very sensitive to the basis set used at the geometry optimization stage. Commonly used energy-optimized basis sets for a phosphorus atom containing only one polarization d-function were shown to be unable to provide correct equilibrium geometries for the calculations of phosphorus chemical shifts. The use of basis sets with at least two polarization d-functions on a phosphorus atom is strongly recommended. In this paper, an idea of creating the basis sets purposed for the geometry optimization that provide the least possible error coming from the geometry factor of accuracy in the resultant NMR shielding constants is proposed. The property-energy consisted algorithm with the target function in the form of the molecular energy gradient relative to P-P bond lengths was applied to create new geometry-oriented pecG-n (n = 1, 2) basis sets for a phosphorus atom. New basis sets have demonstrated by far superior performance as compared to the other commonly used energy-optimized basis sets in massive calculations of 31P NMR chemical shifts carried out at the gauge-including atomic orbital-coupled cluster singles and doubles/pecS-2 level of the theory by taking into account solvent, vibrational, and relativistic corrections.