I had that problem earlier in my pregnancy. Drink lots of water and take some Stoll softeners. Increase your fruits.
I usually drunk apple juice and it helps
Plum juice is the best for me so far. You can also try drinking more water to help soften the stool. Eat fruits or foods that are rich in fiber. I was constipated also back in my first trimester. I drink plum juice or grape juice everyday and eat crakers with fibers since then constipation isn't a problem anymore for me. Hope it helps you too(: