Google has added a parameter to their ranking algorithm that corresponds to how well your site performs. They created a tool called Page Speed Insights (https://developers.google.com/speed/pagespeed/insights/) that checks for a number of things: Initial load, time to first painting, time to full painting, time to interactive, etc.
It provides quite a lot of help for issues it discovers.
Things that it found with mine:
- Images were using legacy file types and were larger than if they were using webp. They suggested a WordPress plugin to convert existing images and serve the webp images in place of the current images. The plugin modifies the .htaccess file so that any requests are redirected to the smaller images.
The plugin I used is called: WebP Converter for Media. Because of my proxy arragement, I had to do some additional manual configuration to get it to work. As my situation is unique, I won’t go into detail.
- Responses weren’t compressed and static files didn’t have a cache policy. This was an apache change the rquired loading a couple of modules: deflate, filter, cache and disk_cache.
Edit the httpd.conf file and add:
between the <Directory> tags
After the closing Directory tag add:
CacheEnable disk /
Add the following to server-default.conf:
ExpiresDefault “access plus 7 days”
To add the LoadModule lines to the config files, run the following commands:
a2enmod -l (list the current modules)
Look for filter, deflate, cache and cache_disk in the list.
Type the following, omitting any that are in the list above:
Then restart the daemon
systemctl restart httpd
It should display no errors.
After implementing these changes, I re-ran page insights and there was a significant score improvement. There is another metric called GTmetrix (https://gtmetrix.com/) that does a simliar job.