How to make WordPress blog faster and minimize CPU Usage

In this article, I will share my personal experience regarding this blog performance and nightmares of disabling website everyday because of CPU Utilization. I tried all my best however I was unable to figure out the cause of high CPU Usage by wordPress. I tried many articles on Google and at last I found some pointers and able to escape from this problem.

This article is specific to my problem only, However I am sure it will help many others also.

I started with ways, which will less impact my blog and will take less time.

1. Disable WordPress Cron Job

This was my first step, disabling cron Job. In most of cases we are not using this feature. Mostly it is used when you schedule some article to publish on some day or time. To disable it, Open “wp-config.php” file and add below line at top of page.

define(‘DISABLE_WP_CRON’, true);

What if I need this cron job ?

You can easily create a cron Job anytime, by following below process.
a. Log into your cPanel.
b. In the Advanced section, click Cron jobs.
c. Under Add New Cron Job, select the time interval. It is recommended not to add time interval less than 15 minutes.
d. Set the cron command to the following, replacing yourwebsite.com with your actual domain name:

wget -q -O – http://yourwebsite.com/wp-cron.php?doing_wp_cron >/dev/null 2>&1

The above command tells the Linux server to run wp-cron via wget, which will trigger the wp-cron.php script to do it’s job on your schedule instead of on each page view. This will lessen the amount of processes on the server.

e. Click Add New Cron Job to set the cron.

2. Disable Plugins

Now, Here comes actual reason for WordPress blog high CPU usage. I had many plugins and started to disable one by one.

  • Yet Another related posts Plugin (YARPP) : After reading many posts on same topic, I found that many WordPress users were having performance issue because of this plugin. This plugin implements unique algorithm to automatically match related articles. If you don’t have any shared server and performance issue, this is must install plugin for high SEO. Unfortunately I had to uninstall it.
  • All in One SEO Pack : This is also good plugin However imagine amount of computation used while trying automatically add metadata and all other SEO related stuff. So, I had no other option than disabling it.

There are many alternatives and light weight plugin suggested for above plugins, However on safer side, I decided not to install anything.

Even after all above stuff, My website started to disabled after 2-3 days instead of 1 day. It was some relief ;)

I started digging up, Googling again and then decided not to use any theme other than WordPress provided.

3. Change WordPress Theme

This was something I was trying to avoid. I was using same theme for last three year and I was not in favor of changing look and feel of my website. As a last option, I uninstalled old theme and replaced it with Twenty Twelve (Standard Theme provided by WordPress).

Why I chose this theme ?

Well, it is standard theme provided by WordPress team. So, I thought nothing can beat performance of this theme. It is very simple and elegant theme.

Luckily, I know little bit about CSS, so I started to change (Only CSS and few PHP codes) this theme. After 2 days ( I spent nearly 4 hours ) I was able to get almost 90% of same look and feel of my old theme.

4. Install W3 Total Cache

I have seen many article on WordPress performance and almost every article suggested for some caching mechanism. As WordPress doesn’t provide any out of box functionality however there is brilliant plugin available absolutely free of cost named as “W3 Total Cache“. This plugin is used by more than 2 millions WordPress blog. It is delivering website with lightening speed at same time load on Server is very low.

5. Uninstall Jetpack Plugin ( I cant Believe it  )

At this stage, most of WordPress bloggers problem may resolve. However I was surprised when my website is disabled after one week. Web hosting support agent informed me that CPU usage still shows highest usage at some point (not always). Only plugin I had was JetPack. I informed my web hosting provider that its not possible because I am running simple WordPress site with almost no plugin.

It is well known and understood that JetPack will do all processing on remote Server. I tried to search WordPress support and found that I was not single person having problem with this plugin. There were many bloggers reported performance issue because of JetPack.

JetPack is very nice plugin which provides almost everything like Mobile Theme, Statistics etc. I decided to give it a try by removing it.

And result ? Everything was perfect.

I have shared all my experience on performance and high CPU Usage problems. After following all above steps, I tried my blog performance at GTmetrix and at time of writing this article, this blog performance was 95% (Grade A) using Page Speed API and 88% (Grade B) using YSlow API.

I would like to listen your story, your feedback is most welcome.

Related posts

  • imnepalblog

    I am facing this problem. I’ll try these suggestion. let’s hope good. Thanks.

    • JitendraZaa

      Did you resolved your problem ?