Why Your WordPress Site Is Slow and What You Can Do About It

Every CMS platform has its unique strengths and weaknesses. As much as we wish for the perfect platform, one hasn’t been born yet. WordPress is the most popular CMS (by far!) for good reasons. It’s simple to set up, it’s easy to manage, it’s easy to learn, it has a strong community, plugins are readily available, and keeping it up to date is simple. We love WordPress and you should, too. That said – there is an area where WordPress comes up short: it’s slow.

Why Does This Happen?

One of the appeals of WordPress is how easy it is to add functionality via plugins. In fact, the core installation of WordPress has very little functionality when compared to other CMS platforms. Do you want an events calendar? How about newsletter registration? A slide show? All would require you to add a plugin. Before you know it, you’ve got a dozen (or more!) plugins in your website.

complicated messPlugins integrate themselves into WordPress through a mechanism called hooks. You can think of hooks as a way for plugins to say, “when this specific thing happens, let me know about it.” Each plugin implements a number of these hooks and perform various tasks while a web page is loading. One poorly written plugin that implements a commonplace hook can drag down the performance of the entire website. There isn’t a common development standard for WordPress plugins to ensure good performance, so it’s difficult to know how a plugin will affect your website.

Performance issues aren’t just limited to plugins. Themes are built with custom code and can introduce the same issues as plugins. Themes which come with visual page builders commonly add a lot of overhead to your website.

Finally, it may be an issue external to WordPress. The language that WordPress is written in – PHP – is interpreted each time a page is loaded. The more code you have, the longer it takes. Also, the server hosting the website plays a major part in how long it takes a page to load.

Craftsman with tools

What Can I Do?

The key to improving performance on a website is gaining an understand of what’s happening. It’s easy to begin speculating about which plugins are your culprits. However, there are tools that will give you the data necessary to narrow it down.

The Debug Bar plugin will show you additional debug information when you are logged in as an administrator. The Query Monitor plugin similarly shows debug information.

The Xdebug extension for PHP has a feature called profiling which can help. When using profiling, files are written after each page load and can be reviewed to see where time is being spent during a page load.

You should review your PHP configuration to ensure that OPCache is enabled. The OPCache feature caches the interpreted version of your website’s code and greatly speeds up subsequent requests.

Finally, think about your hosting. If your website has been in the same place for several years, it might be time for an upgrade. Hardware becomes faster every year and just migrating to a new account with the same provider can give you a performance boost. You can talk to them to see if they have a migration option.

What Shouldn’t I Do?

A frequent go-to option for WordPress performance issues is a caching plugin like W3 Total Cache. Although a caching plugin can help your website perform better in certain circumstances, I would recommend starting with the previous recommendations first. It’s important to directly address the underlying issues first.

Additional Resources

The official WordPress site has some information about performance considerations with WordPress.

The Xdebug website talks at length about the profiler feature.