Find out in this tutorial how to disable WordPress from auto-updating in major versions.
WordPress 5.6 introduced quite a few new features; among them, the option (with a graphical interface) to set WordPress to update automatically.
I’m a big believer in keeping WordPress installations up to date, but enabling the option for major versions to install automatically seems too risky.
There are very few WordPress installations where I would have this option enabled. I would only leave it on blogs or personal pages that don’t have monetization.
So, since there is now a visual section where you can change this behavior (in Desktop > Updates) you might want to control it with code to prevent your client from touching it “unintentionally”.
Is this your case? Here’s how to do it:
Snippet to prevent automatic upgrade to major WordPress versions
1. Option A
Add the following code snippet to your functionality plugin:
To see this and another 1097 code snippets of this website, login or subscribe here.
With either option you’re going to stop major WordPress version updates from being installed automatically.
Conclusions
Do you want to stop major versions of WordPress from installing automatically? Now you know how to do it with a simple code snippet.
If you have any question, please leave it in the comments. And if you want to give me a suggestion for future snippets, please send it through the contact form.
Benefits of being a subscriber. 🙂