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:
- Apply the instructions here How to enhance Pagespeed
- Disable ALL PLUGINS except the plugins mentioned in the link above.
- Disable ALL CUSTOM CODES, such as Ads, Google Map codes, etc.
- Remove any Videos, Facebook, Youtube, etc WIdget or blocks which load multiple external files.
- 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 https://web.dev/measure/ after that you can activate the things you disabled one by one and check its impacts on the speed.
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:
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.
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:
- Better WordPress Minify ( For CSS and JS )
5. Optimize Images
Optimizing your images will helps your WordPress site load faster.
Download and activate WP Smush.it This plugin will optimize every image you upload and you can use the Bulk Smush.it feature to smash all of your uploaded images.
Alternatives to WP Smush.it 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.