Hosting and Maintaining WordPress
One of the great things about WordPress, the world’s most popular content management system, is the ease with which it can be hosted. The underlying technologies that it uses are among the most commonly offered by hosting providers, and the ease with which it can be deployed is one of the things that drives its popularity.
This also give you, as the site owner, a myriad of options for choosing a company to host with. Most companies offering hosting will offer a range of plans, and many of those plans appear very similar. This has lead to a race-to-the-bottom in terms of hosting costs, which often makes it tempting to just choose the cheapest provider.
Here’s a comparison of a few of the different types of hosting, and what they may mean for the performance of your WordPress site:
Classic Shared Hosting
This is usually marketed as ‘cPanel’ hosting. 95% of the time, the ‘stack’ of software that the site is based on is a variation on LAMP. To break the acronym down, Linux is the operating system, Apache the webserver, MySQL the database, and PHP the scripting language that provides the site’s ‘smarts’.
When you buy shared hosting like this, you have little to no idea as to how many other sites there are hosted on the server. You have purchased a small slice of the total performance available on the server, but behind the scenes, your account is in a fight to the death for resources against other accounts and other customers.
The package you buy may offer the chance to host ‘subdomains’ or ‘add-on domains’ – this gives you the chance to host multiple sites under a single account, which at a glance seems attractive, but those sites will actually have to share, among themselves the single slice of resources that your account has been allocated. As such, expect performance, in terms of responsiveness, to suffer.
Things that can improve WordPress on shared hosting.
Chose a better PHP version
The first thing you can check is the version of PHP you are using. Shared hosting accounts often offer a choice of the version of PHP that you’re using. They often default to an earlier, but more compatible version. More recent version of PHP (5.6 or 7) offer substantial performance improvements, and can be selected via the ‘PHP Selector’ in the cPanel interface.
Almost all PHP scripts that operate inside WordPress are (or by now should be) compatible with these versions of PHP.
Bypass your hosting – use a Content Distribution Network
One way that you can improve things is to reduce the number of requests Apache must deal with, by serving the static assets from somewhere else, to leave Apache to just serve the dynamic (PHP) parts of the site. WordPress caching plugins like W3 Total Cache allow you to serve these assets from a [tooltip title=”Content Distribution Network” content=”Content Distribution Network: a series of 3rd-party servers designed to speed up serving of your static assets” type=”classic”]CDN[/tooltip] such as MaxCDN or Amazon’s CloudFront. For sites that do not attract a lot of traffic, Cloud Front’s pay-as-you-go pricing is attractive, as it is based only on the amount of data served, but it’s not a one-click setup.
Beyond shared hosting- tuned hosting for WordPress
If you are concerned with getting the best possible performance of WordPress, finding a hosting provider who offers a hosting stack that is optimised to serve it will pay big dividends. For instance, if you are selling online via an eCommerce store, then you can easily quantify the value of good quality hosting in terms of a faster user experience leading to less customer frustration, less ‘drop-offs’ on the path to purchase, and improved numbers of sales or leads.
The way in which PHP is run can also radically improve performance. As a scripting language, PHP is usually read from disk as a series of text files, interpreted into a form that can be ‘run’ and then executed. WordPress uses a large number of different PHP files to serve a request. Although all systems cache to a certain extent (like recently accessed files), systems like OpCode caching, that store the interpreted PHP in memory, improve execution times massively. The trade off is that they require more memory, something which is in short supply on shared hosting.
Setting up and tuning a stack like this, is, realistically, not for mortals. If you have a the skills then you can get great performance out of a cheap server but you have to know what you’re doing, and if you’re planning to host multiple sites, then a VPS is not a practical solution unless you know exactly how to set it up.
Finding a provider who combines the ease of management of cPanel with the massive performance gains associated with servers like NGINX is rare. Here at We Push Buttons, we employ GnuSys’ excellent XtendWeb plugin for cPanel to improve the performance of our premium VPS by using NGNIX, caching, and application specific templates to take the hassle out of tuning WordPress serving, as well as other types of web applications. Our maintenance packages also include patching of WordPress and plugins, security monitoring, and backups for disaster recovery.