High resolution x-ray diffractometry and photoluminescence measurements (PL) have been used to compare the effects of elastic stress relaxation of free standing and overgrown Ga0.22In0.78As0.80P0.20 quantum wire structures on InP. The elastic relaxation occurs near the free surface of the sidewalls resulting only in a minor shift of the PL line. The overgrowth of the structures with a Ga0.22In0.78As0.16P0.84 layer, which has a residual tensile strain of more than 1% compared with the InP substrate, leads to a strong increase of the PL line shift. At the same time, a shift of the x-ray diffraction pattern from the small angle side of the InP peak to the large angle side is observed. In addition, the diffuse scattering increases. The strain fields in the wire structures are calculated, and the diffraction patterns are determined from the strain maps in the kinematical approximation.