You can't have dairy but you can eat butter—sort of
If you're looking to incorporate more fruits and vegetables into your everyday diet, trying Whole30 actually makes a lot of sense. The program focuses on incorporating more fresh, whole foods like vegetables and fruits into your diet, and eliminating processed sugar, carbs, and dairy. Yes, all dairy, which means regular old butter is off-limits when you're doing Whole30. But that doesn't mean you can't eat any butter when you're doing Whole30 or that you should start looking for some butter substitute. According to the program rules, the best—and only—way to eat butter when you're doing Whole30 is to eat clarified butter or ghee.
At this point, you might be wondering what is clarified butter. "Clarified butter is butter whose water and milk solids have been removed, leaving essentially pure milk fat," writes Harold McGee in his book On Food and Cooking: The Science and Lore of the Kitchen. In the most simple terms, it's butter without particles like lactose or dairy protein, leaving just the actual fat. The way you make clarified butter is by essentially simmering butter so that whey proteins drift to the top and casein proteins sink to the bottom; you then skim off the whey and strain out the casein, leaving you with the pure butter fat. It has a slightly different texture and also a much higher smoke point, but still has the taste of butter, albeit more intense.
Ghee, a type of clarified butter that has roots in South Asian cooking, is also Whole30-approved for the same reason. The difference between ghee and clarified butter basically comes down to cooking time, and the longer cooking time of ghee causes this type of clarified butter to have a sweeter taste.
The reason clarified butter or ghee are allowed when you're doing Whole30 is exactly because of the removal of the proteins. As Melissa and Dallas Hartwig, the founders of Whole30, explain, the milk solids are the problem with conventional butter, not the fat. They write in The Whole30: The 30-Day Guide to Total Health and Food Freedom, the "carbohydrate portion of milk (lactose) together with the milk proteins," also known as casein, "produce a surprisingly high insulin response, which could be inflammatory in our bodies and further promotes disorders like obesity and diabetes." Casein has also been "associated with an increased risk of autoimmune diseases like rheumatoid arthritis," they continue.
The goal of cutting out dairy, and butter, when you're doing Whole30, is to reduce that internal inflammation. If you are going to make clarified butter at home, the Whole30 experts recommend using "pastured organic butter when making your own clarified butter or ghee." And honestly, given how good clarified butter tastes, especially when you're frying foods, you may want to consider making the swap even if you're not doing Whole30.