Setting WordPress to Auto Update via Wp-config

Setting WordPress to Auto Update via Wp-config

Something I only figured out recently, is that WordPress can auto update itself by editing the Wp-config.php file. Previously I was using Fantastisco in Cpanel and using the WordPress installation app otions to keep my sites up to date.

If you want the WordPress auto updates to handle major core updates too, you will have to add a single configuration line. To do this, open the wp-config.php file in the root folder of your WordPress installation and add this line to it:

define('WP_AUTO_UPDATE_CORE', true);

If you want your plugins to be automatically updated by WordPress when a new version is released, you need to add a line to your wp-config.php file, similar to the one above. This time, however, a filter is used for enabling the plugin auto updates:

add_filter( 'auto_update_plugin', '__return_true' );

Permalink

Recent Posts