Automatically Update WordPress, Plugins and Themes

Posted on April 10, 2014

Seems like every time I log into the WP dashboard I see that little circle with 1, 2, 3…updates. Let’ do some automating!

Let’s face it…there just aren’t enough hours in a day and some of the little tasks that take up time are much better off being done automatically. Like WordPress updates for example. How annoying is it that everytime you log-in to the WordPress dashboard there are updates? Core updates, plugin updates, theme updates, ahhhh! By default starting with version 3.7, WordPress will update itself for all minor updates such as 3.7 to 3.7.1. BUT…when there is a version change such as 3.7 to 3.8 you will need to manually update. Furthermore, all plugins and themes are set to be manually updated by default. Lucky for you you’re about to see how easy it is to quickly add three lines of code that will make this process a thing of the past.

How to automatically update major WordPress release updates

Major release updates include going from 3.7 to 3.8, not simply going from 3.7.0 to 3.7.1. If you want WordPress to automatically update these core file updates you simply need to add the following line to your wp-config.php file in the root folder of your WordPress installation: define(‘WP_AUTO_UPDATE_CORE’, true);

How to automatically enable WordPress plugins updates

Plugins are great for adding additional functionality to your website but are constantly being updated with bug fixes or to remain compatible with the latest version of WordPress. To eliminate the headache of having to continuously update them you can again open up your wp-config.php file in the root of your WordPress installation and add: add_filter( ‘auto_update_plugin’, ‘__return_true’ );

How to automatically enable WordPress theme updates

By default WordPress loads with several themes pre-installed. Most often beginning WordPress developers will then go out and get a new theme from the WordPress repository. These themes of course will then need to be updated as bugs are fixed and changes are made. If you want these themes to automatically update, you simply add the another line to the wp-config.php file:
add_filter( ‘auto_update_theme’, ‘__return_true’ );

Note: This auto updating of themes will only work if you are using themes that you’ve gotten from the official WordPress theme repository. It will not work with themes that you downloaded or bought through sites like themeforest.com or elegant themes. If you are using a paid theme generally there are ways to autoupdate those using a plugin for example Theme Forest has one here and Elegant Themes has their own auto update functionality described here.

How to completely disable WordPress auto updates

If for some reason you want to completely disable WordPress core updates (including minor updates) you can add the following line of code to your wp-config.php file: define( ‘AUTOMATIC_UPDATER_DISABLED’, true );

So there you have it..and you thought you would have to be a WordPress genius to do something magical like automatically update your WordPress installation!


Leave a Reply

Your email address will not be published.

 

Ready to Get Started? Call 203.516.0359