I didn't totally figure it out but got my sites to load much faster and now get good scores from PageSpeed Insights from Google. One site went from 68 to 85 (site 1), other from 72 to 89 (site 2)
Here is what I did:
- installed WP Super Cache plugin and checked all recommended settings. I used this guide: How to Install and Setup WP Super Cache for Beginners
- installed WP Smush It plugin to make images smaller
- installed WP Optimize plugin to delete all stored and unused data - post revisions, old meta-tags etc
- installed WP Minify plugin to compress HTML, JS and CSS - for one site I only used a setting to compress HTML because when you choose to compress CSS and JS your site might loose certain elements. (but by implementing those I actually got a score of 92 for site 1)
then I went to .htaccess file and added 2 codes.
1. For leveraging browser caching. I found a code on this site: How to Leverage Browser Caching in WordPress via .htaccess
2. For compressing JS, HTML, CSS and XML files. I found code here: Top 3 Methods to Enable Gzip Compression in WordPress
The main thing that slows down my websites loading speed is ShareThis plugin and my social media buttons plugin but I don't know how to optimize these.
The scores are still really good even with these plugins being installed on my site.
I'm not a pro and did all this by reading articles and testing so if anybody has any comments and recommendations for speeding up WP sites please share