What gives coconut oil its laxative effect for constipation relief? The MCTs (medium-chain triglycerides), which are the "movers and shakers" that soften stool and stimulate bowels. And virgin coconut oil carries about 50 – 64% MCTs, which make virgin coconut oil good for relieving constipation.
It's worth noting that the unrefined coconut oil smells like fresh coconut. Some people like it, some do not. So, you have to consider whether you'll like the naturally-occurring coconut odor or not. Especially If you intend to eat virgin coconut oil straight off the spoon to help with your constipation.
Alternatively, you can use a type of refined coconut oil called RBD coconut oil. It contains almost as much MCTs as virgin coconut oil except for the coconut odor. Meaning, the odorless RBD coconut oil is as good as the unrefined virgin coconut oil for constipation.