How to Prepare Your WordPress Website for Sudden Spikes in Traffic?

Most of you must be familiar with messages like “Too many connections” or “Can’t connect to the server” or other such messages that indicate the website is under stress due to heavy traffic. This either leads to slow page loading speeds or a crash altogether.

As a webmaster and WordPress developer, I’ve dealt with this issue many times. Whether it is Black Friday, Cyber Monday or any other event involving huge traffic surge, the story is always the same. The websites which are unprepared to handle the ‘Traffic Tsunami’ come crashing down like a house of cards! Even hi-fi brands experience website outages on rush hours especially during festive seasons when discounts/offers galore.

So, how do you prepare your WordPress website for sudden spikes in traffic? Simple, you prepare! As your web developer cum hosting friend, I always remind my clients: you always need to be prepared for a sudden deluge of visitors on your website. Always! You never know when it may happen. Holiday season shoppers, Black Friday rage, a viral social media post, crazy offers on your products – anything can bring hordes of visitors come crashing to your website.

1. Optimize Images for Faster Page Speeds and Performance

In rush hours, pages containing heavy images/animation load even slower. Good image optimization delivers more results than tinkering with fonts and scripts. Here are the benefits of image optimization:

  • Page load speeds improve significantly
  • Small images need less bandwidth – Slow connections won’t matter
  • Beneficial for SEO since Google crawls through images faster
  • Small images need less storage space on servers

The aim of image optimization is to find the balance between viewable quality and lowest file size. The type of compression and file format are the two key factors.

Select the Right File Format

  • JPEG – Employs lossless and lossy compression. Quality and file size is adjustable.
  • PNG – File size is large and quality is high.
  • GIF – Perfect for animated images. Limited to 256 colors and offers only lossless compressions.

The next debate in image optimization hangs around ‘lossy’ vs. ‘lossless’ compression techniques. ‘Lossy’ eliminates some image data while reducing the size while ‘lossless’  compresses the data which has to be uncompressed before rendering. Some popular tools include ImageOptim, FileOptimizer, Photoshop, Afinity Photo etc. You can even use image optimization plugins such as Imagify, Short Pixel, WP Smush, Optimus etc. If you have less time to prepare for heavy traffic events, ensure that at least popular pages are well optimized.

2. Content Delivery Networks

Peak traffic hours put heavy stress on servers. Here, CDN comes to your rescue. Content Delivery Networks (CDN) delivers your web pages to the user based on their geographic location via the ‘Distributed Data Centers’ spread across the globe. Each data center comprises of ‘Caching Edge Servers’ and ‘Points of Presence’ that aim to reduce the site’s latency.

  • Significant speed improvements
  • Distributed servers instead of single server hosting
  • Lower bandwidth consumption
  • Protects your website from DDoS attack
  • Traffic load distribution between multiple servers
  • Higher uptime due to multiple data centers

The physical distance between the hosting server hosting and the user’s browsing location is a crucial factor during festive season traffic spikes. CDN stores a cached version of your website at multiple geographical locations on multiple servers. Your visitors are served the version nearest to them. This takes the load off from single server on rush hour.

3. Use a Robust and Scalable Hosting

Hosting plans can make or break your traffic spike management plans. While a CDN layer is essential, there are lots of other vital details while choosing hosting such as:

  • Fully managed and optimized servers
  • Easily scale up and scale down servers
  • Unlimited disk space (SSD) with high uptime
  • Nginx, HHVM, PHP7-FPM, Redis, MariaDB and Memcache availability
  • Unlimited websites and staging URLs
  • Fully managed 24/7 support
  • Pay as you go – You are charged only when you use a server
  • Security – 2-factor authorization, SSL certificates, HTTPS

Kinsta, WPEngine, Flywheel, StudioPress, Pantheon etc are some great options I recommend to my clients. Their business grade plans deliver more than enough juice to satisfy your thirst for heavy traffic.

Hosting Types and How They Affect Speed

When it comes to traffic spikes hosting server management becomes vital. Here’s a low down on hosting types and their effects on website’s speed.

  • Shared Hosting – Smart Choice for Beginners – This is for low traffic websites/blogs! Your website is hosted with several other websites on the same server. Though it is cheaper, don’t expect it to handle heavy traffic deluge. Sharing compromises on speed, CPU resources, RAM and ultimately speed. Think ‘bad neighbor’ effect and multiply it a hundred times!
  • VPS Hosting – Virtual Private Server is ideal for small to medium business owners expecting traffic spikes once in a while. A single physical server hosts multiple websites on separate virtual machines. Hardware resources are allocated evenly amongst the hosted websites and cluster website crashes are thus avoided.
  • Dedicated Hosting – Welcome to the Big League – It is highly recommended for heavy traffic websites. You are the ‘King’ in dedicated hosting as the whole server is available for you only. The security risks are minimal, scalability is theoretically infinite, customizations are limitless and flexibility is abundant. You get the idea!
  • Cloud Hosting – Most big brands use Cloud hosting to survive traffic Tsunamis. Basically, it is the VPS re-imagined where your website is in virtual machine but there is a network of hosting servers. Costs are low whilst offering dynamic development and scalable infrastructure.

