How to enhance Pagespeed

You might use a lot of plugins and custom codes that load a lot of JS and CSS files, Do the following to find which plugin/code cause the slowness issue, Please follow the following steps:

  1. Apply the instructions here How to enhance Pagespeed
  2. Disable ALL PLUGINS except the plugins mentioned in the link above.
  3. Disable ALL CUSTOM CODES, such as Ads, Google Map codes, etc.
  4. Remove any Videos, Facebook, Youtube, etc WIdget or blocks which load multiple external files.
  5. Install the Jannah Optimization plugin then go to the theme options page > Performance tab and enable all options there including the LazyLoad for Images option

After applying the steps above check your site via after that you can activate the things you disabled one by one and check its impacts on the speed.

Best Regards!

1. Enable the Lazy Load option

Enabling the theme built-in LazyLoad option will increase your site speed, Install the Jannah Speed Optimization plugin then go to Theme options page > Performance > LazyLoad section.

2. Enable gzip compression

All modern browsers support and automatically negotiate gzip compression for all HTTP requests. Enabling gzip compression can reduce the size of the transferred response by up to 90%, which can significantly reduce the amount of time to download the resource, reduce data usage for the client, and improve the time to first render of your pages.

To enable gzip compression add the following lines to your .htaccess file:

 # Compress HTML, CSS, JavaScript, Text, XML and fonts
  AddOutputFilterByType DEFLATE application/javascript
  AddOutputFilterByType DEFLATE application/rss+xml
  AddOutputFilterByType DEFLATE application/
  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

3. Leverage Browser Caching

When a web browser displays your web page it has to load several things like your logo, your CSS file, and other resources. What browser caching does is “remember” the resources that the browser has already loaded. When a visitor goes to another page on your website your logo or CSS file does not need to be loaded again, because the browser has them “remembered”. The end result is that your pages load much faster.

To enable browser caching, add the following lines to your .htaccess file:

ExpiresActive 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 text/html "access 1 month"
ExpiresByType application/pdf "access 1 month"
ExpiresByType text/x-javascript "access 1 month"
ExpiresByType application/x-shockwave-flash "access 1 month"
ExpiresByType image/x-icon "access 1 year"
ExpiresDefault "access 1 month"


4. Minify HTML,CSS and JavaScript

Minification refers to the process of removing unnecessary or redundant data without affecting how the resource is processed by the browser – e.g. code comments and formatting, removing unused code, using shorter variable and function names, and so on

To Enable Minify, use the following plugins:

5. Optimize Images

Optimizing your images will helps your WordPress site load faster.

Download and activate  WP This plugin will optimize every image you upload and you can use the Bulk feature to smash all of your uploaded images.

Alternatives to WP include  EWWW Image Optimizer, CW Image Optimizer, Imsanity and Hammy. Many WordPress users prefer using these plugins as they do not rely on an external server to process your images.

6. Move JavaScript scripts to the footer

When any user opens your website then all the JavaScript files get downloaded by the web browser to show the proper working of the website. But if you have the files in the header then the browser would take more time.

To increase the speed of your website, you should move JavaScript in the footer of your WordPress theme. use the Scripts To Footer plugin.