I've found that if you have dairy products, such as cheese, at EVERY meal, you are likely to get a painful level of constipation.
It seems that the intestines cannot absorb both calcium and magnesium from the same meal, and will absorb only the calcium if you had both.
Most dairy products contain calcium. A good source of magnesium is green leaves, such as turnip greens. Spinach may be and exception - it contains calcium, magnesium, AND something that prevents you from absorbing the calcium.
You need perhaps one meal a day that contains green leaves but no dairy products.