Recently noticed High Pageload Time and CPU usage – Steps I have performed to Fix it – WordPress Optimization

Last updated
App Shah
Crunchify » WordPress Optimization and Tutorials » Recently noticed High Pageload Time and CPU usage – Steps I have performed to Fix it – WordPress Optimization
Optimize WordPress - Crunchify Tips

After thinking for almost a day I have decided to share the strange behavior which I noticed last week on crunchify.com. It’s nothing special but I’ve suddenly noticed below site behaviors:

  • Increase in CPU usage
  • Number of 500 and 502 errors
  • High page load time

I debugged my WordPress site for almost 2 days and after performing below steps now I think I have fixed all above issues.

But first let’s check out some stats:

1) 500 and 502 Error Graphs from Google Webmaster Tools. Direct link.

Google Webmaster Tools - Crunchify 502 Errors

2) Page Load Time metrics from Google Web Master Tools. Direct link.

3) High CPU usage and high number of processes noticed via CPanel process explorer.

Tasks I’ve performed to fix this:

1) Removed Twitter and Google+ Sharing Javascripts which we have to add to each page if you have Follow Buttons.

2) Removed Two plugins.

  • Digg Digg Social Sharing
  • Jetpack

3) After removing Digg Digg Social sharing plugin I saw some improvement but not that much. But after removing Jetpack I’ve seen major performance improvements.

JetPack Causing Too Much CPU usage

4) Added below browser caching options to .htaccess file. Just incase you need to follow complete tutorial.

## EXPIRES CACHING ##
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/jpg "access 1 year"
ExpiresByType image/jpeg "access 1 year"
ExpiresByType image/gif "access 1 year"
ExpiresByType image/png "access 1 year"
ExpiresByType text/css "access 1 month"
ExpiresByType text/html "access 1 month"
ExpiresByType application/pdf "access 1 month"
ExpiresByType text/x-javascript "access 1 month"
ExpiresByType application/x-shockwave-flash "access 1 month"
ExpiresByType image/x-icon "access 1 year"
ExpiresDefault "access 1 month"
</IfModule>
## EXPIRES CACHING ##

5) WordPress DB optimization. Follow this tutorial.

6) Number of CSS optimization + Some tricks.

Checkout the result now.

1) Page size reduced to ~900KB from 1.8MB.

Pingdom Crunchify Test - Page size reduced

2) Page loads now much faster. ~0.6 Seconds. WP Super Cache is my favorite Cache plugin.

WP Super Cache Rocks

If you also have the similar issue and wanted to share your experience you are most welcome. Please shoot out your optimization tips in below comment section. Enjoy & Happy Blogging.

10 thoughts on “Recently noticed High Pageload Time and CPU usage – Steps I have performed to Fix it – WordPress Optimization”

  1. Memory usage increase is causing by real-time stat, be it Jetpack or awstat in cpanel. In Jetpack you can deactivate it, May solve the problem.
    If you check stat, at the same time look to your cpanel, you will see your memory usage got increased. Check it yourself, I have found several others, who deactivate real stat module in Jetpack to solve the issue.

    Reply
    • Thanks Joy for tips. Agree – we shouldn’t have any real-time stats logging to WordPress DB at all. It’s absolutely not required as Google Analytics is free tool to use.

      Reply
  2. Love the dissection and insight on this one – been wondering also. I have also noticed how Jetpack seems to just be a jumble or assortment of useful but often conflicted stuff. Its pretty sad how WP allowed that as they matured more.

    I was personally fooled on that aspect too and because I still love the old experimental approach to web dev and implementation, the Jetpack challenge was certainly a hindrance to the whole troubleshooting and optimizing procedure. Thanks for the great summary and thanks too for having the time to still write all that down.

    Reply

Leave a Comment