The following example should convince you that you cannot have the lifting property you want in all generality. It would be interesting to know exactly when you can get it (which is obviously the case when the lifting wrt $g$ is unique), but I do not have an answer to that.

If your category is the category of groups, and $S$ is the class of surjections, take $X=Y=Z=Z'=1$, $X'= Y' = \mathbb Z$, with $X' \rightarrow Y'$ being multiplication by $2$, all the other maps being $1$ (as they should be). Then $1 \rightarrow \mathbb Z$ has the LLP wrt S, and so does $1 \rightarrow 1$. But the map you are insterested in is $1 \rightarrow \mathbb Z/2$, which does not have the LLP wrt $S$: a 2-torsion element does not always lift to a 2-torsion element through a surjection - take $(\mathbb Z \rightarrow \mathbb Z/2) \in S$, for instance.

**For the record :** The original question was asked the other way around, with RLP instead of LLP (which would still make sense for some $S$ and some pushouts). I leave my previous answer there for the record, as a funny example:

If your category is the category dual to groups, and $S$ is the class of group surjections, then $1 \rightarrow \mathbb Z$ has the RLP wrt S (in $\mathcal {Grp}^{op}$, that is the LLP in $\mathcal {Grp}$), and so does $1 \rightarrow 1$. But $1 \rightarrow \mathbb Z \times \mathbb Z$ clearly does not (commuting elements do not always lift). And this is a pullback in $\mathcal {Grp}$, thus a pushout in $\mathcal {Grp}^{op}$.

leftlifting property throughout the text, as in the title? (Not right lifting property.) $\endgroup$ – Reid Barton Nov 6 '18 at 15:12