Why is WordPress Slow? How to Optimize WordPress Performance

In 2020, website performance should be one of your first main priorities to focus on. If your WordPress website loads slow, search engines will actually punish you for it. Not only that, your visitors will get frustrated and leave your site. Optimizing WordPress is essential for SEO.

In this post, we will go over some WordPress optimization options to help you speed up your website.

Table of Contents

WordPress Site Optimization

WordPress is one of the most powerful content management tools on the internet. In fact, the platform has been used to create over 80 million websites. One of the main downsides to WordPress is the fact that 99% of the custom features that you want to add require a plugin. Unfortunately, some of these plugins can also slow things down due to loading more files such as CSS and Javascript on the front-end.

Luckily, there are several ways to improve your overall site speed. 

Why Is Site Speed Important?

These days, consumers expect nearly instant loading web pages. According to studies, 40% of website visitors said they would abandon a site if it takes longer than three seconds to load.

The best thing you can do to avoid this is have a fast loading WordPress site. Without fast loading pages, you will lose traffic and potential customers.

Even worse, if your website has slower speed either due to a slow hosting provider or un-optimized WordPress installation, Google will punish you for slow web page load speeds. This means a slow site will negatively affect your SEO ranking. Now is the time to speed your WordPress site.

How Fast Should My Pages Load?

How fast does my website need to be? Google reports that your page should load in three seconds or less. If your page takes longer than three seconds to load, the probability of a user leaving right away, increases by 33%.

There are several tools on the web to test the speed of your website. We recommend using GTMetrix to accurately test your website. Just enter the page you want to test into the search box.

How To Decrease Your Page Loading Times & Speed Up WordPress

1. Run a Site Speed Test

The first step you need to take to decrease your page load times is to test it and see what the current results are. You can GTMetrix or Google PageSpeed Insights.

GTMetrix: We recommend aiming for at least a 90% PageSpeed Score.
Google Page Speed Insights: We recommend aiming for at least an 85% PageSpeed Score.

You can further analyze the results above by looking at the specific recommendations and use our guide to help speed up your site.

2. Remove Unused Plugins & Themes

You should always try to keep your WordPress installation clean and tidy. This includes removing unused plugins and themes. Unused plugins and themes can pose security threats with un-patched vulnerabilities as well reduce site performance.

To delete an unused plugin, you will need to deactivate it first. Once it is deactivated, you can go into your plugins list and delete it.

To remove unused themes, go to “Appearance” > “Themes” and click on “Theme Details“. then click on “Delete” in the bottom right hand corner.

3. Clean Up Your Media Library

Over time your Media Library may accumulate a lot of images that are no longer used on your site. To free up space, you should consider deleting unused media such as images and videos.

To remove unused media, we recommend using the good ole fashion way. To do this go to “Media” > “Library” and click “Delete Permanently” under the image or video that you want to delete.

You can also select multiple items and use the “Bulk actions” drop-down at the top of the Media Library page.

4. Clean Up Your Database

The WordPress database is known to accumulate clutter over time. You will want to periodically keep it clean. There are several ways to do this but we recommend the fast and easy route. Use a plugin called WP-Optimize. Our site uses this plugin and we love it! Since it is a plugin that is backend only, it will only HELP your website loading time on the front end.

WP-Optimize has many features but we are specifically recommending it for the Database cleanup feature. You can either do it manually or setup a schedule to clean and optimize your database automatically. Here is a small list of some of the top database items that can accumulate very quickly over time and slowly down your site. WP-Optimize can remove these with little effort on your part.

    • Post Revisions
    • Post Auto-drafts
    • Trashed Posts
    • Spam & Trashed Comments

5. Remove Render-Blocking Javascript and CSS

If you ran a PageSpeed test using our recommendations above, you may have noticed this recommendation. Depending on how your theme was built and how many plugins you currently have installed, the number of Javascript and/or CSS files may vary. “Render-blocking” refers to files that are preventing the rest of the site from loading.

The most important thing you can do in this step, is remove unused plugins and themes. This will prevent their specific Javascript/CSS files from loading on your pages.

6. Use Minify for CSS, HTML, and Javascript

