WordPress: 10 tips for high speed performance

More and more companies are using WordPress for their website development. Although I tried to search for tuning tips to speed up WordPress, all I found was sites that introduced plug-ins. So I have summarized tuning methods by myself.

Web server

A light-weigh server, nginx, could be an option but I will continue on the premise that you use Apache, the de facto standard.

Cache intermediate data

PHP is a language of which the execution speed is rather slow, however you can speed it up by caching intermediate data which is created at runtime. You can find various options – eAccelarator, APC, XCache, etc. – my recommendation is APC because the settings are easy and I think it will be the most effective among them.
>> How to install APC
>> Benchmark results for WordPress2.9 with APC

Enable mod_deflate to reduce transfer data

Enable the Apache module mod_deflate to compress http responses by gzip. It can reduce transfer data and you may then feel the system is a bit faster.
>>how to set mod_deflate

Tune-up httpd.conf in Apache configuration

You will need to fine-tune as you see how your website runs. This site is a good reference to get the picture.
>>httpd.confによるWebサーバの最適化 (Japanese only)

Tune-up your database server

I will introduce the following tips based on an assumption that you use MySQL.

Storage – Using a SSD or Striping HDDs

In most cases, the bottleneck of WordPress comes from the storage part, so if you replace a HDD with a SSD (e.g., Intel SSD), you can expect a faster loading time. Other than that, if you can afford to install multiple HDDs, that will be also good for high-speed performance, yet costly. >>SSD+RAID0で究極の高速を達成!(Japanese only)

Tune-up my.cnf

WordPress uses MyISAM as a storage engine for MySQL.  If you adjust the settings related to this part, most of which are to do with cache, you can improve performance of your database. First off, check and configure the settings of query_cache and key_buffer and you will see a significant change in speed. If you are building a blog site, I recommend query_cache be set to a high value.
>> MYSQL Tune up for high performance
>> MySQL performance tips

Tune-up WordPress itself

Install cache plug-ins

It is a very common method but installing cache plug-ins (e.g., SuperCache) can reduce the number of MySQL reading times, leading to high-speed processing. However plug-ins can often conflict each other and cause a bug. In that case, uninstall the plug-ins.
>>WordPressのキャッシュプラグイン8種類ベンチマーク (Japanese only)

Modify Coding in WordPress

You can use a compiler like HipHop, which transforms PHP source code into C++, but you need to compile each time the plug-in setting changes. My environment with HipHop has passed a benchmark test, but failed to load WordPress.
>>Facebook を 1.8 倍速に、WordPress を 2.7 倍速にする、HipHop とは ? (Japanese only)

Optimize themes(html/css/js etc.)

Optimizing css or js description can help dramatically speed up loading pages. Firebug and YSlow are useful tools to analyze and improve page description. Refer to High Performance Web Sites: Essential Knowledge for Frontend Engineers for details.

Tune-up your network

Use a CDN

Caching content is an easy way to speed up loading time for blog browsing. Using a CDN like Akamai can improve speed performance. >>Find your best CDN service

Use a reverse proxy server (to cache HTML code)

Setting up a reverse proxy server is a method that attempts to reduce the number of requests to the web server. Sending less requests to the web server, of course, reduces load on MySQL, and thus results in performance gains on the whole.
>> How to make reverse proxy

Technically, the WordPress web server returns “last-modified” almost only for Atom and images. Caching these data for other pages can bring about significantly better performance. This plug-in could help, but it appears to involve manual modification of pages.

The validity date of cached data is not determined by the reverse proxy server itself but the web server. You have to be careful about the settings because cookie is often used in WordPress, for example, for entry pages. Too much dependence on caching can stop multi-language plug-ins that use cookie. Another thing you should bear in mind is the case where caching may not work well for images browsed by those who use a minor browser when “Vary: User-Agent” is set for image representation, in other words, the image data is cached for each different user-agent.


Of all the methods I have introduced to you, what had an outstanding effect were using a SSD, enabling query_cache in mySQL configuration, and installing SuperCache. Assuming most WordPress databases are not large, I would recommend most that the HDD of your database server should be replaced with a SSD.

This post is also available in other languages.