Baby is constipated

What can I do for my baby girl when she's struggling to poop? She grunts and cries, and when she finally goes it's firmer than normal. She doesn't like prune purée. I always offer her a sippy cup of water. I just got her baby yogurt and mixed it with pear purée and I'm hoping that helps.