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

To display a  single web page, many assets are often served, each of which is a separate request. These requests are responded to by the web server program (or ‘process’), that listens for requests and generates responses, returning them to the browser requesting them. Servers most often used in shared hosting, like Apache (and, less commonly LiteSpeed) are akin to Swiss-army-knives, in that they can do a bit of everything – they serve both [tooltip title=”Static assets” content=”Static assets: files that rarely change once a site is deployed” type=”classic”]’static’ assets[/tooltip] such as images, CSS that affect the style of the site, or JavaScript files that add interactivity, and they can call and return the dynamic parts of a site, the results of PHP scripts and database queries.

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.

Optimise Assets

Plugins like W3 Total Cache can also concatenate and optimise static resources like CSS & JavaScript. Concatenation combines many small files into just a few much larger files, which reduces the number of requests that browser must make in order to view each page. It can also reduce their size by stripping redundant information, a process called minification. Although these techniques offer good potential for improving shared hosting performance, some care must be taken as not all of them are compatible with all plugins and themes, leading to display glitches and script errors. Some testing is required in order to make sure they do not adversely affect user experience.

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.

A common means to improve performance is to remove Apache from the stack, and use a more efficient server. An example of this is NGINX – unlike Apache which is setup with a finite number of possible ‘slots’ for connections, NGINX uses a event-based queue system that can a handle a much higher number of concurrent connections. Unlike Apache, NGINX can be setup to aggressively cache dynamic pages, meaning that requests for URLs that have not changed are served without the pages having to be regenerated by PHP, offering a massive speedup. NGINX is also extremely efficient at handling static resources, the images, styles and JavaScripts that rarely ever change.

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.

instagram default popup image round
Follow Me
502k 100k 3 month ago
Share