Speed up your slow WordPress website (2024)

last updated 8 months ago

Nothing is more annoying than a slow website. And visitors notice it, too: The majority of people drop out faster than you think. And even as a website owner, it is sometimes really difficult to optimize everything so that everything fits.

Here in this comprehensive guide I explain which steps I generally always undertake to create a to speed up WordPress site.

Here is my overview, which presents the different steps in order of importance; the most important points are at the top, while the less important ones are listed further down:

1. The right hoster (and avoiding the wrong ones)

First of all: I don't want to badmouth any providers. My goal is to use my experience to clarify which hosts are reliable – and which aren't.

Big and well-known does not always mean good: I have had bad experiences with IONOS Good ones, however, with All. Incl., Hetzner and Ovh.

The problem with (very) large hosting providers? They try to accommodate as many customers as possible on a single server. This means, for example, that 500 customers are placed on one server.

This is bad: The more customers use a server, the higher the load and the slower the websites that run on it.

I recommend All. Inkl because their servers are stable, WordPress runs fast, and their customer service is excellent:

image

2. Use a CDN (Cloudflare)

In simple terms, a CDN, or Content Delivery Network, does the following: It ensures that websites and other digital content are delivered to users faster and more reliably.

The data is not provided from a central location, but from many different servers worldwide. When someone visits a website, the content is loaded from the server that is geographically closest.

This reduces loading times and improves the user experience. A CDN can also help protect your website from overload or attacks by distributing traffic, thus increasing security.

My tip: Cloudflare Free ensures that your website is distributed on the Cloudflare network. Completely free of charge.

Then you add your respective site, adjust the DNS records and Cloudflare protects the website.

Important, the orange cloud must be visible:

Performance Test

Before: Without Cloudflare

After: With Cloudflare

TTFB = Time To First Byte – that's how long it takes for the first byte to be received. Only then does a website begin to load. As you can see from the images, this all happens much faster with Cloudflare.

3. Avoid page builders (or optimize them)

elementor

Page Builder like Elementor add additional CSS/JavaScript and increase memory usage.

The most dangerous part is what I'll call the "page builder trap." This happens when you install several additional page builder plugins (including Elementor Pro) and then wonder why your website is loading so slowly.

Tips for optimizing page builders

  • All performance settings should normally be enabled.
  • The method for printing CSS should be set to “external styles”.
  • Font Awesome 4 should be disabled.
  • Loading Google Fonts should (usually) be set to “swap” or “optional”.
  • Disable fonts/font icons and use your own fonts/icons.
  • Restore files and data after changing these settings.
  • Use fewer widgets/columns (here is a YouTube video about it).
  • Always test how much CSS & JS page builder plugins add.
  • If plugins are modular, deactivate the modules you don't use.
  • Disable page builder plugins where they are not used
  • Disable Gutenberg CSS in Performance Matters or Asset CleanUp if you are not using it.
  • Code for header/footer/sidebar should be created in CSS

4. Optimize all images

Many people upload their photos uncompressed to their websites. The result: Huge images result in a website that takes a long time to load.

There are several ways to counteract this: You can either use a plugin (I recommend using one right away) or a CDN service that handles compression. Cloudflare offers Mirage & Polish.

Plugin – Imagify

imagify

I use Imagifyto compress images on web pages. This saves storage space and allows visitors to view my website faster.

CDN – Cloudflare (Mirage & Polish)

I also use Cloudflare Mirage & Polish. It does the same thing.

Polish: Speeds up image loading by optimizing them on your website. Optionally, you can use the WebP image format, if visitors support it, for even greater performance.

Mirage: Improves image loading on mobile devices with slow internet connections.
Here, too, you can create a rule to adjust the settings depending on the domain name.

5. Use a WordPress cache plugin

A WordPress cache plugin is used to improve the loading speed of the website.

Here's how it works: When someone visits your website, the web server has to retrieve and process a lot of information to display the page. This can take time, especially if the page contains many images or complex content. Caching is the process of storing this information so it can load faster the next time the user visits.

