How to fix CPU problems in WordPress
If you’re not using the latest version of WordPress update now. Make sure you backup your site first!
Update your WordPress Plugins
Updating your WordPress plugins to the latest versions can often reduce high CPU usage. If you’re running an old version take a moment to update now.
Only use stable versions of plugins
Whilst it’s very cool to be on the cutting-edge, only use stable versions of plugins. Sometimes early release versions (also known as alpha or beta) can have bugs in the code which can cause CPU spikes.
Install a caching plugin
Caching plugins such as WP Super Cache and W3 Total Cache can dramatically reduce CPU load by caching static copies of your pages on your web space. Static files use less CPU and memory. Keeping you within your shared-hosting limits.
Only use plugins you really need
Do you really need that plugin that constantly checks for broken links? – The more WordPress plugins you have installed, the longer your site will take to load. Deactivate and delete any plugin that you don’t need. Aim for just a handful of plugins. This will speed up your site and keep your visitors happy.
Avoid using resource-hungry plugins
The more complex WordPress Plugins such as WP e-Commerce and NextGen Gallery require lots of CPU and memory and are best suited to VPS, or dedicated servers. If you try running them on a shared-host you risk your site being suspended due to high-CPU loads. If you really need to use these plugins we recommend one of our VPS or dedicated servers.
Ask the WordPress Community for help
Try searching WordPress Forums for answers. If there’s a known problem with a plugin there’s a good chance someone will have provided a solution. For example searching yarrp cpu has lot’s of hits.
WP-Cron manages all the scheduled events in your WordPress site. WP-Cron is a very common cause of high CPU loads. Disabling WP-Cron can drastically reduce CPU-load and prevent the chances your account is suspended due to exceeding your resources.
You can disable WP-Cron by editing your wp-config.php and adding the following line;
Create a cron job and run wp-cron.php every hour using the following command:
Avoid plugins that cause high-CPU load
Clients have reported high-CPU load problems with the WordPress Plugins below.
(Alternative plugin shown in brackets)
- All In One SEO (alternative WordPress SEO)
- Broken Link Checker
- Yet Another Related Posts Plugin (alternative Better Related Posts)
- NextGen Gallery (alternative WordPress gallery shortcode and WP FancyBox)
If you’re using any of the plugins above we recommend checking you’re using the latest version of the plugin. If an update isn’t available we recommend disabling the problem plugin, switching to an alternative plugin or try using the built-in WordPress features. For example, WordPress has incredibly good SEO features built-in so you may not need an extra SEO plugin.