Friday, March 29, 2013

Making Wordpress Fast, Quickly

So, you decided to take the plunge and made a Wordpress site, then you loaded it up, and were like... holy crap this thing is slow! Y u no wordpress fast? MAKE IT FASTER RIGHT NOW!



The first step, was to find a host. I personally am using InMotionHosting.
Some other common hosts are HostGator, Bluehost, or Dreamhost. I've heard exceptional things about the latter 2. The former, while stable, is well... lacking in performance. I'll get to that in a minute. I've dealt with Hostgator, and they are pretty bad. InMotionHosting is very fast.

I used the coupon code 24DOLLARSOFF on InMotionHosting, combined with a 2 year discount, setting my monthly cost to 3.49 a month paid all upfront, or 83.76$ for 2 years.

There are many tools to WordPress fast, faster, faster than being fast (ice cold?) without really having to know what you're doing. I'll go over my favorites. There will be effort made to not make this too confusing.

SysAdmin XKCD

From XKCD.com

WP Super Cache: This is a personal favorite. This is very simple to use, far simpler than the popular (and terrible) W3 Total Cache, and very easy to setup. If you follow the recommended guidelines, you will have no issues.

  • Cache: This plugin is all about cache, and nothing else.It offers server, and browser caching. This allows your site to be accessed by slower connections. (Comcast Turtles?)


  • Preload: This allows you to recreate the cache on the server side on an interval. This makes your site load faster than anything else can muster, but does consume some CPU. I use 30 minutes.


  • GarbageCollection: This removes old cache data. If you use preload, like I do, I'd recommend setting it to daily at 4am collection, with 7200 second expires time.

Asynchronous Javascript: This particular plugin is actually not very well known, but it lowered my total page load time by more than 60%.

  • Configuration: None, it doesn't exist. Install and forget about it.


  • Speed! This plugin allows other code to run while JavaScript is still downloading it's assets. Once the assets are downloaded, it immediately completes the JavaScript, with no delay.

WP Minify: Another personal favorite.This minifies and combines JavaScript, CSS, and HTML without errors, unlike the popular W3 Total Cache. This makes the links shorter, which is faster to a computer.

  • Configuration: None required, optionally you can increase cache duration to reduce CPU load.

EWWW Image Optimizer: EWWW that sounds disgusting. This plugin allows re-compression and optimization of images.

When you acquire an image from someone (or some-tumblr), you don't know how bad or dirty the original compression is. You don't want some poor compression streetwalker that hangs on the corner hooking up with all the unnecessary data.

This allows you to auto optimize. Running this will do nothing but help your site, with no negative side effects.

  • Comes with JpegTran, OptiPNG, and Gifsicle


  • Can install PNGout with 3 click


  • Can convert PNG to JPEG, JPEG to PNG, and unanimated GIF to PNG


  • OptiPNG and PNGout have configurable settings


  • Bulk image optimizer (under media tab) to optimize already uploaded images

run_fast_determined1











Cloudflare Official Plugin: This is a free content delivery network.

  • This will take the strain off your server by allowing a network of other servers to deliver your content for you.


  • This does have the downside that every time anyone connects to you, they are redirected to Cloudflare, which has some negotiation time.


  • I'd only consider using Cloudflare on a slow, or otherwise overburdened server. My friend's server on HostGator got significantly faster, while my server on InMotionHosting got significantly slower.

So, how much of a difference does this actually make?
Lets take a quick look at Google PagespeedWordpress with WP Super Cache, Asynchronous JavaScript, WP Minify, And EWWW Image optimizer

The image above was taken with all of the above plugins, except Cloudflare.
This was taken in the middle of the day under peak load. At 3am, the times are about half that. The DOM time is roughly 0.4 seconds, while the page load time is 0.8 seconds.

Pagespeed Without Plugins
This image on the other hand was taken without plugins, as you can see, the performance is *significantly* worse. The DOM time is roughly 1.15 seconds, and the pageload time is approximately 1.4 seconds.

DOM Time: 1.15 second to 0.4 second is a 66% reduction
Pageload Time: 1.4 seconds to 0.80 seconds, which is a 42% reduction
That's a HUGE difference!
Imagine how bad that would be on a slow host!

Now you can start to see how easy this optimization stuff is!

No comments:

Post a Comment