WordPress is the most popular CMS on the web and very easy to use with a great eco system of pluggins. CPU related errors are quite common for those using wordpress on a shared host. Most webmasters complain that their web host account has been suspended due to excessive CPU usage. This can happen even if your site isn’t receiveing unusually high traffic, which most people find very confusing.
CPU usage usually depends on the amount of request that your server receives. Besides, it may also depend on the number of people accessing your site/blog at the same time. Whatever the reason may be; your objective is to reduce CPU usage.
English: CPU Time on Single CPU Multi Tasking System (Photo credit: Wikipedia)
Following are the top 10 tips to keep your CPU usage minimal:
#1. Remove unwanted Plugins
When it comes to WordPress, plugins consume maximum resource. Moreover, with time, several plugins come unresponsive. Often, they may not tally with your present WordPress version also. Hence, it is recommended to install reliable plugins and remove the ones that are no more in use. Using too many plugins overloads the server. Avoid using poorly coded plugins and deactivate the unnecessary ones.
#2. Update to the Latest version plug-ins
Updating plugins is not a cakewalk. The update process may bring along a number of bugs, particularly if you have up have upgraded to the advanced wordpress version but have forgot to keep pace with new developments. However, ensure to check the plug-in discussion groups as well as forums to ensure that it’s fine to update. Updates often pop-up on your screen however, read the pop-up message carefully before clicking the update version.
#3. Routine Database Tables Optimization
To keep things running smoothly, you need to log onto PhpMyAdmin on a routine bases and optimize the database tables. Unoptimized data tables can overload the server. More over, the CPU usage is also more for reading unoptimized data tables. Besides data table optimization, you can also delete spam/unapproved data.
#4. Concentrate on the themes
Themes may also add to high CPU usage. Hence, the moment you realize that too many themes have piled up, try updating or changing them. The more stylish themes you choose, the more loaded the CPU is. Simpler or optimized themes work better and don’t consume much resource. Some themes may come with plugins; in that case you should update the plugins as well. Prefer using a light them that has fewer queries.
#5. WordPress Upgradating and Caching
Are you still laid behind with the older WordPress version? Well, if that is so then it is high time you upgrade to an advanced and latest version. Most of us ignore the idea of upgrading wordpress just because it works perfectly. An upgradation helps because the newer versions are better in terms of security and optimization.
You may also install wordpress caching program. Caching archives each web page on your site. This lowers server load as it doesn’t require sending multiple queries to the database for generating multiple pages.
#6. Reduce widgets
There may be certain widgets that aren’t essential. Check them thoroughly and remove the ones that may not be beneficial for the readers. The more widgets you use the more strain you are enforcing on the server. Hence, to lower server load and CPU usage, get rid of unwanted widgets.
#7. Lower PHP or Database calls
PHP scripts and database calls also consume a lot of CPU resource. Caching your sites helps but certain database/PHP calls cannot be avoided. Hence, you should go through the plugins documentation carefully and disable the unnecessary options.
#8. Lower load on index.php file
At peak hours, your homepage may create a load on your server during the peak hours. To lower this load, ensure keeping your homepage simple. Try to lower the number of posts on your homepage and remove unwanted files, links and high resolution images. It would be even better if you choose a CDN service like Cloudfront
#9 Disable WP-Cron
Disable WP-Cron or change to a scheduled task to run every hour. This will greatly reduce your CPU usage. WP-Cron manages all your scheduled events so it is continuaally active on many sites when it isn’t necesssary.
#10 Avoid plugins that use excessive CPU load.
These are often backup and security pluggins. These functions are best being offered by a quality host provider that has integrated solutions.
There are a number of server monitoring tools available to assist with this. Whilst we can’t vouch for the product we thank Monitoringscout for the contibution to this article.