Blogging with WordPress is incredible as it creates room for enough flexibility and creativity but one of the problems you might encounter on the your journey with WordPress is high CPU usage. If you are using shared hosting plan, this might become an automatic problem for you and once you get that mail from your host, your site is suspended because of the risk it pose to other sites using the same resources as yours.I had this problem with my host even when I had very little traffic. After that, I stopped falling for webhost scams that offers unlimited bandwidth and ridiculous offers. Now, don’t panic, I am going to explain how high-CPU usage can be reduced.
1. Update WordPress
If you don’t know how to do so, click here to update now.
2. Update WordPress Plugins
Newer versions are known to fix bugs that were in the previous version and can go along way in helping you. It is best practice to use stable versions of plugins, (Alpha and Beta versions of plugins should not be considered)
3. Update Your WordPress Template
Many of the premium theme vendors allow you to upgrade when you purchase their products, once you have an update, perform it. Never go for nulled or cracked WorldPress Themes.
4. Reduce Plugins
Do you really need all the plugins you have installed on your site? Think about it and make critical changes. When I had my first WordPress site, I had 87 plugins installed, but after I was hit with the hammer of my host, I realized that most of the plugins were actually not for me, I quickly ran a scale of preference and ended up with 20 plugins. My site ran faster and was more simple. They are alot of things that can be done within the theme files and requires no plugins.
Before ever thinking of installing a plugin, try as much as possible to confirm if you can manually add the feature you want by adding a simple line of codes to your template files.Another reason why step 1 of this tutorial is very important, sometimes the features of one plugins might come with a recent WordPress update and as such making the plugins unnecessary.
5. Only Activate Needed Plugins
If their use becomes automatically redundant, quickly de-activate. For example, you don’t need to have WP database backup plug-in if you are not auto scheduling a backup, and so on..
6. Install A Caching Plugin
I would recommend WP Super Cache. Cache plugins help to drastically reduce CPU usage, caching static copies of your pages on your web space, keeping you within your shared-hosting limits.
7. Disable WP-Cron
Doing this will greatly reduce high-CPU usage, what WP-Cron does is to manage all your scheduled events. I really don’t think this is necessary, so you can disable it. To disable WP-Cron, you will have to edit your wp-config by adding the following line below.
8. Create a cron job and run wp-cron.php every hour using the following command:
wget http://www.yourwebsite.com/wp-cron.php > /dev/null 2>&1
9. Avoid Plugins That Use Excessive CPU Load
These four plugins have been reported to cause high CPU usage, you can install the alternative, which is provided in the bracket
NextGen Gallery (alternative WordPress gallery shortcode)
Yet Another Related Posts Plugin (alternative Better Related Posts)
All In One SEO (alternative WordPress SEO)
Broken Link Checker.
10. If Everything Else Fails
I suggest you find a more simpler theme, install and check your CPU usage, it should have been reduced. Most themes that are highly customizable and dynamic might not be for you, unless you have upgraded to VPS or Dedicated Server.