  We report a detailed investigation of RECoPO (RE = La, Pr) and LaCoAsO
materials performed by means of muon spin spectroscopy. Zero-field measurements
show that the electrons localized on the Pr$^{3+}$ ions do not play any role in
the static magnetic properties of the compounds. Magnetism at the local level
is indeed fully dominated by the weakly-itinerant ferromagnetism from the Co
sublattice only. The increase of the chemical pressure triggered by the
different ionic radii of La$^{3+}$ and Pr$^{3+}$, on the other hand, plays a
crucial role in enhancing the value of the magnetic critical temperature and
can be mimicked by the application of external hydrostatic pressure up to 24
kbar. A sharp discontinuity in the local magnetic field at the muon site in
LaCoPO at around 5 kbar suggests a sizeable modification in the band structure
of the material upon increasing pressure. This scenario is qualitatively
supported by \emph{ab-initio} density-functional theory calculations.
