Successfully Running a CMS on Shared Hosting

Shared servers have become one of the most popular solutions for care-free web hosting, and these days are often used for CMS based sites (Drupal, Joomla, etc.). However, you may find that, before too long, this low-cost hosting solution causes your CMS-powered site more trouble than it solves. Read on for our top tips on using shared hosting for your Drupal or Joomla website.

The truth about shared hosting environments, is that while they certainly won’t put a dent in your pocket, they are simply not well-tuned for reasonable CMS performance.

As you will know by now, content management systems make use of a database, most commonly MySQL or PostgreSQL, to store and access data. Your pages, content, users and other such information are stored in the database. Each time a page is loaded, the CMS makes a request, or sometimes multiple requests, to the database to retrieve and serve the content. For some websites, this performance drawback may be manageable, or even unnoticeable, particularly if your number of concurrent visitors is low. But as you can imagine, as your website and visitor base grows, the number of database requests made on a frequent basis is very likely to increase.

In a shared hosting environment, frequent and resource-intensive database use can often slow sites down as the shared server setup is unable to deal with such a high number of requests. And as many have found out, one of the nasty byproducts of shared hosting is that many companies are in a habit of frequently kicking off users if they deem their resource usage to be abusive.

And “abusive” is a really broad term; if you’re using a CMS you are at heightened risk of being called-out for abusing any shared hosting service. This may take the form of a CMS, such as Drupal or Joomla, making an unusually high or frequent number of database connections. And this could happen for any reason — a spike in visitors after sending out an email newsletter on a Saturday afternoon, for instance. In a worst case scenario, your site may begin to throw strange errors, return blank pages, or become incredibly slow and irresponsive. And that’s before the web host contacts you about your “abusive” use.

The fact is that most shared hosting environments are not aptly configured for resource-intensive use, and sites powered by a CMS are at particular risk of this. The desired hosting solution for any CMS-based website is going to be leaning more toward something like VPS or cloud hosting. Each website is unique, and us such it would be ideal to tune the server and its software to suit the needs of the site in question, with help of your web host or a system administrator, if at all possible. However, there are options available for those who wish to stick with their shared hosting solution for a little longer, and we will highlight each of these factors in this blog post.

Since resource intensive database use is one of the main culprits of less-than-desirable CMS performance on shared hosting services, this is a good place to focus your initial optimization efforts.

The goal is to reduce the number of requests made to the database, but reducing the number of overall requests made to the server will be a great feat as well.

1. Utilise default caching options

Both Drupal and Joomla include default caching options which can be utilised to reduce the number of requests made to both the database and the server filesystem. These default caching options work in two ways.

  1. Caching your content for anonymous users
  2. Compressing the files served by your website (i.e. the CSS and Javascript files that make up your theme or template)

By compressing/reducing the number of files served, and by caching your site’s pages and content, the number of requests made to the server is instantly reduced. These caching options can also be configured to make better use of browser caching, which speeds up load times for the user, and prevents them from making multiple connections to the database when loading pages multiple times.

2. Employ the use of third party caching options

There are a number of great third-party caching tools available for both Drupal and Joomla. These can be utilised alongside the default caching options to further enhance your site’s caching and compression mechanisms. We recommend Boost for Drupal, and JCH Optimize for Joomla.

3. Use a CDN to reduce overall requests to the server

CDNs, or Content Delivery Networks, are powerful caching networks, usually made up of multiple interconnected server points across the globe (usually referred to as edge points or nodes), which can aggressively cache your site pages and content. At the very least, the CDN can serve your site’s media (like images, CSS and JS files), rather than the host server, which dramatically reduces the number of requests made to the host server.

There are lots of CDN plugins for Joomla and Drupal available, and it will be up to you to make the right choice for your site and configuration. We’ll follow this up with our suggestions in a later blog post.

4. Disable user registration and comments if unneeded

If needed, install a CAPTCHA extension or a similar utility to reduce requests made by spam bots. Bogus registrations and spam comments create additional load on the server because they potentially involve multiple database requests. If these faux users or comments are only to be removed later, it’s in your best interest to install a CAPTCHA plugin or spam bot control plugin to lessen the number of bogus registrations and connections. Bots can act as a performance leech on shared server resources.

5. Optimize and hone your site content

By disabling and removing stale content and unneeded plugins/extensions, you are going to in-turn reduce the overall load on the server. Not only can unused plugins act as security risks, they can consume file space and consume unnecessary server resources — the unused plugin’s files and data is loaded each time the CMS checks for updates, whenever you load information in the backend, when cron is run, etc.

Start by making good theme choices

A lot of hassle can be avoided by simply making better theme/template choices. If you choose heavily-bloated themes, which are not utilising performance best practises, you are at risk of inadvertently fostering problems in the future, such as memory leaks and resource-intensive page loads, which will not only increase your hosting bill, but will harm your user base. Users may experience trouble loading your website, particularly from mobile devices, which now claim a whopping 51% of all time spent using digital media by the average American consumer, according to Smart Insights, which is now more than the desktop computer, which as of 2015, ranks in at 42%.

All of our premium Drupal themes and Joomla templates are built for speed, and make use of industry-standard best practises.

Alternatives to Shared Hosting

It can be a big step moving from shared hosting, but it doesn’t have to be. There are web hosts and service providers out there who provide powerful VPS, dedicated, and cloud hosting, with great support and easy-to-use control panels, like cPanel and Plesk.

If you’re looking for guidance, we highly recommend Media Temple for their VPS offerings, with so many scalable plans to choose from. You won’t notice too much of a difference from shared hosting—other than more speed, more power, and more control! Media Temple’s VPS offerings are also a great option for scalability.

For more advanced users, or agencies expecting growth, we’re a big fan and long-time customer of Rackspace, which we’ve found to offer great tailored cloud and dedicated hosting plans, and so would highly recommend them. Also, their Fanatical Support® is unparalleled… and they make a great choice for fast growth and high-intensity websites.