Speeding up Wordpress

by adam on November 24, 2009

Once your wordpress blog starts getting traffic besides your mom and cousins you will likely have to start taking measures to reduce it’s cpu footprint.

Note: Some of these methods will work on a shared host without root access, but ssh is required for some methods, like installing memcached.

Step 1: Offload Images to Amazon S3

Images generally make up a large percentage of the total page load (up to 50%, see below). By using Amazon S3 as a CDN, you can save on bandwidth costs with your host and speed up your page load times significantly.

graphs

Graph taken from the YSlow firefox plugin, a great tool to help diagnose page load performance issues.

Costs for S3 are reasonable, but can add up if you are hosting large files. Below is a report of costs for the first 10 hours of a blog that I run. Most requests are for a single image (2k in size) loaded externally.

aws

Tantan S3 is a great plugin for wordpress that links your Amazon S3 account to your wordpress blog. You can configure it such that your media uploads are sent to your S3 “bucket” on upload.

Another useful tool is S3Fox, a plugin for firefox that you can use to manage and sync files in your S3 account through your browser. You will need your S3 security credentials to set it up.

Step 2: Apache Tuning

Edit your .htaccess file to set expire headers on static files

#Expire Header
<FilesMatch "\.(ico|jpg|jpeg|png|gif|js|css|swf)$">
ExpiresDefault "access plus 2 hours"
FileETag none
</FilesMatch>

Step 3: Configure some kind of caching

For many smaller wordpress blogs WP Super Cache and other MySQL performance tuning measures will suffice, but if you still aren’t seeing much improvement, you may want to consider a more heavy duty option.

memchached

Installing Memcached on a MediaTemple DV (3.5) (requires root access)

In conjunction with Batcache Manager, you should see a real boost in performance.

Step 4: Sit back, relax and enjoy your speedy new blog

Further Reading:

3 comments

Every Amazon S3 related blog gives you an impression that there is only one Amazon S3 client available – S3 fox. However there are many more freeware clients which are much superior. For instance, S3HUB for Mac (http://s3hub.com) and CloudBerry Explorer for Windows (http://s3explorer.cloudberrylab.com/) .

by Andy on November 25, 2009 at 2:12 am. #

wordpress is the best blogging platform ever*’”

by LED Torch  on October 13, 2010 at 9:37 pm. #

Good post and straight to the point. I am not sure if this is actually the best place to ask but do you people have any thoughts on where to hire some professional writers? Thx :)

by Mariette Dockter on December 30, 2010 at 5:48 am. #

Leave your comment

Required.

Required. Not published.

If you have one.