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.
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.
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.
2) Page loads now much faster. ~0.6 Seconds. WP Super Cache is my favorite Cache plugin.
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.