For some reason, my website SeniorCare was auto updated today to 4.9.9 too.
Thread Starter
bsweb
(@bsweb)
Thanks @juggledad but was looking for an automated way rather than manually updating
This was how I updated for any websites that didn’t auto update:
Basically you need to call the wp_maybe_auto_update() function.
http://blog.birdhouse.org/2013/11/02/force-wordpress-auto-update/
But would that not update to 5.0.1 rather than 4.9.9?
I’m in the same boat – have a load of sites on 4.9.8 that I need to automate updating to 4.9.9.
I haven’t tried this yet, but if you have
define( ‘WP_AUTO_UPDATE_CORE’, minor );
in your wp-config.php, it should only do the minor update i.e. to 4.9.9
Thread Starter
bsweb
(@bsweb)
Thanks @candledigital I’ll have a look at that. I am hoping @jhob that the automated update process would never update a major version, that would be bad practise.
In my experience auto update, including a forced auto update using the wp_maybe_auto_update() function always sticks to minor updates as @juggledad says. So in my case it went from 4.9.8 to 4.9.9
@juggledad Trying that now. Didn’t realise you could set minor for WP_AUTO_UPDATE_CORE. Will report back how it goes.
@bsweb According to the docs:
WP_AUTO_UPDATE_CORE can be defined with one of three values, each producing a different behavior:
- Value of true β Development, minor, and major updates are all enabled
- Value of false β Development, minor, and major updates are all disabled
- Value of ‘minor’ β Minor updates are enabled, development, and major updates are disabled
So define( 'WP_AUTO_UPDATE_CORE', true );
would update major versions.
Thread Starter
bsweb
(@bsweb)
I can confirm that just adding define( ‘WP_AUTO_UPDATE_CORE’, minor) to the wp-config.php file fixed the problem for all our sites, which were then updated to 4.9.9.
Thanks for the help guys and have a great festive period!
Sites on 4.9.8 were automatically updated to 4.9.9. Sites on 5.0 were automatically updated to 5.0.1.
In my wp-config.php is the following:
define (‘WP_AUTO_UPDATE_CORE’, false)
If I understand this correctly, I have to change this now to the following:
define (‘WP_AUTO_UPDATE_CORE’, minor)
Is it correct that way? And do I have to change that later with version 5.x again?
I’m just surprised that it has worked the whole time so.
Many Thanks
@detoris You should go read about the possible options and make an informed decision about how you want to set that option.
https://codex.wordpress.org/Configuring_Automatic_Background_Updates