Increasing the Speed of WordPress sites
A few days ago I increased the loading speed of some of my sites. Or maybe I should say I decreased the loading time. Either way, they load faster.
Indeed, I had one site that was taking 8 to 20 seconds to load! Now it’s down to 1.2 to 2 seconds. It’s so much nicer.
And it really wasn’t very hard. I used a js/css minifier called Autoptimize and combined it with a caching plugin for Wordpress (WP Super Cache on some, W3 Total Cache on others). I also activated the CDN option as well (just the mirror one).
For the js/css minifier, I found I had to exclude some javascript like jquery.js and some css files like the theme files. I set the javascript to the bottom of the page.
I set it up to cache the pages, and to pre-build the cache. w3 Total Cache was a bit nicer on that part, as it would allow you to limit how fast it would build the cache. WP Super Cache didn’t limit it, and almost took the cpu higher than what my shared hosting provider allows.
Then I ran the test on Pingdom Tools and here’s what I got:
I just thought to myself: “Ya, that’s how it should be.” I mean, 100% is nice. And the time is even better. I didn’t save the speed shot before I did all the tests, but I it was something like 4 seconds.
I then ran them through Google’s Page Insight’s page and made adjustments until I could get them in the 90s for both desktop and mobile versions. I had to change a few things to increase the mobile score, mostly making the website buttons and links bigger and spacing them out.
But in the end, they got faster, and leaner. And by leaner, I also mean the cpu usage on the hosting provider went down, as well as the website response time with pingdom’s checking if the site was up (it checks it once a minute):
Ya, after I made the changes, the load times went down by over half!