4. Prevent DDoS Attacks

A massive DDoS attack is a stuff of nightmares. It can grind your entire business to a halt during rush hours. In festive season, it can mean millions of dollars in lost sales opportunity. DDoS stands for ‘Distributed Denial of Service’. In this attack, network service or connectivity is disrupted causing a denial of service to the users. Multiple malware-infected computers can be used to target a single system. Types of DDoS attacks include:

  • Volumetric attacks
  • Application layer attacks
  • Protocol attacks

For traffic spikes, you can prevent a DDoS attack by preparing a structured plan to secure your network infrastructure. Practice basic network security using bandwidth over provisioning complex passwords, anti-phishing methods and secure firewalls. Leverage the cloud framework for more bandwidth and diffused resources.

5. Load Testing Before the D-Day

Just as a bridge is tested for load before its inauguration, a website too can be exposed to heavy traffic for testing. Virtual traffic spikes are created for testing. The following KPIs are measured for real-time performance:

  • Response Time – Time to load a certain page
  • Resource Utilization – load on the hardware resources
  • Throughput – how many requests are being processed per second

You need to run the load test in incremental sequence to test the limits. Some popular tools for website heavy traffic load testing include Load Impact, Flood IO, LoadFocus, OctoPerf, Blazemeter etc.

6. Server Side Hosting Emergency Measures

Hosting service providers create packages keeping in mind heavy traffic scenarios. Ask the support team what solutions are in place for emergency heavy traffic. Features such as automatic scaling, hourly backups, cloud sharing, active monitoring can provide relief. Both dedicated hosting and VPS are ideal solutions but they require thorough configuration, setup, maintenance and, of course, deep pockets.

7. Update WordPress, Plugins and Themes

Updating WordPress to the latest version will take care of a lot of issues. There are built-in features, improved code, better security and smooth performance. Be careful while updating the theme since there can be bugs which require manual sorting. WordPress is managed by an active community which is a resource powerhouse in case you have to do it yourself. Also, upgrade to PHP 7 to make the most of latest features such as object oriented exceptions, syntax changes, spaceship operator and Easy User-land CSPRNG.

Plugins, however, are an all together different ball game. Only use limited plugins which are essential to your business’s functionality since they are resource-heavy and take a toll on your website’s speed. Undertake a plugin review every few months to weed out the problematic ones. Also, if a plugin is causing chronic slow speed, you should either update it install an alternative.

Step-by-Step Timeline to Prepare Your WordPress Website for Heavy Traffic

Are you anticipating an upcoming event where you expect loads of visitors on your website? If yes, then take this 1-week action plan to prep up your website for action!

Day 1 – Analyze

Know the current status of your website in terms of its traffic handling capabilities. Set a target near to the amount of traffic you are expecting. Use Google PageSpeed Insights to gather current page speeds and employ other tools to collect statistical data, version dates etc.

Day 2 – Update and Upgrade

Start by updating and upgrading the various currently installed features. Begin with WordPress, then update PHP and slowly move towards themes and plugins. Resolve any code issues you may have with sliders, plugins and payment carts. Plugins should be reviewed and alternatives installed in case they are not performing optimally.

Day 3 and 4 – Optimize Images, Fonts and Scripts

Image optimization can take a lot of time in case of eCommerce websites. Make batch processes to optimize the image. You can take two days and distribute your time between optimizing the fonts and scripts as well. Make sure all the images are visible decently after optimizing and don’t loose quality.

Day 5 – Server Side Measures and Security Checks

Check for the available server resources in your plan. Also, confirm the security measures offered in your hosting plan. Sync the timings of the support staff in case they are not available 24/7. Check the scalability of your server plan with the host and scale to the optimum capacity.

Day 6 – Load Testing

Once everything is in place, you should undertake load testing. Make sure the website is tested to a load near the anticipated traffic figure to get a real world idea about whether the website can take it. In case it breaks down, think of upgrading the hosting plan. Changing the host at this point will only aggravate your problems.

Day 7 – Wrap Up

Its last day and you should wrap up the preparations. Collect new data on improved speed figures, load testing data and correlate with previous figures. Notice the improvements and get set for the traffic day.

The Bottom Line

Don’t be afraid of the deluge. If you own an eStore, this is the day you were waiting for. Traffic, if handled successfully, can mean a year’s worth of sales in a few hours. Remember the above tips and I promise you will pat yourself on the back for preparing early on.

[FREE eBook Download]

7-Point Checklist for Outsourcing Design to Code Projects Profitably & Painlessly

Outsource your design conversion projects to your development partners, the right way and get exceptional quality website code delivered on-time and within your budget WITHOUT going through the pain of inaccurate conversions, countless revisions and missed deadlines.

checklist-image-website

Leave a Comment

Your email address will not be published. Required fields are marked *