A couple of days ago, we looked into how you can drive more web traffic to your WordPress website, so this isn’t it. We also ventured into starting your own freelance business with WordPress, so this isn’t that as well. In today’s post, we will not show you how to start a WordPress business or drive more traffic. Instead, we will take you through a step by step guide on setting up your WordPress site for when you finally hit the pot of gold as far as traffic goes. This we do in a bid to ascertain that your site doesn’t break when you start getting more and more visitors. Enjoy and don’t leave without sharing your thoughts in the comment section at the end.
Here’s a quick breakdown of this serving:
- How to prepare WordPress for high traffic
- Case study of high traffic WordPress sites and… What do they do to make good of the high numbers?
- Essential plugins and tools for high traffic WordPress Sites (Juicy)
- Acquiring WordPress traffic (uh-oh, we just said we won’t be going into traffic generation but just had to, because, well, we’re talking traffic)
How to Prepare Your WordPress Site for High Traffic
Out of the box, WordPress is built scalable, allowing it to adapt to any task, hard or simple, and/or any amount of traffic you throw at it. But there are a couple of considerations you have to keep in mind when scaling for more traffic to ensure your site is performing at its best. What are these considerations?
Processor & Memory Limitations
To have your WordPress site online, you need a capable web server. You need sufficient server resources to run your site without hassles. Two server resources you absolutely need are adequate processor power and memory. Now, high levels of traffic can be incredibly taxing to your web server, which in turn causes your site to slow down or break.
Which is exactly what we don’t want happening, especially when you’re receiving tens of millions of visits and page views. What to do? Firstly, ensure your web host has the server resources required to provide sufficient memory and processor power. And since WordPress runs on MySQL and PHP, make sure your host provides the latest stable versions of these platforms to create a favorable environment in which to run your WordPress site.
Speaking of MySQL, did you know you can rig your MySQL settings to permit many simultaneous database connections? Oh yeah you can. It’s called replication, which – among other things – ensures users won’t encounter the “connection timed out” error when accessing your busy site. On top of that, you can improve MySQL performance by proper indexing, and using query caching. Further, you can create a read-only slave of your master database in order to separate read requests from insert/update queries, which results in a faster and sturdier environment for your high traffic WordPress site.
But as a beginner, this might sound all too alien to you, which is why the Core WordPress team built the HyperDB plugin to help you out. If you’re one bit curious, HyperDB, “…is an advanced database class that supports replication, failover, load balancing and partitioning.” It’s the kind of solution you need when your traffic numbers start racking up. Moving on…
Some web hosts will allow you to exceed a pre-set transfer speed limit – something known as bursting data – when demand for yout content is high. Some servers are automatically configured to allow this service. Other web hosts will charge you for the service, while others don’t have the service at all. It’s your duty to check with your service provider.
Limit Graphics and WordPress Plugins
Let’s assume your WordPress site calls upon five graphics and four WordPress template files to create the design of your site. For 1,000 web visitors, these files will be loaded 9,000 times resulting in a huge demand on your site. WordPress plugins are called by your theme as well, and to function, they make queries to your database. This just means the more plugins you have, the more the database queries, and the heavier the activity on your server. What to do?
- Reduce the number of graphics needed to create the design of your WordPress site. You can do this by eliminating unnecessary graphics, and editing your style.css and template files.
- Turn off WordPress plugins that you can live without even if it’s for the few days you have a spike in traffic. Look into hard-coding some of the features you need directly into your theme.
Use a Content Delivery Network (CDN)
To avoid traffic overages (exceeding your allotted bandwidth) and maximize the performance of your WordPress site, you should consider using a content delivery network aka CDN. This way, your site’s files are served from a data center closest to the web visitor. This reduces load on your server significantly since copies of your files are stored on multiple data centers around the globe.
When there is a huge demand for your content, your server won’t be the absolute receiving end of the spike in traffic – CDN servers will act a shield. There are many pay-as-you-go CDN solutions out there, so you ought to set up in no time. If you have no idea where to start, we recommend CloudFlare (a personal favorite) and MaxCDN.
Upgrade to Better Web Hosting
Sure enough, shared web hosting is great for new blogs with low levels of traffic. This, however, will become a problem when your traffic increases to tens of thousands of views per day. If you’re currently on a shared hosting plan and you notice poor performance when you have traffic spikes, consider migrating to VPS. If you’re facing traffic problems with your VPS plan, migrate to a dedicated server and so on and so forth.
There are a couple of managed WordPress hosting companies out there that offer you great managed WordPress hosting packages. They include WPEngine, Flywheel and Media Temple among others. These companies provide a whole range of features from automatic updates and backups, CDN, caching layers, top-of-the-drawer security, dedicated infrastructure and great support among others. The prices may not be beginner-friendly, but for the peace of mind and the assortment of awesome features you get, they are worthy every single penny.
Use a Caching Plugin
A caching plugin could be the tool that saves your site from collapse when the number of visitors go up, up and up. How so? Glad you asked. A caching plugin usually creates HTML versions of your pages, which reduces the number of times WordPress needs to invoke PHP to serve pages. With a great caching plugin, you can increase the speed of your WordPress site, while shielding yourself from the negative effects of a downtime.
You want to go for a caching plugin that supports features such as page caching, database caching, CDN and minification just to mention a few. Great examples of awesome caching plugins include W3 Total Cache, Varnish Cache, and WP Super Cache among others.
Take Advantage of Service-Oriented Architecture
Most basic hosting plans will host your WordPress site and MySQL database on a single machine. Unfortunately, this kind of configuration favors not resiliency or site speed when your traffic spikes. What to do?
You can split your WordPress into multiple parts, and serve each separately. What does that even mean? (So sticky) By taking advantage of a service-oriented setup, you will take more load, run faster, and easily identify stress-points that need ironing out. Here’s an example of service-oriented architecture:
- MySQL database to host your master/slave WordPress database
- Nginx/Varnish proxy layer to handle all initial request from users
- Nginx/Apache2 web server to handle page rendering and site administration
- Image server or CDN to serve media files
Note, the above set up is just an illustration, yours may be different depending on your needs. With a great architecture in place, you can scale in/out any layer independently depending on your traffic levels. All the same, don’t sweat the details, if you don’t understand service-oriented architecture, please consult your web service provider for instructions on how to set up your design.
Case Study: High Traffic WordPress Sites
In this section, we will quickly look at some high traffic WordPress sites, and how they cope with high volumes of traffic. First, here’s the list of the candidates that made it to our case study today. Oh by the way, they pull the kind of stats that we only dream of:
- HotAir – 45+ million page views per month
- Digital Trends – 33+ million pages views each month
- Slashgear – 10+ million page views per month
- The Next Web – 8+ million page views a month
- iCulture.nl – 5.4+ million page views per month
Now, let’s see how they cope with huge amounts of traffic.
After only 48 hours of launching, Mark Jaquith – the developer behind HotAir – had to migrate the site to a new server. Guess he didn’t anticipate so much growth in such a short period. And in order to keep up with the growing traffic, Mark invested in a CDN to deliver static content, a proactive caching solution, and a load balancer with multiple web backends. HotAir uses VaultPress for backups (and so do we – it’s pretty awesome), Google Analytics for the dets, News beat, chart beat and WordPress stats (for more dets).
Digital Trends is no longer the baby it was at launch. With over 33 million pages views each month, it’s one of the fastest growing WP-powered site considering it started with about 1 million uniques per month. Here’s what Tom Willmot, the guy who brought us Digital Trends, has to say:
When I started work on the website, there were some pretty big performance sinks in the code base that needed ironing out…Coding well plus some persistent object caching are enough to begin with.
That’s right, clean your code kids. Moving on.
Unlike the other companies we are reviewing in this section, Slashgear had a scalability plan in place when they launched. Their plan was to grow their traffic by 30% each year. The only problem? Their plan did not account for sudden traffic spikes. You’re reading this part because their threshold was exceeded every time Apple made a huge announcement. The result? The site would struggle to keep up with the demand.
So how did Slashgear handle the upsurges? Firstly, they added Amazon EC2 to their infrastructure. They hosted the website over at SoftLayer, a dedicated cloud web host (much like Cloudways cloud hosting options). Then they adopted the Disqus comment system, which took the comment load off their servers. They have powerful caching in place, and advises you to use a trial-and-error method to set up your WordPress site.
The Next Web
The Next Web was launched when there were few large WordPress sites. As such, they weren’t really prepared for the sharp spike in traffic. All the same, they adapted and learned along the way. When the traffic shot up, Arjen Schat and Pablo Roman had to work fast. Went to work and found Memcached for heavy queries, Munin for monitoring and Varnish as a reverse proxy. They use W3 Total Cache and WPVarnish as well. (zing)
iCulture.nl started as iPhoneclub.nl on shared hosting but they were immediately kicked out because – high traffic. They moved to VPS hosting but were kicked out once again. So they moved to dedicated server and incorporated a CDN but that wouldn’t cut it. Finally, they settled on load-balanced servers and threw CDN to the mix.
With a service-oriented architecture, iCulture.nl has survived high traffic levels since November 2011 with zero hassles. They use tools such as W3 Total Cache, WP Widget Cache, Plugin Output Cache, Recent Posts, Recent Comments and Similar Posts, Clean Options and WordPress Sphinx search plugin. They’ve adopted a responsive design to cater to mobile visitors.
Essential Plugins + Tools for High Traffic WordPress Sites
We have sprinkled this post with quite a number of plugins, tools and solutions meant for high traffic WordPress sites. As such, this section will just summarize the resources you might want to utilize:
- High traffic compatible hosting solution (such as WPEngine, Cloudways, etc.)
- Improved website caching (with W3 Total Cache, WP Super Cache, Varnish Cache, Memcached and WP Widget Cache)
- Better comment management (Disqus
- CDN for improved performance (CloudFlare CDN & MaxCDN are both great)
- Frequent & reliable website backups (VaultPress, BackWPup, BackupBuddy etc.)
- Analytics & tracking tools (like Munin, WordPress Stats, and Google Analytics)
Obviously you don’t have to use any of these, but they are helpful tools and resources that can make managing a high traffic website much more, well, manageable.
Acquiring WordPress Traffic
Perhaps you are a beginner without much traffic. Perhaps you’re reading this post to prepare for scalability unlike most of the people in our case study. While it’s great to be prepared, best would be to build your WordPress-based business and learn along the way. That’s the best way to learn. After all, experience is the best teacher. For your business to flourish though, you’ll first need to get more traffic to your WordPress site. Here’s a quick word by Mike to keep your motivated:
Creating a high traffic WordPress site is not as complicated as many would have you believe. Sure, it takes a lot of testing, failing and starting all over again, but once you get the hang of it, you’ll regret why you didn’t start earlier. – Mike Wallagher, How to Promote Your Blog and Get More Traffic.
At the end of the day…
Surviving traffic spikes and/or running a high traffic WordPress site shouldn’t intimidate you. In essence, you should enjoy the high traffic, and work towards growing your business. How do you manage traffic on your WordPress site? Had problems related to high traffic on your WordPress site? Please share your experiences with us in the comment section below. Adios!