Configuring W3 Total Cache for Pagespeed Insights (or what we did so you can laugh at us)
One of the big things I tackled when I took over Pocketables was dealing with a highly customized site aimed at mobile users where the theme didn’t support mobile users, and it hadn’t really been functionally updated since 2013.
Once we got a theme that worked with mobile and desktop, the biggest complaint was loading speeds and that was knocking us down on search engines which is where about 90% of our traffic comes from.
Should note – the pay version may do this all for you. Don’t know.
We were still scoring abysmally on Pagespeed Insights – a free site testing location owned by Google that more or less can give you an idea if you’re going to be penalized in search rankings by how long it takes your site to load.
Now, we still are showing pretty slow, but that’s primarily due to Google Ads and the video, which if we get enough support would be going away. However next to nothing is now Pocketable’s issue.
Step 1 – install W3 Total Cache in WordPress.
Step 2: Under general settings enable Page Cache, Minify, select manual mode*. That should be it. Save settings and purge cache.
*select auto if you are fine with it. W3 Total Cache will do good here, but not great with off-site scripts.
Step 3 – Minify settings, the only thing that’s going to be a pain
I have Inline CSS and JS minification checked. CSS Enable and combine only (combine only may just be our getting it to work right with Cloudflare setting, feel free to experiment)
Save and purge cache
Step 4 – the part that sucks
Each request takes some time, 40+ take a lot of time, especially on slow connections as you have to contact the server, the server say yo, you tell it what you want, it serve it.
On Pocketables it was claiming 18+ seconds for render blocking resources. This was incorrect, but whatever. We lowered that to 0.19 seconds, which I consider a good improvement.
OK, head over to PageSpeed Insights, enter your website, and scroll down to Render Blocking Resources.
Adding just a plugin or two balloons the number of scripts, css, and other things that are served. Each of the render blocking resources used above take time to get, load, execute. Each one is a fraction of a second, but they add up.
Assuming you’ve got quite a few, we’re going to put these into some wads of code.
We’re going to enter these one by one in the JS and CSS file management minification section.
Save settings, purge cache, wash hands, wipe on pants.
After adding everything things broke, looked like garbage, and I ended up pulling out a line that had jquery.js, reload, and bam. 18 seconds of render blocking resources were now listed as 0.19 seconds.
What about AMP?
Appears we fixed that with adding under the page cache setting / Never cache the following pages:
Got any secrets, let me know. I never wanted to work on WordPress, never wanted to run the site, just wanted to write little rooting articles and things about what I was interested in.