brewedbits.dev

Personal blog with guides and news on selfhosting, Linux and AI, from the Netherlands

nextDash nextdash --aboutYour bookmarks. Your terminal. checks your links knows your Docker host one container, no cloudLive demo →nextdash.cc ↗

Tip: WP_AUTO_UPDATE_CORE decides which WordPress updates install themselves

WordPress
~/tips/tip-wordpress-auto-update-core

define( 'WP_AUTO_UPDATE_CORE', 'minor' );

Chooses whether WordPress installs only minor releases, all releases or no core updates by itself.

WordPress already updates itself a bit. By default it takes minor releases and leaves major ones for you. You can change that with one line.

The constant WP_AUTO_UPDATE_CORE accepts three values: false turns all core auto updates off, true turns them on for everything including major versions, and 'minor' is the default.

define( 'WP_AUTO_UPDATE_CORE', 'minor' );

I would write the default out explicitly. It costs nothing, and anyone reading the file sees that someone made a choice. Security fixes arrive as minor releases, so 'minor' keeps the important ones flowing while major releases wait until I have looked at them.

Setting it to true means a major version can install while you sleep. For a small site with few plugins, that may be fine. For one with a lot of plugins I would not do it.

The caveat: false stops the security updates as well. It looks cautious, but then you have to check for updates yourself and keep a routine for it. This constant covers core only. Plugins and themes have their own auto update toggles.

Further reading: Editing wp-config.php (WordPress developer docs), On this site: log WordPress errors to a file and keep them off the screen, On this site: set WP_ENVIRONMENT_TYPE so plugins know a site is staging

More WordPress tips wp user application-password create anna backup-script --porcelain define( 'MEDIA_TRASH', true ); wp cli check-update wp theme delete --all wp media image-size All WordPress tips (85) All topics

Link