PhpRiot
News Archive
PhpRiot Newsletter
Your Email Address:

More information

How to make WordPress faster without the use of a plugin

Note: This article was originally published at Planet PHP on 14 December 2010.
Planet PHP

When it comes to web page load time, she should always say aowow, that was fasta.

Webpage load time is getting more and more important these days, if you go into Google Webmaster Tools, you'll see aoSite Performancea under the labs link. This is a very good indicator of what Google thinks how fast your site is compared to the rest of the internet. As you can see from the graph, your site should load in less than 1.5 seconds. According to Google, this site is faster than 63% of the websites on the internet. At one point, we were faster, but then we went plugin crazy and got slower.. we're working on making things fast again.

Here's what we're doing:

1. Use Mod Pagespeed . This is by far, the most bang for our buck. I've timed subsequent reloads of our page to less than 1 second now. Using this module, I can compress images, resize images, minify html, css, and javascript. I can even combine multiple css/js files into one.

2. Switch MySQL tables to InnoDB. But, only do this if the number of comments versus posts is disproportionate. Switching to InnodB prevents full table locks.

3. Turn on the MySQL query cache. Whenever possible, let the server do the caching, rather than a plugin.

4. Setup a reverse proxy using nginx (EngineX). This works great as you may still need multiple heads, and nginx gives you the best bang for the buck when it comes to reverse proxy/load balancing.

5. Setup your reverse proxy to serve certain assets via a static cache, this speeds up your load balancer even more, as it doesn't need to go back to apache.

6. Setup your static cache to be in memory using tmpfs.

7. Use APC (this is a no brainer, but just in case, you forgot).

I'll have more detailed posts along these topics in the coming weeks, I wanted to know what other methods you are using, before using the caching plugin du jour.

Caveat: Mod-Pagespeed is beta, it may eat your files, or kill puppies, don't use it until you've tested it very very well.