A cache plugin stores a copy of your website (called the "cache") on the server. When someone visits your site again, the plugin can display this saved copy directly instead of retrieving all the data. This means the page loads faster.

Which cache plugins are recommended?

There are many different caching plugins for WordPress. I've tried several of them. There's no single one that's "the best."

I personally use Litespeed Cache on some websites. However, I also have Litespeed installed as the web server there.

On nginx/apache servers, I use WP Rocket and FlyingPress. I recommend both of these plugins – WP Rocket is particularly easy to set up. FlyingPress offers the best anti-bloat features. And Litespeed Cache is suitable if you're running a Litespeed server.

One of the advantages of Litespeed is lower load.

So, what should I do? For “normal” hosting, I recommend using WP Rocket:

WP Rocket is a cache plugin
WP Rocket – Cache Plugin for WordPress

For dynamic websites – Litespeed

Litespeed cache
Litespeed Cache is also a cache plugin for WordPress, but it requires a different web server

For particularly complex and extensive web projects on WordPress, Litespeed wonderful.

6. Optimize the database

It's often neglected, but you should still check whether the database is too slow. If that's the case, a cache plugin will only help to a limited extent.

Over time, unnecessary ballast accumulates in the database, which impairs performance.

So you should do the following:

  • Clean up revisionsWordPress stores multiple versions of your posts. These revisions can accumulate and take up space. Plugins like WP Optimize help delete old revisions. Here's a guide on how to limit revisions!
  • Optimize database tables: WP-Optimize can also be used here to organize the tables efficiently and remove unnecessary data.
  • Minimize autoloaded data: Many plugins store data that is automatically loaded each time a page is accessed, even if it is not needed. Tools like Query Monitor can help identify and minimize this data.

Query Monitor By the way, I use it almost every day:

query monitor

7. Lazy loading

Lazy loading means that images and videos are only loaded when they are visible to the user. This significantly reduces the initial page loading time.

  • WordPress internal lazy loading: WordPress has a built-in lazy loading feature that you can enable.
  • Plugins for lazy loading: Alternatively, there are plugins like Lazy Load by WP Rocket or Smushwhich further optimize lazy loading.

Most cache plugins (presented above) offer this feature.

8. Deactivate unnecessary plugins

Too many or poorly programmed plugins can severely impact your website's performance.

  • Check plugin performance: Use tools like P3 Plugin Performance Profilerto see which plugins take up the most time and resources.
  • Clean regularly: Deactivate and delete plugins that you no longer use to avoid unnecessary load.

Note: Be sure to deactivate any plugin that is not needed!

9. Optimize the mobile version of the website

Mobile website

It is important that websites can be accessed very quickly on mobile devices.

Most desktop optimizations also apply to mobile devices. However, there are some specific tips for mobile users:

Reducing latency is crucial for mobile users and is part of TTFB (Time To First Byte). This depends primarily on your DNS/CDN and whether it supports features like full page caching, HTTP/3, Brotli, and Cloudflare's 0-RTT. It sounds technical at first, but it's actually easy to understand.

Mobile websites are particularly sensitive when it comes to loading times. Mobile users want to access the information they need quickly and easily. A slow mobile site can not only lead to a higher bounce rate but also affect your site's search engine ranking.

Steps to optimize the mobile version

  1. Minimize HTTP requests: Each element on your website—images, scripts, stylesheets—requires its own HTTP request. More requests mean longer loading times. Reduce the number of requests by consolidating scripts and removing unnecessary files.
  2. Use images with small file size: It makes no sense to load huge desktop images on mobile devices. Use the srcsetfunction in HTML to provide different image sizes for different screen sizes.
  3. Prioritize critical CSS: Load only the CSS needed for the visible part of your website. You can load the rest asynchronously, so the user gets to the first visible content faster.
  4. Use AMP (Accelerated Mobile Pages)AMP is a technology developed by Google that aims to make mobile websites load extremely quickly. It removes unnecessary scripts and optimizes the code for mobile devices.
  5. Test regularly: Tools like Google PageSpeed Insights or GTMetrix provide valuable insights into where you can make improvements. Especially with mobile tests, you often receive specific suggestions for mobile optimization.

