Enable WordPress Automatic Update to Prevent Malware

Pretty WordPress Buttons!
WordPress automatic update is a little known feature that can save you a mess to clean up later.

Protect your site using this little known feature.

Hey everyone. I shouldn’t need to tell you that malware injections in WordPress are very popular right now. Seems like everyday we are bombarded with headlines like “Millions of Websites Vulnerable”. These injections are usually the result of WordPress installs and plugins that are not updated, leaving a door open for scan bots to discover and exploit your site. It is estimated that as many as 5% of sites are currently infected with some sort of malware. The worst part is that protecting your site is laughably easy by just keeping it updated, and I’ll show you a quick and easy way to protect your site by enabling WordPress automatic update so you don’t have to babysit your site to keep it secure.

To set up this hidden feature, open up your wp-config.php file and add these lines to the very bottom of the file:

/*Auto updater code for all WordPress core updates*/
add_filter( 'allow_minor_auto_core_updates', '__return_true' );

/*Auto updater code for all WordPress theme updates*/
add_filter( 'auto_update_theme', '__return_true' );

/*Auto updater code for all WordPress plugin updates*/
add_filter( 'auto_update_plugin', '__return_true' );

Updates will now happen automatically. Don’t be alarmed if it doesn’t happen right away, the updates will happen on their own shortly. Now, there may be times in which you do not want certain plugins to update. For that, try using a plugin to force updates on certain plugins, like White Fir Design’s Automatic Plugin Updates.

I have added this to all my WordPress sites. There is no excuse not to keep your sites updated, considering how frequently WordPress sites get hacked. Most exploits are patched before a method of exploitation is discovered, and many hackers rely on the fact that most admins do not bother to keep their site updated. WordPress automatic update is a quick way to protect those clients that seldom login to their site.

Like this post? Consider donating or drop me a line at danny.lujan@rocketmail.com.

Leave a Reply

Your email address will not be published. Required fields are marked *