Knowledgebase Guide
Configure Automatic Updates in WordPress
Keeping WordPress, plugins and themes up to date is one of the most important steps you can take to keep your website secure.
This guide explains how to configure automatic WordPress updates using the built-in
WordPress update settings, wp-config.php and WordPress filters, as well as how
cPGuard can be used to check for vulnerable or outdated plugins and themes.
Outdated WordPress components can contain known security vulnerabilities which may be exploited by automated attacks.
Checking WordPress Security and Updates Using cPGuard
Cheap Host servers use cPGuard to provide an additional layer of website security.
cPGuard can identify WordPress installations and help you check installed plugins, themes and WordPress components for
known security vulnerabilities or other security concerns.
You can also use cPGuard to review WordPress components and manually update supported plugins where an update is available.
Accessing cPGuard in cPanel
- Log in to your cPanel account.
- Scroll to the Security section.
- Click cPGuard.
- Open the WordPress or CMS management section.
- Select the WordPress website you want to check.
- Review any detected security threats, vulnerable components or available updates.
- If an update option is available, you can update the affected plugin or component from cPGuard.
Accessing cPGuard in DirectAdmin
- Log in to your DirectAdmin account.
- Go to Extra Features.
- Select cPGuard.
- Open the WordPress or CMS management section.
- Select your WordPress installation.
- Review the installed WordPress version, plugins, themes and any security warnings.
- Update affected components where an update option is available.
contains a known security vulnerability, update the affected software as soon as possible.
Enable Automatic Plugin Updates in WordPress
WordPress includes its own automatic update system. This is the easiest way for most users to configure automatic plugin
updates.
- Log in to your WordPress administration area.
- Go to Plugins > Installed Plugins.
- Find the plugin you want WordPress to update automatically.
- Click Enable auto-updates.
Once enabled, WordPress will automatically install new versions of that plugin when updates become available.
You can repeat this for each plugin you want to update automatically.
You can also select several plugins using the checkboxes and use the bulk action option to enable automatic updates
for multiple plugins at once.
regular security and maintenance updates.
Enable Automatic Theme Updates
WordPress can also automatically update installed themes.
- Log in to WordPress.
- Go to Appearance > Themes.
- Select the theme you want to manage.
- Click Enable auto-updates.
Theme updates can overwrite changes made directly to the theme files. Customisations should normally be made using a
child theme instead.
Automatically Update WordPress Core
WordPress normally installs minor security and maintenance updates automatically.
Major WordPress releases can also be configured for automatic installation.
To check the available setting:
- Log in to WordPress.
- Go to Dashboard > Updates.
- Look for the automatic update option shown for WordPress itself.
- Choose whether WordPress should automatically install major releases as well as maintenance and security updates.
Configure WordPress Core Updates Using wp-config.php
Advanced users can control WordPress core automatic updates by editing the
wp-config.php file.
The file is normally located in your WordPress installation directory, for example:
public_html/wp-config.php
Before editing this file, we recommend downloading a backup copy.
Enable All WordPress Core Updates
To automatically install both major and minor WordPress core releases, add:
define( 'WP_AUTO_UPDATE_CORE', true );
Only Allow Minor and Security Updates
To automatically install minor WordPress releases while leaving major releases for you to install manually, use:
define( 'WP_AUTO_UPDATE_CORE', 'minor' );
Disable Automatic WordPress Core Updates
To disable automatic WordPress core updates:
define( 'WP_AUTO_UPDATE_CORE', false );
Leaving WordPress or its components out of date can expose your website to known vulnerabilities.
Check That Automatic Updates Have Not Been Disabled
WordPress automatic updates can be disabled completely by adding the following setting to
wp-config.php:
define( 'AUTOMATIC_UPDATER_DISABLED', true );
If this line exists, WordPress's automatic updater is disabled.
If you want WordPress to manage automatic updates normally, remove this line or change the configuration that added it.
Automatically Update All Plugins and Themes
Advanced users can also enable automatic updates for all plugins and themes using WordPress filters.
A good way to do this is with a small Must-Use Plugin.
Create the following directory if it does not already exist:
wp-content/mu-plugins/
Then create a file such as:
wp-content/mu-plugins/cheap-host-auto-updates.php
Add:
<?php
add_filter( 'auto_update_plugin', '__return_true' );
add_filter( 'auto_update_theme', '__return_true' );
Files placed inside wp-content/mu-plugins are automatically loaded by WordPress and do not need to be
activated from the Plugins page.
your theme's
functions.php file because the setting will continue to work if you change themes.Which Update Method Should I Use?
For most Cheap Host customers, we recommend:
- WordPress automatic updates: Use these to automatically update plugins and themes.
- WordPress core updates: Always allow security and maintenance releases.
- cPGuard: Use cPGuard to check for security threats, vulnerable WordPress components and available updates.
- Manual updates: If cPGuard identifies a vulnerable plugin or theme, update it as soon as possible.
Can cPGuard and WordPress Automatic Updates Be Used Together?
Yes.
WordPress and cPGuard perform different roles and can be used together.
WordPress automatic updates can automatically install new versions of plugins, themes and WordPress itself.
cPGuard provides an additional security layer by checking WordPress installations for threats and known
vulnerabilities and can help you identify components which need updating.
You can therefore leave WordPress automatic updates enabled while also using cPGuard to monitor the security of your website.
check cPGuard for security warnings or vulnerable components.
Before Enabling Automatic Updates
Although automatic updates are recommended for most websites, it is sensible to make sure that:
- Your website has a recent backup.
- Your plugins and themes are actively maintained.
- You have removed plugins and themes that are no longer required.
- Your website is using a supported PHP version.
- Any custom theme or plugin modifications have been properly documented.
Plugins that are no longer required should normally be deleted rather than simply deactivated.
Check Your Website After an Update
After an important WordPress, plugin or theme update, check the main areas of your website including:
- The homepage.
- Contact forms.
- Login or membership areas.
- Shopping carts and checkout pages.
- Any other important website functionality.
If an update causes a problem, restoring a recent backup may be necessary while the compatibility issue is investigated.
Automatic Updates Are Not Working
If WordPress automatic updates are enabled but updates are not taking place, check:
- That
AUTOMATIC_UPDATER_DISABLEDhas not been enabled inwp-config.php. - That plugin or theme auto-updates are enabled in the WordPress Dashboard.
- That WordPress Cron is operating correctly.
- That the website files have the correct permissions.
- That the plugin or theme provides updates through WordPress.
You can also go to:
Tools > Site Health
and check for any errors relating to scheduled events or WordPress Cron.
What If cPGuard Reports a Vulnerability?
If cPGuard reports that a plugin, theme or WordPress component contains a known vulnerability:
- Check whether an updated version is available.
- Update the affected component using cPGuard or the WordPress Dashboard.
- If no update is available, consider disabling or removing the affected plugin or theme until the developer releases a fix.
- Check your website after making the change.
Still Having Problems?
If you are having problems enabling WordPress automatic updates, or cPGuard reports a vulnerable WordPress installation,
please sign in to your hosting account and open a support ticket.
Our team will be happy to check your WordPress installation and help you configure the appropriate update settings.