Everybody wants Oprah to feature their website. But when your content hits a 10x traffic spike and you max out your server’s resources, your site could go down – at precisely the wrong time. Slow hosting mean less traffic, and none of that matters if the server crashes. So, let’s talk about how to make WordPress crazy-fast and scalable.
First, I’ll cover ways to see a speed increase today. And if you skip to the end, I’ll explain how you can predict an onslaught of new traffic…You may be surprised by the answer.
Ok, in a nutshell, decreasing page load times comes in two basic flavors: lower the amount of content loaded on each page, or optimize resources to load content faster.
Offloading Content Delivery with a CDN
A CDN is conceptually like bittorrenting your WordPress: instead of one server in one location sending everything, dozens of servers spread across the globe share the data load; and content is served to site visitors from the closest edge server to their location. There are many options for CDN, but an easy one that works whether you use WordPress or not is www.cloudflare.com
Cache Static Content
There are literally dozens of plugins that you can use for your site, and will shave 100s of milliseconds from page load times. Caching will store static content, like your logo and HTML that doesn’t change, between your browser and the server so that the server doesn’t have to call the same content over and over. This is critical when traffic does a 10x, and the Apache servers start running out of threads. Additionally, on the server side the most commonly requested static content can be cached in super fast storage so it’s readily available to serve out to site visitors.
Load less JavaScript
Each Javascript file you remove can make pages load 100 to 300 ms faster (sometimes more). Just remove three scripts and your site could load a second faster. If you know what you’re doing, it’s a great idea to go through the code on a JavaScript hunt.
An even better option is using asynchronous Javascript, so that one slow script won’t stop the rest of the site from loading. Google Analytics and other leading ad networks offer asynchronous alternatives that you can switch out.
Crunch Images
Spend a few hours using SmushIT, a lossless compression engine, and upload the smaller, but still high res images, your server and overwrite the older, larger files you had. WP Engine actually does this automatically, but if you’ve got a few hours to spend, this may save your content a second or two of page load time.
Ok, now it’s the good stuff…
How to Predict a Ton of Traffic
You can’t.
Sorry for leading you on. I was talking with our founder Jason Cohen about this over email, and asked him how to predict high traffic. Ever colorful, he replied back, “You can’t predict the Spanish Inquisition!”
Links spread instantly with a retweet and you literally have NO ability to predict those actions. Best case scenario, you have a few days advance warning that TechCrunch is going to feature you, but then you have to go do all those things we talked about. And once the traffic hits, you’ll have to monitor everything to make sure nothing weird happens.
Even if you DIY really well, and have built your own Linux servers since 1991, it’s hard to be an expert at everything. WP Engine outsources site security to the best in the business. They are the best, so we let them handle it. It allows us to focus on being amazing at WordPress hosting, which includes caching your content, CDNs, automatically removing all that JavaScript, and on.
Those are all things that you can take care of yourself, and there are some great tools out there. But we’re here because we want to take care of it all for you.
If you’ve got questions about making your site faster, you can test your site at http://wpengine.com/speed/. You’ll automatically get a handful of emails going into glorious nerdy detail to increase your page load time.
I’m glad you guys handle all this technical stuff for speed and security because its a very specialized area that NOT many people really understand.
I do however understand how to complete different site speed tests using different tools and have written about this several times on my blog.
Its very clear that site speed effects page views.
My tests showed page views can be down by a minimum 20% when a sites pages are loading slowly.
Pingdom and other tools only give you the result at the time you test your site.
If you check Google Analytics average site speed which Google uses, you’ll get the real figures on what your average site speed really is.
If its above 5 seconds, you have losing pageviews