Prepare WordPress for a Traffic Surge
When anticipating a large traffic burst on your site, it can be difficult to measure how your site will perform when under pressure. There are a number of factors which can determine your success through the surge of traffic, but the main area to focus on is the overall cacheability of your site. The more cacheable your site is, the easier it is for the server to serve each page request. This means the site can scale to support more traffic at once.
Cache and Site Performance
At WP Engine, we use several layers of caching to help improve your site’s performance. Caching works by storing a static “copy” of each page that is requested and built by the server, to serve out to other visitors of the site as they come in. By default, WP Engine’s page caching layer is purged every 10 minutes. This means the server doesn’t have to build each page as “new” each time a visitor requests it. Caching offloads a lot of the work the server would normally have to go through to generate each request on your site, meaning it can handle more page requests simultaneously.
By default, WP Engine’s page caching layer is purged every 10 minutes. This means the server doesn’t have to build each page as “new” each time a visitor requests it. Caching offloads a lot of the work the server would normally have to go through to generate each request on your site, meaning it can handle more page requests simultaneously.
Though we try our best to cache anything and everything, there are still a handful of page requests that we aren’t able to cache:
- Activity in the WordPress Admin Dashboard
- POST requests (requests to “update” information rather than just a GET request, which requests existing information – a common example is
- Cart/Checkout pages
- Pages setting a cookie with “wordpress_” in the name
- Login pages
- Staging sites
- Pages which haven’t been requested in the last 10 minutes
These requests are sent to the server and skip our caching layer, meaning the server has to create each page request as though it were new. With that in mind, if there are too many simultaneous uncached requests on the server, your site may run into scalability issues since this may mean the stress of building each uncached page request may push the server beyond what it is able to handle, and result in errors. It’s important to keep uncached requests to a minimum to make your site as scalable as possible.
Object Cache for Query Performance
WP Engine also offers Object Caching for all plan levels. This level of caching specifically caches repeated query results, for queries sent to the database. With WordPress, each uncached page request has to be built using PHP code and queries sent to the database to gather the page’s information (title, content, category). By using Object Caching, this stores the results of those queries in cache, which frees up a lot of server processing time so it can handle more concurrent requests. Object Caching can be enabled from the User Portal under Utilities. Read our Object Caching article for more information.
Use CDN for Global Performance
When preparing for an influx of traffic, it’s important to gather a bit of information about your site first:
- Run a Page Performance test within your User Portal to see your cacheability rating and the recommendations for improving the rating if needed.
- Assess the situation: Do you know about how much traffic you’re expecting? Do you have an estimate of concurrent users you expect to see? Is all the traffic directed to a specific page? Does it require users to be logged in?
- Contact us via chat (this can be done via the User Portal, or from the Plans page) and ask for your Account Manager. Your Account Manager can help assess what kind of server solution your site would need to hold up against the amount of traffic you’re anticipating, based on the cacheability and type of traffic. If needed, we can help migrate your site to a new server environment that will support the amount of traffic you’re expecting to see, to ensure that all goes smoothly.