This is just an outline in how to speed up your WordPress site.

Find an excellent web host.

No matter what you do or what plugins you have, if your web host’s performance is poor, you would likely get what you paid for.

These are the web hosts I recommend as per our experience:

  • (for managed hosting; what can you say: “love your own.”)

Some things you can do in your WP-Config file:

# Disables all core updates. Added by BrodNeil
define( 'WP_AUTO_UPDATE_CORE', false );

Add the line above to disable all core updates.

# Empty trash after 7 days. Added by BrodNeil:
define( 'EMPTY_TRASH_DAYS', 7 );

Add the line above to empty trash after 7 days. You can change the value of 7 to 3, that is if you want to empty trash after 3 days.

# Limit post revisions to 3 by BrodNeil:
define( 'WP_POST_REVISIONS', 3 );

Add the line above to limit the post revisions being saved to 3. I think the default is unlimited.

Note that the Added by BrodNeil can be replaced by your name. This just helps me who added the line in our team.

Apply a leverage browser caching in your .htaccess

Go to CPANEL > File Manager.

Look for the .htaccess file. Make sure that you allow to show hidden files.

Add the lines below to your .htaccess file.

# Leverage Browser Caching
<IfModule mod_expires.c>
    ExpiresActive on
    ExpiresDefault                                      "access plus 1 month"
  # CSS
    ExpiresByType text/css                              "access plus 1 year"
  # Data interchange
    ExpiresByType application/json                      "access plus 0 seconds"
    ExpiresByType application/xml                       "access plus 0 seconds"
    ExpiresByType text/xml                              "access plus 0 seconds"
  # Favicon (cannot be renamed!)
    ExpiresByType image/x-icon                          "access plus 1 year"
  # HTML components (HTCs)
    ExpiresByType text/x-component                      "access plus 1 month"
  # HTML
    ExpiresByType text/html                             "access plus 0 seconds"
  # JavaScript
    ExpiresByType application/javascript                "access plus 1 year"
  # Manifest files
    ExpiresByType application/x-web-app-manifest+json   "access plus 0 seconds"
    ExpiresByType text/cache-manifest                   "access plus 0 seconds"
  # Media
    ExpiresByType audio/ogg                             "access plus 1 year"
    ExpiresByType image/gif                             "access plus 1 year"
    ExpiresByType image/jpeg                            "access plus 1 year"
    ExpiresByType image/png                             "access plus 1 year"
    ExpiresByType video/mp4                             "access plus 1 year"
    ExpiresByType video/ogg                             "access plus 1 year"
    ExpiresByType video/webm                            "access plus 1 year"
  # Web feeds
    ExpiresByType application/atom+xml                  "access plus 1 hour"
    ExpiresByType application/rss+xml                   "access plus 1 hour"
  # Web fonts
    ExpiresByType application/font-woff                 "access plus 1 month"
    ExpiresByType application/font-woff2                "access plus 1 month"
    ExpiresByType application/         "access plus 1 month"
    ExpiresByType application/x-font-ttf                "access plus 1 month"
    ExpiresByType font/opentype                         "access plus 1 month"
    ExpiresByType image/svg+xml                         "access plus 1 month"

Enable GZIP in your .htaccess

On the same .htaccess file, apply the following:

# GZIP enabled 
<IfModule mod_deflate.c>
    <IfModule mod_filter.c>
       AddOutputFilterByType DEFLATE "application/atom+xml" \
          "application/javascript" \
          "application/json" \
          "application/ld+json" \
          "application/manifest+json" \
          "application/rdf+xml" \
          "application/rss+xml" \
          "application/schema+json" \
          "application/vnd.geo+json" \
          "application/" \
          "application/x-font-ttf" \
          "application/x-javascript" \
          "application/x-web-app-manifest+json" \
          "application/xhtml+xml" \
          "application/xml" \
          "font/eot" \
          "font/opentype" \
          "image/bmp" \
          "image/svg+xml" \
          "image/" \
          "image/x-icon" \
          "text/cache-manifest" \
          "text/css" \
          "text/html" \
          "text/javascript" \
          "text/plain" \
          "text/vcard" \
          "text/vnd.rim.location.xloc" \
          "text/vtt" \
          "text/x-component" \
          "text/x-cross-domain-policy" \

Apply GZIP Compression.

Go to your CPANEL, and look for Optimize Website.

Enable Compress Content > Compress All Content by clicking Update Settings.

Enable GZIP compression by

Have the latest or the recommended PHP version.

Go to your CPANEL.

Look for Select PHP Version or something similar like PHP configuration.

Make sure your plugins can work well with the version you are trying to activate.

Activate Cloudflare.

Go to your CPANEL.

Look for Cloudflare.

Use the FULL set up. You can find instructions in how to set up Cloudflare either from your web host or Cloudflare itself.

Install and activate these plugins:


This plugin helps you clean up your database easily without you going through the manual queries. If you are not familiar with how you can find the database, then having the plugin is much safer and easier.

P3 (Plugin Performance Profiler)

Directly, this plugin will not help in speeding up your site’s performance. However, this plugin allows you to check which plugins are slowing down the site. Helping you to take a better-informed decision.

SG Optimizer

SG Optimizer is one of the best easy-to-use performance plugin. It works perfectly well for websites hosted in SiteGround. SG Optimizer is built by SiteGround. SG Optimizer handles caching, system settings, and all the necessary configurations for a blazing-fast website including image optimization.


Like many other plugins, Autoptimize speeds up your website by optimizing JS, CSS, HTML, Google Fonts and images, async-ing JS, and more. Among the plugins we’ve tried, Autoptimize is best in resolving the Eliminate render-blocking resources in Google PageSpeed Insights.

Async Javascript

Async Javascript lets you add ‘async’ or ‘defer’ attribute to scripts to exclude. Use this with Autoptimize; it’s a perfect match.

Enable Hotlink Protection.

Go to your CPANEL and look for Hotlink Protection.

It prevents other websites from directly linking to files on your website. Therefore, the other sites may seem-like stealing your bandwidth. An example of hotlinking would be using a <img> tag to display an image from your site somewhere else on the net.

Enable it.

Update: July 3, 2019

I did everything I mentioned above and was still not satisfied with the result. Simply because my benchmark for the loadtime or speed is that of an HTML static site.

Late June 2019, I decided to test Google Cloud Compute Engine and was quite happy with the result. The only issue I had was that Google support was a bit expensive for small businesses and free support from community or forum may never come or too technical for an average webmaster.

See the Google PageSpeed Insights result below:

Google pagespeed insights WP mobile
Google pagespeed insights WP desktop

Leave a comment

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