Creative Services Web Design Web Development
5 Reasons Why Your WordPress Website Is Too Damn Slow
05/07/2019 • 6 min read • Written by Jen Kilpatrick

You've just launched your fancy new WordPress website, only to find out it takes longer to load than snail mailing a printed copy. This is one of the downsides of using an open source content management system. Because it is extended profusely by third-party developers, the more features you add, the longer it takes to load.
So what do you look for when it comes time to optimize your WordPress website? Where do you start amplifying your WordPress page performance? There are five simple reasons why your WordPress site is probably running slower than it should be.
You Aren't Page Caching
Have you ever looked at a WordPress page template file? They can be extremely complicated depending on how much you've customized your site. Most common hosting providers now run their shared hosting on either LAMP (Linux - Apache - MySQL - PHP) or LEMP (Linux - Nginx - MySQL - PHP) environments. These are typical stacks of software that power providers' servers. Both Apache and Nginx are web servers - they serve files to viewers who browse your site.
However, they don't understand PHP, the programming language that WordPress is built on.
Because web servers don't understand PHP directly, all those lines of code in your template files have to process every time a user requests a page. In normal situations that may not account for much lag, but the machine has to process that code for every concurrent user on your site. And the web server needs to communicate with PHP via a processor module included in every web hosting package.
This module is the middleman between the web server and the PHP processor. This means that when visitor A comes to your website (and you're not page caching), the server sends the request through the PHP Module which sends it to PHP, which then generates a bunch of HTML and sends it back to the module...then finally displays the page!
Page caching runs the PHP code only once every so often and stores the resulting HTML on the hard disk. When the server sends the request to PHP, it says "Oh hey, I already did that, and it's over there!" The server then immediately serves the cached HTML content!
So how do you implement page caching? While many WordPress hosts now include server-level caching, there are still excellent caching plugins available. We typically recommend WP Rocket for advanced users who want fine-grained control, or LiteSpeed Cache for those who want a more streamlined solution. Both options offer comprehensive caching features while remaining user-friendly.
Read More: How to Redesign a Website
You Aren't Object Caching
So the page cache thing is excellent, but some PHP is still going to run on every WordPress page load. You can't cache things like function definitions or the core PHP logic of WordPress via the page cache. To help in that area, you should consider object caching. Object caching merely is storing a PHP object (basically any variable value) that is in the database on the hard drive or better yet, in Redis or Memcached. This can save lots of time, so the same object isn't generated repeatedly.
For example, let's say every time someone views a page on your site you are loading the WordPress user object which contains their first name, last name, etc. The function behind that process grabs data from multiple points on the database, builds an object and returns it. Rather than doing that, why not store the result of that operation into the database as an object? Then all you have to do is make one call, and the object is returned — without needing to be rebuilt.
WordPress comes with a helpful tool call Transients that lets developers store data in the WordPress database and access it later. You can save the HTML for an entire page in a transient if you like. It's more concise and practical to store object data used to build that HTML - then let page caching handle the rest!
Your Site Has Spaghetti Code
It happens to everyone, so don't worry. Spaghetti code is what happens when you have too many developers working towards the same goal in a short period. As they complete tasks, they have three or four more added to their plate.
Even if you have a talented, high-performing development team, there's a chance of some things getting out of control as the codebase grows.
When us developers first plot out our websites or applications, everything is controlled and looks nice and easy to follow. As more features are added, the code starts to look a little messy. Eventually, it's nearly impossible to tell where one function begins and ends like looking at a plate of spaghetti and trying to follow one noodle.
The trick to this is to refactor (or clean) code all the time. Every month you should dedicate a small portion of your time or budget towards optimizing the code base.
You'll keep your site loading fast, so your users (and Google) will be happy. (Google considers Core Web Vitals, including site speed, as important ranking factors). Developers like refactoring their code because it helps them prepare for new features and continuously improve their product.
Read Now: HubSpot CMS vs. The Competition
You're Using Way Too Many Plugins
Anytime you install a plugin you need to ask yourself one simple question: "Is this plugin essential for my users?" There are a high number of plugins that you don't need. Many plugins are unnecessary because they accomplish things a developer can do with less than ten lines of code, and with far less overhead than a plugin.
Always remember that every plugin you install has to load with every page. A lot of them are cached efficiently and don't impact performance, but just as many are built poorly, packed with features that aren't needed. One of the things I tell a lot of prospects is "the best thing about WordPress is that it's open source and has over 70,000 plugins, and the worst thing about WordPress is that it's open source and has over 70,000 plugins."
People can get in real trouble by using too many plugins which can cause performance issues, or worse, conflict with other plugins and crash your site. I can't tell you how many websites I've seen where the owner comes to me asking about performance, and when I look into their WordPress Admin Panel, I see they have 40 plugins installed.
If you do need to use a plugin, look for one that has positive reviews, has been regularly updated, and if possible has a long-running history. You don't want a fly-by-night plugin that your site depends on where the developer decides to get another job and abandons the plugin altogether.
Read More: Guide on HubSpot vs. WordPress
Here are some examples of things to avoid:
- Heavyweight analytics plugins that track page performance and visitor behavior. While tracking is important, consider using lightweight solutions like Google Analytics 4 with its official WordPress plugin, or specialized WordPress analytics tools, or even a WordPress/HubSpot integration.
- Related posts plugins that aren't optimized - these can be resource-intensive as they scan every post on your site. If you need this feature, consider services like Related Posts for WordPress or Jetpack's Related Posts which use external servers and smart caching.
- Poorly optimized email plugins — while email functionality is crucial, choose established solutions like MailPoet or newsletter integration plugins from major providers like Mailchimp that are built for performance.
You're Using Cheap/Shared Hosting
Basic shared hosting plans that cost $10-20 per month probably aren't suitable for your WordPress website, especially if it's for business use. Even worse, most of these smaller hosting plans are not optimized specifically for WordPress, as they have to support multiple content management systems.
We've partnered with WP Engine to provide the very best WordPress business hosting solution. WP Engine has server level caching (no relying on caching plugins), automated daily backups with one-click restore, and top-notch security (they even have a list of banned plugins). The backups are extremely valuable. I can't tell you how many customers initially thought premium hosting was too expensive for their business website, only to have it crash while on one of the budget hosts.
These hosts often lack reliable backup systems and quick restore options, so in some cases, it took an entire day to restore their site. So to save money on hosting, they lost a full day of business and paid for several hours of development work. To make matters worse, this doesn't take into account the loss of business revenue.
The moral of the story, don't skimp on your hosting; it almost always comes back to bite you.
You could go directly to WP Engine or other premium WordPress hosts, but when you host through us, we handle plugin updates and maintenance, saving you valuable time.
Quiz Yourself: Is Your Website Optimized For Performance?
To Sum It Up
Don't settle for a slow WordPress site. The visitor leaving because your page is taking a minute to load or doesn't load could be your competitor's next customer. If you'd like to dive in deeper or discuss making changes to your website, reach out to our team today.

By: Jen Kilpatrick
You May Also Like

Technology
What is WordPress and Should You Use It?
Discover what WordPress is, how it compares to HubSpot, and whether it's the right choice for your website.
Keep Reading
Web Design
How to Redesign a Website
Explore essential strategies for website redesign, from UX design to SEO optimization. Get inspired today.
Keep Reading
HubSpot
Everything You Need to Know About HubSpot Website Themes
Website themes can help you customize your site in ways unique to your brand. Don’t be intimidated by the design aspect. We e...
Keep ReadingSubscribe Today