Castor oil is too extreme. If children are constantly constipated, the reason is usually dietary.
My daughter was terribly constipated as a baby and I was in despair trying to sort it out. Finally I saw a locum doctor who'd had the same problem with her child. She advised me to stop feeding my daughter apples, bananas and dairy products. I did and the effect was immediate.
She also had her first night of breathing through an unblocked nose, and the spots around her mouth disappeared.
Five years later she still doesn't eat dairy, apples are OK in moderation, but even half a banana causes the problem to return.