hide

Read Next

How to Configure a Lightning Fast WordPress Website

On Zach Browne

This configuration is fairly thorough, meaning it covers most of your speed and security requirements, but I'm wide open to comments on how to improve it. I realize it's not 100% perfect, but I can assure you that it will make your WordPress Installation secure enough to fend off most hack attackes and lightning fast.

I'm not going to get into the details of why this is a great configuration, I'll do that in a different blog post. But I will say that if you're familiar with Apache, but want the speed and SEO benefits Nginx will offer, this is a great configuration.

Make sure you have your server's hostname established as well as a static IP before you attempt this tutorial.

Issue the following commands to configure your server. Update and upgrade server.

Install everything you can from the repositories.

Guide to WordPress Cache Management

On Zach Browne

If you’ve ever seen a Slashdotted, Dugg, or Fireballed site suddenly fail to respond, you’ve witnessed the consequences of insufficient caching. A dynamic site has to query the database several times to assemble each page a visitor requests. Queries for a typical WordPress page include the bloginfo() options (site title, description, language, theme stylesheet URL), the post or page title and contents, the comments, and the sidebar widgets. If you’re using multiple Loops, you’re using even more queries. Servers can generally handle all those MySQL queries and PHP page-building functions for sites with low traffic, but when your site gets its fifteen minutes of fame—or gets hit with a denial of service attack—your server will probably buckle under the sudden demand.

The solution is to cache the assembled pages—that is, to store copies as static files in a hidden directory and to redirect incoming visitors to those copies rather than allow them to continually hammer your dynamic site. Not only does this speed things up for your visitors, but if you’re on a shared hosting server, it will prevent you from exceeding your allotted CPU usage. Some hosts are nice about helping you keep the site up and running when that happens; others will just shut down your site to protect the other users on the server. WordPress does not come with built-in caching. (This is perhaps the biggest criticism leveled at the WordPress project by users of other open-source content management systems). It does come with support for a number of different caching options, and it’s up to you to decide which plugin best suits your needs and your hosting environment.

Cache plugins available at WordPress Extend include:

WordPress is a Content Management System, which by its very definition means it creates a dynamically driven site. In today’s technology environment that essentially means that the managed content and all of its meta data is stored in a database. Every page request has to access the database to determine which content to be displayed, versus simply fetching HTML files from the web server’s local directory. The trade-off in handing over content management to a database is that you are going to take a speed hit in the individual page access in exchange for more powerful persistence, selection and organization tools – those features used within the WordPress Core. Basic computer science comes into play here: when you introduce a new abstraction layer that’s slower than the layer above it, you typically introduce a caching mechanism as well to improve average access times.

It helps to think of caching in a sequence of access methods, starting closest to the user and working back to the MySQL database. Each point in the sequence has some caching and tuning that can be done; however, like all performance tuning work, your mileage varies depending upon the access patterns, content types, and actual workload moving through that point in the system. Here is our view of the WordPress caching hierarchy that I'll walk through:

Rendering New Theme...