window._wpemojiSettings = {"baseUrl":"https:\/\/s.w.org\/images\/core\/emoji\/12.0.0-1\/72x72\/","ext":".png","svgUrl":"https:\/\/s.w.org\/images\/core\/emoji\/12.0.0-1\/svg\/","svgExt":".svg","source":{"concatemoji":"https:\/\/wpbrilliance.com\/wp-includes\/js\/wp-emoji-release.min.js?ver=5.2.4"}}; !function(a,b,c){function d(a,b){var c=String.fromCharCode;l.clearRect(0,0,k.width,k.height),l.fillText(c.apply(this,a),0,0);var d=k.toDataURL();l.clearRect(0,0,k.width,k.height),l.fillText(c.apply(this,b),0,0);var e=k.toDataURL();return d===e}function e(a){var b;if(!l||!l.fillText)return!1;switch(l.textBaseline="top",l.font="600 32px Arial",a){case"flag":return!(b=d([55356,56826,55356,56819],[55356,56826,8203,55356,56819]))&&(b=d([55356,57332,56128,56423,56128,56418,56128,56421,56128,56430,56128,56423,56128,56447],[55356,57332,8203,56128,56423,8203,56128,56418,8203,56128,56421,8203,56128,56430,8203,56128,56423,8203,56128,56447]),!b);case"emoji":return b=d([55357,56424,55356,57342,8205,55358,56605,8205,55357,56424,55356,57340],[55357,56424,55356,57342,8203,55358,56605,8203,55357,56424,55356,57340]),!b}return!1}function f(a){var c=b.createElement("script");c.src=a,c.defer=c.type="text/javascript",b.getElementsByTagName("head")[0].appendChild(c)}var g,h,i,j,k=b.createElement("canvas"),l=k.getContext&&k.getContext("2d");for(j=Array("flag","emoji"),c.supports={everything:!0,everythingExceptFlag:!0},i=0;i
Mar 13, 2019
31 Views
0

WordPress Speed Optimization: Beating The New Google PageSpeed Insights

Written by

Beyond being a thorn in the side of many a WordPress webmaster, Google’s PageSpeed Insights tool is also one of the most well-known tools for WordPress speed optimization. This free tool accepts your site’s URL and spits back two scores that indicate how optimized your site is for mobile and desktop visitors. These scores are no longer just theoretical – they’re now based on real performance data, and they also have a real effect on your site, with Google using page speed as a ranking factor for both its desktop and mobile search results. In this post, we’ll explain the recent changes to…

Beyond being a thorn in the side of many a WordPress webmaster, Google’s PageSpeed Insights tool is also one of the most well-known tools for WordPress speed optimization.

This free tool accepts your site’s URL and spits back two scores that indicate how optimized your site is for mobile and desktop visitors.

These scores are no longer just theoretical – they’re now based on real performance data, and they also have a real effect on your site, with Google using page speed as a ranking factor for both its desktop and mobile search results.

In this post, we’ll explain the recent changes to PageSpeed Insights. Then, we’ll share some WordPress page speed tips that you can use to speed up your site and get a better score.

Explaining How The New PageSpeed Insights Tool Works

In the past, PageSpeed Insights only provided a set of suggestions to optimize your site, with your score based upon how well your site implemented those suggestions. It did not include any real-world performance data in its page speed test.

That’s changed with the newest version. Now, PageSpeed Insights grades your site on how it actually performs using a tool called Lighthouse.

The latest version of PageSpeed Insights includes two types of real-world test data:

  • Lab data – this is an emulated test that shows how long it takes your site to load on a mobile network (e.g. 3G).
  • Field data – this incorporates real data from real anonymous mobile Chrome users via the Chrome User Experience Report (CrUX).

Because lab data uses fixed conditions, while field data includes a variety of devices and connection speeds, it’s normal to see different results between the two.

Based on how quickly your site loads for various performance metrics (full table), Google gives you a score that places your site into one of three buckets:

  • Fast – 90-100.
  • Average – 50-89.
  • Slow – 0-49.

According to Google, “100 is the best possible score which represents the 98th percentile, a top-performing site. A score of 50 represents the 75th percentile.”

WordPress speed optimization - screenshot of WPZOOM's score

This ranking matters for a couple of reasons.

First, Google uses page speed as a ranking factor on both mobile and desktop devices. If your site is in the red (0-49), that means it loads slowly compared to other sites, which might negatively affect your site in Google’s rankings.

Second, Google makes speed a factor because of the connection between page speed and user experience. Humans just plain don’t like slow-loading websites, especially when browsing from mobile devices.

Why Your Mobile And Desktop PageSpeed Scores Might Be Different

When you test your site, it’s not uncommon to see a high desktop score and a low mobile score. Here’s why:

Desktop users experience your site from a comparatively high-powered device and a comparatively fast Internet connection.

Mobile users are the opposite – they’ll typically have a device with a less powerful CPU and be browsing from a slower mobile connection (those are also the conditions Google uses to emulate its test).

For those reasons, it’s quite possible to have a site that’s faster-than-average for desktop visitors (90+ score), but slower-than-average for mobile visitors (sub-50 score).

Here are two examples why that might happen:

  • Image-heavy site. For desktop users, those extra images might not have much effect. But on a slower 3G connection, those images might take significantly longer to load.
  • JavaScript-heavy site. A laptop might have no problem quickly processing lots of JavaScript, but a low-powered smartphone might take significantly longer to parse and process the code (Google uses a mid-tier Moto 4G for its emulation tests – not the latest flagship smartphone).

Minimize Javascript for WordPress page speed

Both of those suggestions only apply to the mobile score and deal with the time it takes to parse and process JavaScript.


WordPress Speed Optimization: How To Improve Your PageSpeed Insights Score

Ok, now for the fun part – how to actually improve your WordPress site’s PageSpeed scores. Here are 6 tips that you can implement today to speed up your site and improve your score.

1. Enable GZIP Compression

GZIP compression shrinks the size of the files that your server sends to visitors’ browsers by a significant amount (up to 70%):

Some caching plugins – like WP Rocket – include GZIP compression functionality.

Alternatively, you can add the following code to your site’s .htaccess file:


AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript

2. Optimize Images

To automatically resize and compress your site’s images, you can use a free plugin like Smush or ShortPixel. ShortPixel can also help you serve WebP images, which helps with PageSpeed Insights’ “serve images in next-gen formats” suggestion:

You can also enable lazy loading with the free Lazy Load by WP Rocket plugin, which waits to load below-the-fold images until a user starts scrolling down. This is a really nice method for WordPress speed optimization.

3. Eliminate Render-Blocking Javascript

“Render-blocking” JavaScript prevents your site from loading human-visible content until the blocking JavaScript finishes loading. This can be especially punishing on your mobile score, for reasons we discussed above:

For a non-technical solution, you can use the Async JavaScript plugin to async or defer JavaScript:

Make sure to thoroughly test your site afterward, as this all-in approach can break certain scripts.

4. Leverage Browser Caching

Browsing caching lets you store certain static assets – like your site’s logo – on visitors’ local computers to prevent visitors from needing to download those files on each page load.

Many caching plugins include browser caching. Otherwise, you can add this code snippet to your site’s .htaccess file:



Header set Cache-Control "max-age=604800, public"

5. Minify JavaScript And CSS

Minification lets you shrink the size of JavaScript and CSS files by eliminating unnecessary white space:

Many caching plugins include minification functionality. Or, you can use a dedicated solution like the free Autoptimize plugin:

6. Reduce Server Response Time

Part of server response time is your host’s performance, so one solution here is to simply upgrade to a faster host.

Other options to reduce server response time include:

Wrapping Up: WordPress speed optimization

Putting these WordPress speed optimization tactics into action isn’t just about improving the two numbers on your screen.

By optimizing your site, you’re speeding up its page load times. That means a better experience for your visitors, and it also means giving your site the best chance possible to reach more visitors in Google’s search results.

Apply these WordPress page speed tips today and start enjoying a faster WordPress site.

Article Categories:
WordPress Tips

Leave a Reply

Your email address will not be published. Required fields are marked *

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc a odio nec justo rutrum faucibus.
$20
Buy Now