We carried out a combined P-substitution and hydrostatic pressure study on CeFeAs_1-xP_xO single crystals in order to investigate the peculiar relationship of the local moment magnetism of Ce, the ordering of itinerant Fe moments, and their connection with the occurrence of superconductivity. Our results evidence a close relationship between the weakening of Fe magnetism and the change from antiferromagnetic to ferromagnetic ordering of Ce moments at p*=1.95 GPa in CeFeAs_0.78P_0.22O. The absence of superconductivity in CeFeAs_0.78P_0.22O and the presence of a narrow and strongly pressure sensitive superconducting phase in CeFeAs_0.70P_0.30O and CeFeAs_0.65P_0.35O indicate the detrimental effect of the Ce magnetism on superconductivity in P-substituted CeFeAsO.