There’re several popular blogging software packages on the Internet. Examples of blogging software are Blogger (hosted by Google), WordPress and Moveable Type. Out of all the blogging software available, WordPress is perhaps the most quintessential platform of them all. If you’ve a domain name and a web hosting account, most likely you would install WordPress if you do choose to blog. It’s now a robust, bug-free and feature-rich tool which boasts millions of users around the world. For some, the WordPress used is hosted by wordpress.com which reduces the need to configure the software for optimum performance on the part of the users. However, this article is not targeted at this group of users; this article is about optimising WordPress for DIY users with our own installations.
While WordPress is a great piece of work per se, the default installation has a huge weakness, i.e. it’s not scalable to a large number of concurrent users. Even if you are a small-time blogger, you still have to cater to the small chance that your blog might just suddenly get popular. Consider this scenario, what if your tiny space on the web should of all likelihood have its URL appear on the front page of The Straits Times or a popular web site such as Digg or Slashdot. Hundreds and possibly thousands of netizen could concurrently land on your web site simultaneously slamming on your WordPress engine hard and fast. Although WordPress is widely installed, the default setup couldn’t withstand such load. Your web site might crash and become inaccessible. The crux of it is, your blog fails to load just when it’s most need and read. If hosted on a shared web host, it could bring down other web sites as well. Depending on the circumstances and the policy of the web hosting company, the company might request you the webmaster to leave or perhaps buy a more powerful hosting package.
The culprit of the matter is that WordPress dynamically generates its pages. Every time someone loads a page from your website, WordPress has to regenerate the page by fetching the contents from the database. While this approach has its merits, it’s computationally expensive. In contrast to WordPress, 2 other less popular software packages – Blogger and Moveable Type create static pages, i.e. the pages are prepared in advance during creation and are served as is without much calculation. It’s of no coincidence that popular websites such as barackobama.com and britneyspears.com would choose software such as Moveable Type.
However, all is not lost, I would like to recommend 2 approaches, one hardware-, one software-based solutions to enhance the scalability of WordPress. With proper setup, WordPress can be as fast and scalable as Blogger or Moveable Type.
When it comes to hardware, I’m not recommending moving from shared hosting to an expensive VPS (virtual private server) or dedicated hosting although that is certainly possible. The main hinderer of this approach is cost – you pay something for nothing. Most of the time, your blog sits idle on an expensive machine doing nothing much. This is not a viable approach unless you already own a popular WordPress blog. There’s no point providing capacity for perhaps the most remote spike in traffic.
A better approach is to use a shared web host that is scalable and can expand its capacity in an elastic way to accommodate sudden increase in volume. Alas, time has changed and technology has improved – cloud computing has come to the rescue of WordPress bloggers and other compute bound applications. In cloud computing, clusters of servers are load balanced and work together to form a logical unit to serve your web sites. That way, your shared hosting account together with other hosting accounts live on aggregate a much larger computing unit spread across many computers. If there is a sudden increase in demand of computation power, the increase will be spread over many servers instead of overloading a single PC.
As of this writing, there are several cloud-computing shared web hosts. 2 of American web hosts are http://godaddy.com and http://mediatemple.net . These hosting solutions offer scalable hosting with only a slight premium on cost. If you prefer something closer home (I mean Singapore), there’s http://hostsg.com .
Besides the hardware solution, there’s the software way. The software-based approach is to use WordPress caching. A WordPress cache will store static files on disk that is derived from the web pages and then serve future page requests from the static files on the disk. This makes the system much faster and more responsive to the users. From the user perspective, there’s no change in the feature of the WordPress blog other than a speed improvement. The blog still behaves like it’s dynamic – new posts and comments still get updated as and when they’re posted to the website.
Currently, to enable WordPress caching, you need to install a plugin that does just that. 2 popular plugins are WP Super Cache and W3 Total Cache. With proper configuration, the plugins should increase your website’s capacity several times. A share-hosting account with caching properly configured should perform just as well as a dedicated machine with no caching. Installation is pretty simple and straightforward. Just follow the installation guide gotten from the web and you’re done with it.
The 2 broad approaches toward optimising WordPress are ways to improve the scalability by an order of magnitude. Although you might find other means to improve performance of your blog, these tend to be incremental. Do attempt the 2 approaches if you have a WordPress blog!