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: AUTOMATIC_UPDATER_DISABLED holds back WordPress auto-updates until you have tested them

WordPress
~/tips/tip-wordpress-automatic-updater-disabled

define( 'AUTOMATIC_UPDATER_DISABLED', true );

One wp-config.php constant turns off automatic updates, for instance while you test on staging.

A major WordPress release is coming and I’d want to see it on a copy of the site before the live one updates itself. The constant for that is one line in wp-config.php.

define( 'AUTOMATIC_UPDATER_DISABLED', true );

The official wp-config documentation gives two reasons for using it. A site may not want auto-updates because of customizations or host-supplied updates. And it can be done before a major release, to allow time for testing on a development or staging environment. When the testing is done, remove the line or set it back to false.

Core updates have their own constant, WP_AUTO_UPDATE_CORE, with three documented values:

define( 'WP_AUTO_UPDATE_CORE', false );   // no core updates
define( 'WP_AUTO_UPDATE_CORE', true );    // all core updates, minor and major
define( 'WP_AUTO_UPDATE_CORE', 'minor' ); // minor releases only (the default)

Pick one of them if you only care about core. Use AUTOMATIC_UPDATER_DISABLED when you want to switch the whole automatic updater off.

Caveats: the docs list the two constants in separate sections and don’t say how they interact, so I wouldn’t stack them and hope. Check the Updates screen afterwards to see what the site actually does. And a switched-off updater also means security fixes no longer arrive by themselves. Put a reminder in your calendar, because forgetting the line is how a site ends up three versions behind.

Further reading: Editing wp-config.php

More WordPress tips curl -s "https://example.com/wp-json/wp/v2/posts/42?_embed" curl -s -D – -o /dev/null "https://example.com/wp-json/wp/v2/posts?per_page=100" curl -s "https://example.com/?rest_route=/" 'You must be logged in.', add_filter( 'the_title', 'plugin_shout_title', 20 ); All WordPress tips (92) All topics

Link