Speed Optimization Guide

A complete and Comprehensive Guide On Making WordPress websites faster.

Don’t be overwhelmed by the table below; most optimizations can be easily achieved with an optimization plugin. I personally use the free Speed Optimization plugin that comes bundled with SiteGround’s Hosting plan. However, there are several other options, including W3 Total Cache (W3TC), WP Rocket, and FlyingPress.

Steps to optimizing your WordPress website :

1. Visit GTmetrix: Enter your website’s URL to begin the test. GTmetrix offers this tool for free and allows multiple tests to be performed every hour, at no charge.

2. Review the Report: GTmetrix will quickly generate a performance report, pinpointing each area that requires improvement.

3. Consult our table below to address the specific areas highlighted by GTmetrix. While GTmetrix often uses complex terminology, overcomplicates its instructions, and provides guidance for a broad spectrum of websites, we’ve streamlined and tailored their recommendations specifically for WordPress sites. With our clear and straightforward guidelines, you’ll find it much easier to understand and implement the necessary changes.

4. Re-test After Implementing Changes: After making a change, clear your website’s cache if it’s enabled. Re-test on GTmetrix to assess the impact of your adjustments. Using the new results, move on to the next suggested improvement and continue the process.

Implementing this feature can be achieved by using an Optimization Plugin:



Enable Text Compression

Turning on text compression lets you deliver more compact text-centric resources such as HTML, CSS, and JavaScript, which facilitates quicker file downloads.

 As the size of these files increases, their download time also extends, resulting in longer wait times for your visitors to access the page content.How does your site score on this audit?

How does enabling text compression affect page performance?

n essence, reducing the file sizes for text-related resources such as CSS, JavaScript, and HTML lessens the overall weight of your page, thus facilitating quicker downloads.

This acceleration in downloads enables your visitors to access and engage with the content more promptly.

Text compression mainly serves to decrease the file size or payload of text-based resources, resulting in a lower volume of data transfer.

Enabling Text Compression for WordPress Optimization

A compressed text-based resource is delivered to your browser faster. There are 3 main types of compression algorithm:
• Gzip
• Brotli
• Deflate
Brotli and Gzip are the most commonly used compression algorithms and can reduce the size of resources/pages by up to 70%.
They have also been shown to reduce page load times by up to 50%, improving all the key metrics related to your Performance Score.

How To Enable Text Compression For WordPress?

1. For Apache servers

Copy and paste the following code into your .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

2. For other servers

Read the following guides to learn how to enable text compression on other server types:

3. WordPress

For WordPress users, the easiest way to enable Gzip compression is by leveraging a caching plugin that supports enabling Gzip.