Why Is My Website Slow, and How Can I Fix It? – Part 2, Your CMS May Be Your Problem

Last week we talked about inexpensive hosting causes many websites to be slow.  This week we’ll talk about why a Content Management System (CMS) may cause slowness of your site.

Why Is My Website Slow, and How Can I Fix It? - Part II, Your CMS May Be Your Problem Image

Using a CMS May Slow Down Your Site

I know what you’re thinking: “But a CMS makes my site easier to manage!” You’re right. A CMS greatly reduces the amount of time it takes to update a site — it also requires less knowledge to do so.

However, not all CMSs are created equal. They are a lot like our favorite computer  species — Windows v.s. Mac — there are “fanboys” who love a certain one and will bash the others with no sound reasoning.  For every one person that loves Drupal, there’s one which loves WordPress just as much.

So the answer to “Which CMS should I use?” is debatable.

How can a CMS slow down my site?

To not make a complicated process overly simple, when a page loads through your CMS, it runs a bunch of queries to the database containing all of your site’s assets.  Those queries retrieve and assemble all of your content (text, images, page titles, SEO, and so forth) and work with the visitor’s browser to present a full page.

The problem is that databases only execute so many queries per second.  Depending on the CMS you’re using — and the CMS of every other website on your server — that can quickly add up.

When MySQL (pronounced My Sequel or sometimes My S-Q-L) — which is the database that powers most popular CMS applications — hits its limit of how many queries it can process, it queues them up.  What that limit is varies by host and their individual settings.

When MySQL queues up queries, your CMS waits in line to get the files from the database that it needs to display your page.  Sometimes that delay is so tiny you won’t notice.  While other times that delay takes minutes, causing frustration, anger, and a call to your host (who’ll likely claim that nothing’s wrong on their end).

Most systems run a handful of queries when a page is loaded — there is no correct number of queries. This certainly isn’t the only reason a CMS can slow your site down, but database queries are generally the biggest reason.

If it’s not MySQL, what else can slow my CMS down?

Some other things that you want to look at:

  • Outdated software – Most CMSs will give you a warning in your admin area when there’s a new version available — it is important to always upgrade as soon as you can.  Using an old version of any CMS slows your site or presents security vulnerabilities.
  • Outdated plugins/modules – It’s no secret that it’s virtually impossible to use a CMS without at least one plugin or module to enhance the website.   If there’s a new version available, be sure to upgrade.
  • A poorly written theme/design – Your theme may be executing multiple queries that you don’t need to execute. Loading more than you need places more load on the server and can affect performance.

How do I fix it?

There are a number of things you can do to make your CMS-powered site faster.  One thing many people try that likely won’t fix the issue  is moving to another CMS.  No CMS is perfect. Switching from one to another may gain you a nanosecond in load time, but it’ll be a long, and probably frustrating, process.

The best thing you can do is use a caching plugin/module.

A caching plugin removes the necessity for database queries, going about its business in a simple, genius way:  The first time someone visits a unique page of your site, the caching plugin creates a static version of that page — the same page, but stored with all of its content in HTML.  The next time a visitor’s browser requests that page, instead of a bunch of database queries to completely rebuild the page, the CMS can serve up the static version in a fraction of the time. This greatly improves overall site performance.

However, caching does come with some sacrifices.  Until a cached page “expires,” your page may not display new comments correctly.  You may also run into issues if you have dynamic content on your page.  Many caching plugins gracefully handle these pitfalls and even allow you to customize what and when pages are cached.

Here are some of the more popular caching plugins that should help:

Add a caching plugin to reduce your site’s load time, and make you a happy camper.
Stay tuned next week for Part III, Optimize Images For The Web and be sure to check out Part I – Inexpensive Web hosting if you missed it.

Leave a Reply

Your email address will not be published. Required fields are marked *