I’ve managed to improve my GTmetrix page speed and Ylow grades from the mid 70’s to 98% for Page Speed and 97% for YSlow with a page load time of only 1.18 seconds. Here’s a link to the report (if the link is dead feel free to re-run the test). In this post I’m going to outline my configuration so that anyone interested in replicating my results can save themselves some effort.
Here’s a screen shot of my grade after I’ve implemented the solutions that I’m about to outline in this post. If you’re still in doubt feel free to run the test yourself but be sure to use the secure URL at https://odinsql.com to avoid any redirection delay.
Does GTMetrics even matter?
If you’re wondering what value a high Page Speed and YSlow grade have, I can attest that the quicker page loads have dramatically improved the volume of traffic that Google and the other search engines are now sending my way which has resulted in more revenue. In short this article has huge Search Engine Optimization (SEO) implications as well as providing a better overall experience to the impatient hordes accessing your site.
So let’s get into how I’ve managed to pull off such a fantastic score and what you can do to duplicate my results.
Hosting
In order to implement the methods that I’m about to outline you’re going to need fast, low latency hosting. If you’re using crappy shared hosting you’re going to need to replace it with at least a VPS with sold state drives (SSD). Two companies that fit the bill which I would recommend are RamNode and Vultr. RamNode is faster of the two but is slightly more expensive. If managing a VPS isn’t something you’re capable of, I would recommend checking out CloudWays. CloudWays adds server management on top of DigitalOcean, Amazon or Google’s “cloud”. You won’t be able to implement the image compression method that I outline with CloudWays but they do have great caching built into their software stack. If you have the traffic that would justify the expense you may even want to go all out and lease a dedicated server. Choopa.com which is the parent company of Vultr offers both managed and self managed dedicated servers. For the vast majority of WordPress sites a dedicated server would be a completely unnecessary expense.
Web Server
The combination of Nginx and PHP-FPM is significantly faster and with lower memory requirements than Apache. (Yes, I know that you can configure PHP-FPM to work with Apache) Nginx is fast and works spectacularly under heavy load. If you want to greatly improve your sites performance while using the same hardware Nginx is going to be an essential component to making that happen. I’ve previously written about how I was able to configure a $10 per month virtual server to serve up 15,000 page views per minute using Nginx.
Theme
I’ve spent countless hours trying to find a free theme that’s both good looking, functional and isn’t full of unnecessary fonts, JavaScript and CSS includes without much success. Every one of the many free themes that I’ve implemented had fairly major flaws. I’m not saying that there aren’t any good free themes I’m just saying that I wasn’t able to find any that met my needs. I had read many positive reviews regarding Genesis framework and finally decided to pay the $100 for the framework and the Metro Pro theme from StudioPress. I could have probably spent the better part of a week coding my own custom theme but I value several days of my time more than the $100 that I invested in this theme. As it is I spent the better part of two days just configuring Metro Pro. I’ve seen about a 30% increase in page views since making the switch and if even half of that is due to the theme it will pay for itself within a couple of weeks.
Combine and Minify
Having too many external files that need to be downloaded can slow down the rendering of you site greatly. I have several plugins that I use and It seems like every plugin has it’s own css and js include. Without combining and minify-ing I had around 15 CSS and JS files each. Ideally WordPpress would come up with a better solution that having every plugin add it’s own css and js include so that this whole combining and minify process wouldn’t even be necessary.
I spend the better part of a Sunday afternoon installing, testing, uninstalling and retesting a multitude of wordpress plugins that are supposed to combine and minify my css and js including “Better WordPress Minify”, “WP Super Minify”, “W3 Total Cache”, “Combine CSS”, “Combine JS”, “WP Optimize By xTraffic”, “Autoptimize” and “Speed Booster Pack”. Each plugin had dozens of positive reviews. Unfortunately the majority of them didn’t work nearly as well as was claimed. A couple performed well but the plugin that managed to improve my score the most and that I’m actually using and recommend was “Speed Booster Pack” it’s free and it actually works.
Image Compression
Images that are needlessly large in file size can take a really long time to download. Back in the mid 1990’s I used to have to painstakingly tweak image export settings for each any every image. Fortunately things are a lot simpler now. You can just upload your images and let a WordPress plugin losslessly compress your images without any manual intervention.
Up until a couple of weeks ago I had been using the SmooshIt plugin which would upload your images to a yahoo server which would then optimize and resize them before putting them in into your media library. Unfortunately yahoo has plans to discontinue this service and the plugin was nagging me about paying for a pro version, for some number of dollars that I can’t remember but wasn’t willing to spend per year. I opted to giving optimizing the images on my own server a try and found the CW Image Optimizer plugin. CW Image Optimizer requires that LittleUtils is installed on the server which is what is doing the actual image optimization on your own server instead of shipping them off some place else. Installing LittleUtils can be a bit of a pain it the but to install correctly. I’m happy with the results but I wish that there was a simpler installation method.
Once LittleUtils was installed I re optimized all of my images by using the regenerate thumbnails plugin.
Caching
Don’t make your server work harder than necessary. If your content doesn’t change every few seconds you should be implementing some form of caching. When a client makes a request to your site instead of looking up the data in the database or compiling your PHP it’s much, much faster to save a copy from when someone else made the same request to a file or in memory and server that version instead. Properly implementing a caching strategy can literally (not figuratively) improve your servers performance by 1000 times or more. My current caching configuration includes w3 Total Cache configured to use Memcached for caching queries and WordPress objects, OPCache configured in PHP-FPM and an Nginx proxy cache configured to cache pages to disk.
I’m only using a $10 VPS which doesn’t give me much memory to work with. If I had at least 2GB of ram I would configure Varnish to use memcached for the page cache.
Content Distribution Network (CDN)
For those of you not in the know, a content distribution network basically copies your static content such as your images, js, css, html and cached pages onto their servers that are closer to the people that are visiting your site than your own server and serves the copies instead of downloading the content from your server each time it’s requested. This results in your server being put under less load and your visitors downloading your content more quickly. Faster page loads equal happy users and happy users spend more time on your site resulting in you making more money. If for some reason you’re still not using a CDN head over to CloudFlare.com and sign up for a free account.
I’m actually using the $20 a month pro plan now but the free plan should have a positive impact for anyone that’s not currently using a CDN.
That’s it for this post. I hope that some one out there found some of this information at least mildly useful. If you think that I’ve left something out or would like me to go into more detail please leave a comment or send me a message via my contact form and let me know. If you would like to stay update regarding my blog posts please join my newsletter by entering your name and email address in the big black box on the right hand navigation menu.
greggish says
Is odinsql.com now hosted on Vultr or RamNode? Which plan are you using? Thanks
Benjamin Knigge says
As of today this site is still on a $10 VPS with Linode. I’ve had some issues with Linode and have multiple VPS with many different providers that I used for different things. I have an existing credit which should last for another 2 months at which point I plan on moving it over to a $14 VPS with RamNode.
greggish says
Thanks for the info. I see in your recent write-ups that RamNode and Vultr are your two favorites. What are the main reasons that you’ve decided to go with RamNode over Vultr?
Benjamin Knigge says
RamNode is faster but they lack many of the nice feature present in Vultr’s interface. You can’t create snapshots and they don’t create backups of your VPS. If you wanted to Uprade your VPS with RamNode you need to contact support with Vultr you do it yourself. For the most part Vultr has replaced DigitalOcean for me. I use Vultr for development servers where I may want to create a clone of a VPS make a few modifications and then test out the changes. I recently had a client that needed around 100 VPS with the exact same configuration in multiple datacenters but only for 12 hours per day. With Vultr this was possible and it wouldn’t have been with RamNode.
Vultr is comparable to DigitalOcean or Linode only significantly faster. RamNode is more like a traditional VPS host which lacks all of the “cloud” features.
greggish says
Another thing. When you do the move to the new hosting, could you write a step by step guide on how you move a live WordPress site from one host to another? I’ve looked for this info and it all looks so complicated to get an existing WordPress site and its databases properly moved from one host to another.
Benjamin Knigge says
I could do that. There are thousands of things to write about and it’s all just a matter of time. It’s really not as complicated as you think it is. The way that I’ve been doing it recently is via this free Duplicator WordPress plugin It’s pretty simple. Just follow the directions.
If managing a VPS isn’t for you I would recommend giving CloudWays a look. They will migrate one site for you for free. They add management on top of DigitalOcean, Amazon or Google’s cloud.
OdinSQL fan... says
Hi Odin, nice article. I love your detailed write ups about hosting, WP…
However, I need some help for the Speed Booster Pack plugin. How should the plugin be used?
A more detailed explanation will be excellent.
Keep up the good work.
Benjamin Knigge says
I’ll consider doing a separate write up about it. I haven’t made a post in nearly 2 months. I’m swamped with work and moving back to North America at the end of July from Europe. It’s really not extremely complicated though.
James Kallof says
What plugins are you currently using?
Benjamin Knigge says
Here’s what I have active but I may not actually be using them all.
Adminer,
AdRotate,
Akismet,
bbPress,
bbPress Genesis Extend,
Broken Link Checker,
CloudFlare,
CW Image Optimizer,
Genesis eNews Extended,
Genesis Footer Builder,
Google Analytics by Yoast,
Google Author Link,
iThemes Security,
Jetpack by WordPress.com,
MailPoet Newsletters,
openxwpwidget,
OptinMonster,
OptinMonster – Exit Intent Addon,
Regenerate Thumbnails,
Rel Nofollow Checkbox,
Search & Replace,
Share Buttons by AddToAny,
Speed Booster Pack,
TablePress,
TinyMCE Advanced,
Ultimate Nofollow,
W3 Total Cache,
WordPress HTTPS,
WP fail2ban,
WP User Avatar,
WP-DBManager,
wp-jquery-lightbox,
WP-Optimize,
Yoast SEO
Dennis Staal says
Wow that is a lot of plugins? How many do you think you use at the same time? Your website is quite fast, I tested it with http://gtmetrix.com and http://giftofspeed.com and you got pretty high scores. How do you maintain such good performance with so many plugins?
Benjamin Knigge says
I’m using memcached, nginx proxy cache, and cloudflare pro in front of it all. The number of plugins doesn’t have any effect on the cached page performance.
bradkgriffin says
Have you ever attempted to self host the GA js (and use cron to check for updates of course), that way GA reports still run through, but (FINALLY!!!) the ga script could be cached?
Benjamin Knigge says
If it was cached it could potentially distort the visitor count within analytics.
Jason says
I’m replying to this comment only because the leave a comment link wasn’t working. I found your site in a link in an answer on Quora. This was the first post and I had recently just optimized a site, so it caught my eye. I was using webpagetest.org in my testing so I went and ran the site through GT Metrix. It got a 99% and 89% which kind of surprised me since I didn’t do a lot of what you’re talking about. The 89% is for not using a CDN on the static files. But otherwise, it’s on shared hosting, Bluehost. I was actually thinking about switching away from them because all the testing seems to show they’re performance is lagging. The theme is just a modified child of twenty fourteen. I do use W3C Total Cache and Better WordPress Minify because W3C never seems to minify everything into a single file, and I did optimize the images. I also got dinged on the stupid GA.js file. I appreciate the write up for use in future projects, and just thought I’d share some alternative results.