Speed Up Your WordPress Website

Website visitors and Google don’t like slow websites. A slow website can have a serious impact on your website’s SEO, sales, and the overall experience you offer your website visitors.

This blog post will help you to easily speed up your WordPress website in a few simple steps.

Why should you Speed Up Your Website?

  1. Fast websites rank higher in the Google search results
  2. Website visitors expect your website to be fast.
  3. According to Kissmetrics, 40% of visitors will abandon a website that takes longer than three seconds to load.
  4. A slow website gives the website user a bad experience which in turn will affect your conversions and sales.

Bottom line is a slow website will get less traffic and sales and fast website will generate more traffic and sales.

Test Your Website Speed

The first thing you need to do is test your website speed using one of the following website tools which will allow you to test, measure, and monitor your overall website speed.

  1. Google Page Insights
  2. Pingdom Website Speed Test
  3. GTmetrix

Hosting Company

Choosing the right hosting provider is essential to the success of your website, business. You need to ensure the hosting provider is established, has a good reputation, supports the latest technologies including PHP, SSD drives, CDN, and so on plus they are based in the UK. Ideally, if you have the budget we would also recommend you host your website on a VPS or dedicated server. A slow website with too much downtime can destroy your business online before you even get a chance to get it established.

Update WordPress

Make sure you are using the latest version of WordPress which will include bug fixes, security updates, and code optimizations which will help your website load faster and also ensure its compatible with the latest version of PHP

Use the Latest Version Of PHP

WordPress websites are faster if you are using the latest version of PHP. Running a website with an outdated version of PHP can have a serious impact on the website’s overall speed and performance. We recommend you use PHP 7.4 or above to get the best results out of your website.

Enable G-zip Compression

You can enable G-Zip compression to compress the Joomla pages, CSS, JavaScript files the website is serving to the visitor’s browser.

G-zip compression is a quick and easy way to improve the overall website load time and will make your site load faster as the content will be compressed before it gets served to the visitors web browser.

To enable G-zip Compression

Note the htaccess code below is for Apache servers only and not for servers running IIS, NGINX or LiteSpeed based servers

You also need to make sure the htaccess file is renamed from htaccess.txt to .htaccess (with a .”dot” in front and no .txt at the end)

  1. Open your FTP software and download the .htaccess file stored in the root of your website to your computer
  2. Open the .htaccess file using notepad.exe
  3. Add the following code to the top of the .htaccess file
<IfModule mod_deflate.c>
  # Compress HTML, CSS, JavaScript, Text, XML and fonts
  AddOutputFilterByType DEFLATE application/javascript
  AddOutputFilterByType DEFLATE application/rss+xml
  AddOutputFilterByType DEFLATE application/vnd.ms-fontobject
  AddOutputFilterByType DEFLATE application/x-font
  AddOutputFilterByType DEFLATE application/x-font-opentype
  AddOutputFilterByType DEFLATE application/x-font-otf
  AddOutputFilterByType DEFLATE application/x-font-truetype
  AddOutputFilterByType DEFLATE application/x-font-ttf
  AddOutputFilterByType DEFLATE application/x-javascript
  AddOutputFilterByType DEFLATE application/xhtml+xml
  AddOutputFilterByType DEFLATE application/xml
  AddOutputFilterByType DEFLATE font/opentype
  AddOutputFilterByType DEFLATE font/otf
  AddOutputFilterByType DEFLATE font/ttf
  AddOutputFilterByType DEFLATE image/svg+xml
  AddOutputFilterByType DEFLATE image/x-icon
  AddOutputFilterByType DEFLATE text/css
  AddOutputFilterByType DEFLATE text/html
  AddOutputFilterByType DEFLATE text/javascript
  AddOutputFilterByType DEFLATE text/plain
  AddOutputFilterByType DEFLATE text/xml

  # Remove browser bugs (only needed for really old browsers)
  BrowserMatch ^Mozilla/4 gzip-only-text/html
  BrowserMatch ^Mozilla/4\.0[678] no-gzip
  BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
  Header append Vary User-Agent
</IfModule>

4. Save the changes to the .htaccess file

5. Upload the updated .htaccess file to the root of your website using your FTP software

Once you have updated the .htaccess file and enabled G-zip you can test it to make sure it’s working correctly by visiting http://www.whatsmyip.org/http-compression-test/

Remove Unnecessary Plugins and Themes

WordPress makes it so easy for you to expand your site’s functionality by installing plugins and themes. However, installing and enabling many plugins or themes that can slow down your website’s performance.

We recommend you only install and enable what you need or if you don’t want to uninstall the plugins then you should disable the ones you don’t use.

Minifying CSS, HTML, and JavaScript Scripts

Minification is a useful way to speed up the WordPress website. It attempts to reduce the size of your front-end files and scripts, such as HTML, CSS, JS, by removing unnecessary file comments and formatting.

Optimizing Your Images

While images can increase your content value, they can really slow your website down.

There are two ways to reduce the size of images without sacrificing their quality. Use a WordPress image optimization plugin or scale the images or you can optimize the images before you upload them to your website and include them in your content. The smaller the image size the faster your website will load.

Enabling Caching

Caching is one of the best ways to speed up websites. Caching engines store frequently-used information on the servers hard disk without having to make read, write requests to the MYSQL database which can slow down the website speed. WordPress has a wide range of free caching plugins available to download and install which provide you with various options to cache the content at your website

CDN – Content Delivery Network 

A Content Delivery Network (CDN) is a geographically distributed network of data servers. Their main purpose is to help you reduce latency, and thus increase the speed of content delivery and more importantly the speed of your website.

By enabling CDN on your website, you’re dividing the static content to every data server within the network. Each data request that your web server receives is then transferred to the closest data server to the client’s location.

Optimize Your Database

As your database is prone to storing useless data like spam comments and old drafts, you need to clean it periodically. Similar to uninstalling unused plugins and themes, deleting this type of data will reduce your database’s workload and the overall load time.

You can easily do this task by installing a WordPress database optimization plugin like WP-Optimize and Advanced Database Cleaner. The plugins will automatically remove unnecessary data from your database, plus compress tables and images at a scheduled time.