Steps on How to Optimize your site when you get High Traffic
It's called the Slashdot effect. Here's some steps to help you keep your site up.
I mean it. If you notice you're starting to get a high amount of traffic, be ready to follow this steps quickly.
1. W3 Total Cache
2. Remove items from your Theme
You should have a second version of some of your theme files. The single.php, sidebar.php and footer.php (or even more, depending on the theme).
This v2 of your files should be clean of anything but the content. Remove all the widgets, sidebars and footer items.
Focus on the content. Show what the visitors are coming to see, the content.
Removing all of those extra things you will decrease the number of requests to the server.
3. Learn from it
Analyze your data. Check your statistics and decide if you need to upgrade your hosting.
Here some points to think about:
- Is my server going down when the High Traffic happens?
- How many times does my site gets High Traffic?
- How much am I paying not for my hosting?
- How much would cost an upgrade?
Even with all the Cache thing you think the server is going to crash you can do one last try.
Create an HTML of your requested page and create a temporary redirect to it with the htaccess file:
RewriteEngine on Redirect 302 /my-post /my-post.html