As a general rule of thumb, but should be treated like any other conjunction. If what comes before but and what comes after but are both complete sentences, include the comma—unless both parts are short and there’s no chance of confusion or misreading. If what comes before and after but are not both complete sentences, do not use a comma. Examples:
Teaching at writers’ conferences is a lot of work, but I love doing it.
Teaching is hard work but it’s worth it.
Teaching at writers’ conferences requires work but results in wonderful rewards.
If what comes before and after but are both complete sentences, consider what the sentence after but connects to. For example:
Ecclesiastes teaches us that worldly pleasures will leave us feeling empty, but pursuing the Lord leads to great blessings.
With the comma before but, this sentence is saying that Ecclesiastes teaches about the emptiness of earthly pleasures; however, pursuing the Lord has tremendous benefits.
If the comma before but was removed from this sentence, it would be saying that Ecclesiastes teaches both the emptiness of worldly pleasures and the blessings of pursuing the Lord.
For more “PUGS” Tips, along with news about the writing/publishing industry, sign up for my newsletter using the link near the bottom of my home page. The current freebie for new sign-ups is my detailed summary of the changes from The Chicago Manual of Style‘s 17th and 18th editions.