Related to #5 above; CSS, HTML, and Javascript source files can stack up and slow your site down. Some of these you may be able to get rid of, but some are required for your site to work properly. To give your site a speed boost, you should highly consider minifying its code.

The minification technique works by reducing the file size of HTML, Javascript, and CSS files, and can be very effective since it removes unnecessary white-spices, characters, line breaks, and comments. By reducing the file sizes of your code, it requires less data transfer to load your web site. There are several WordPress plugins that are built to minify code. Autoptimize is one of the most popular but you can also check out WP-Optimize, as it also has a feature to minify code. Check out both of them and choose which one suits your specific needs.

7. Optimize WordPress Images

Images are an important thing to consider when trying to optimize the speed of your WordPress site. It is always a good idea to optimize images to achieve faster page load times. There are several different ways to to do this but the most effective way is compression.

This is another reason why we love WP-Optimize. It has an easy to use image compression feature built-in and can even auto optimize your images on upload.

Automatically optimize your WordPress images and increase page load times.

8. Reduce Post Revisions

Post revisions can add up over time causing your site to slow down and clutter the database. You can prevent this from getting out of hand by limiting the number of revisions per post.

To do this, add the line of code below to your wp-config.php file. This file should be in the root directory of your WordPress installation.

define( ‘WP_POST_REVISIONS’, 4 );

9. Run the Latest PHP Version

PHP has come a long way since its early days. There is no doubt that PHP 7 is a huge performance upgrade from previous versions (more specifically version 5.6). You can see from the benchmark graph below just how much of a performance increase using the latest stable release is. We highly recommend you use the latest PHP version for your WordPress installation.

10. Use a Content Delivery Network (CDN)

A great way to help speed up your website is by using a Content Delivery Network also referred to as a CDN.

A CDN can delivery your website content to users in different parts of the world at blazing speeds. The data center will store static copies of your content and files, and then deliver them to users based on their geographical location. This helps reduce latency and external HTTP requests since the content is ready to serve visitors.

Choosing the right CDN depends on your specific needs. A few of the most popular CDN’s that have WordPress integration include CloudFlare, MaxCDN, and Sucuri.

11. Browser Caching via HTACCESS

Another great way to increase website performance is to leverage the power of browser caching via .htaccess. Browser cache refers to a temporary storage location for files downloaded to display a website instead of requesting them from the server every time. These files can include HTML, CSS, JPG, PNG, etc.

You can copy the code below and paste it into your .htaccess access file. This will allow you to start benefiting from browser caching. Below are the settings that we use but you may want to tweak them to your specific needs. We recommend setting images to a higher expiration time and CSS/Javascript to a lower expiration time since you are more likely to update a CSS/Javascript file than a static image.

<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType text/css "access 1 month"
ExpiresByType text/html "access 1 month"
ExpiresByType image/gif "access 1 year"
ExpiresByType image/png "access 1 year"
ExpiresByType image/jpg "access 1 year"
ExpiresByType image/jpeg "access 1 year"
ExpiresByType image/x-icon "access 1 year"
ExpiresByType application/pdf "access 1 month"
ExpiresByType application/javascript "access 1 month"
ExpiresByType text/x-javascript "access 1 month"
ExpiresByType application/x-shockwave-flash "access 1 month"
ExpiresDefault "access 1 month"

12. Move Your Site to a Dedicated Server

If your site receives a lot of traffic, you should highly consider switching to a dedicated server. By switching to a dedicated server, the entire physical server resources would be dedicated to your website and your website only.

When performance and uptime are crucial, a shared web hosting account can be an issue. It can be worth investing in dedicated resources if your site/business requires maximum reliability and full resources of a dedicated server.

View our Dedicated Server Hosting plans. We offer both Linux and Windows Dedicated Servers.

Conclusion for WordPress Speed Optimization

There are several ways to increase performance including WordPress Image Optimization, Database Optimization, Leveraging Browser Cache, and many more. We hope this post has helped you get the most out of your WordPress installation!

If you have any questions or comments, please do not hesitate to leave a comment below!

Related Posts

Special offer:

10% OFF

for a limited time

Use Code: BLPROMO10 at checkout!