10. Use a fast theme

Be sure to use a fast WordPress theme – and not an unnecessarily cluttered one.

A fast theme is the foundation of any high-performance WordPress site. Many themes are unnecessarily overloaded with features you don't actually need – and this directly impacts loading times.

What should you pay attention to?

  • Lightweight themes: Use themes that are specifically optimized for performance. Examples include Astra, GeneratePress or SnowThese themes do without unnecessary frills and still offer you enough flexibility for design and functionality.
  • Minimal use of JavaScript: Make sure your theme uses as little JavaScript as possible. Many animations and effects look cool, but they drain unnecessary resources.
  • No built-in page buildersAvoid themes that come with their own page builder. These themes often load additional CSS and JavaScript, which significantly increases loading times. It's better to choose a lean theme and, if necessary, use an external, optimized page builder like Elementor to set – however, you should be careful with the number of widgets and effects.

Read our article about it here:

https://blitzwp.de/schnelle-wordpress-themes/

A fast, well-optimized theme forms the foundation for a fast website. And remember: It's much easier to start with a lean theme and add features as needed than to slim down a cumbersome theme later.

11. Limit WordPress Heartbeat API

The WordPress Heartbeat API ensures that the server is regularly updated while you're working in the admin area—for example, when editing posts, saving drafts, or updating notifications. While this is useful, too frequent requests can strain server resources and slow your site's performance.

Why limit the Heartbeat API?

Especially on shared hosting or heavily trafficked websites, the Heartbeat API can unnecessarily increase server load. This can impact your site's performance, especially in the admin area, and cause it to run slower.

Here’s how you can optimize the Heartbeat API:

  • Heartbeat Control Plugin: This plugin allows you to reduce the frequency of heartbeat requests or even disable them completely if you don't need the feature. This allows you to adjust the intervals to minimize server load.
  • Adjust manually: Alternatively, you can manually set the heartbeat in the functions.phpfile of your theme. Here's an example to reduce the heartbeat frequency to every 60 seconds:
add_action( 'init', 'limit_heartbeat_settings' );
function limit_heartbeat_settings() {
add_filter( 'heartbeat_settings', 'adjust_heartbeat_frequency' );
}

function adjust_heartbeat_frequency( $settings ) {
$settings['interval'] = 60; // 60 seconds
return $settings;
}

These adjustments allow you to control the use of the Heartbeat API and thus significantly reduce server load – ultimately resulting in a faster and more stable site.

12. Enable browser caching

Browser caching ensures that returning visitors experience your site faster by storing important files, such as CSS and JavaScript, in the browser's cache.

How do you enable browser caching? – Most cache plugins for WordPress already have this feature included.

You can also find out more about the .htaccess-file:

bashCopy codeExpiresActive On ExpiresByType image/jpg "access 1 year" ExpiresByType image/jpeg "access 1 year" ExpiresByType image/gif "access 1 year" ExpiresByType image/png "access 1 year" ExpiresByType text/css "access 1 month" ExpiresByType application/javascript "access 1 month"

Caching will help returning visitors load your website much faster because their browsers already have a local copy of frequently used files.

13. Optimize Autoload Options

Every time a plugin is used in WordPress, it saves various settings and data to the database. Even if the plugin is later deactivated or no longer used, this saved information remains in the database.

Over time, this can lead to an accumulation of unnecessary data, placing unnecessary strain on the database and slowing down website loading times. An overloaded database can impact site performance, resulting in a poor user experience.

Therefore, it is advisable to regularly clean up databases and remove plugin data that is no longer needed to ensure the efficiency of the website.

AAA Option Optimizer helps here

I use the AAA Option Optimizer plugin to disable WordPress autoload options, for example for plugins that I no longer use.

AAA Optimizer

The AAA Option Optimizer is a pluginto disable autoload options that are no longer needed.

By selectively removing these unnecessary options, the page's loading time is significantly improved. A faster page not only provides a better user experience but can also have a positive impact on search engine rankings.

By optimizing performance, you create a more efficient and user-friendly environment that benefits both visitors and website owners.

And this is what it looks like:

image 6

(Recommended) Plugins for WordPress Optimization

Of course, you don't need all of these plugins, but some optimization plugins and CDNs don't have all the features, so it may be useful to use additional plugins to perform further optimizations.

Of course, you don't need all of these plugins, but some optimization plugins and CDNs don't have all the features, so it may be useful to use additional plugins to perform further optimizations.

plug-incategoryPrice
FlyingPressCacheChargeable
LiteSpeed CacheCacheFor free
Performance MattersMultiple categoriesChargeable
CloudflareCDNChargeable
Great Page Cache for CloudflareCDNFor free
WP OptimizedatabaseFor free
FlyingProxyCDNChargeable
Flying PagesResource HintsFor free
Flying ScriptsDelay JavaScriptFor free
List of speed plugins

Conclusion – What I actually do

Now you're probably asking yourself, "Yes, that all sounds good, but what exactly do I do on my own sites to make them faster?" Here's the process I almost always follow to optimize performance on my websites:

  1. Choose your host carefully: The host is the foundation. I rely on All.Inkl or Hetzner because they offer stable and fast servers. Especially with shared hosting, you should be careful not to have too many websites on one server.
  2. Cloudflare for CDN and securityCloudflare Free is easy to set up and already offers excellent results. It ensures that content is loaded from the nearest server location and helps protect the website from overloads or attacks.
  3. Avoid unnecessary page builders: I use as few page builders as possible. When I do use one (e.g., Elementor), I make sure it's optimized—fewer widgets and columns, and external styles and fonts are disabled.
  4. Image optimization with Imagify: Every picture on my site is protected by Imagify compressed. This saves a lot of loading time, as large images often cause long loading times. I also activate Cloudflare Mirage & Polishto further improve the loading time of the images.
  5. Set up cache plugin: On my pages I use WPRocket or Litespeed cacheDepending on the hosting provider, these plugins make my site load faster by providing static copies of the page for returning visitors.
  6. Database maintenance: I use Litespeed's built-in feature to keep my database clean and lean. Old revisions and unnecessary data is regularly deleted to avoid affecting performance.
  7. Enable lazy loading: Everything that isn't immediately visible is loaded later. This means that my images and videos are only loaded when they are actually in the user's field of vision. I use the internal WordPress function or plugins like Lazy Load by WP Rocket.
  8. Uninstall unnecessary plugins: I regularly check which plugins I still really need and deactivate those I'm no longer using. This makes the site more streamlined and significantly reduces loading times.
  9. Mobile optimization: The mobile version of my site is just as important as the desktop version. I pay special attention to ensuring all images are smaller and CSS requests are minimized. I also regularly test loading times with tools like Google PageSpeed Insights.
  10. Use a quick theme: I only use themes on my sites that are lightweight and well optimized. Astra and GeneratePress are my favorites because they are fast and lean by nature, without any unnecessary ballast.
  11. Limit WordPress Heartbeat API: With the Heartbeat Control Plugin I ensure that the server load through the Heartbeat API remains minimal. Especially with shared hosting or high-traffic sites, I make sure to reduce queries as much as possible.
  12. Enable browser caching: I ensure that returning visitors do not have to reload everything each time by activating browser caching. I use cache plugins like WP Rocket, which already have this feature integrated, or I work directly with the .htaccess-File.

If you have any questions, please let me know.

Content

    Leave a Reply

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

    lk media – your partner for online marketing & web design.

    Your success online is what drives us.
    lkmedia white
    Agency for future-oriented online marketing and web design. We are a team of creative minds and strategic thinkers who are passionately committed to your success in the digital space. Our goal is to present your brand optimally, reach your target group and generate sustainable growth.
    © Copyright 2024 lkmedia
    Sitemap Data protection imprint
    en_USEnglish