Speed up WordPress with AMP

by ,

We have by far the largest RPM repository with NGINX module packages and VMODs for Varnish. If you want to install NGINX, Varnish, and lots of useful performance/security software with smooth yum upgrades for production use, this is the repository for you.
Active subscription is required.

There are many ways to speed up your WordPress website. One of the latest technologies that Google brought for faster websites rendering is called AMP (Accelerated Mobile Pages). WordPress can leverage this technology using WordPress AMP plugin.

WordPress AMP plugin

There’s a bunch of AMP plugins for WordPress. It is most safe to use the one that has “official” status.
The plugin is called simply: AMP.
Install the plugin first.

Once it is active, you can verify how it works by heading to any post page. Then adjust the browser URL and prepend /amp/ to it. You will see your page without menus, slightly differently formatted. But it will load up faster.

How AMP works

Google will index your standard posts (the non-AMP ones). It will see that your original posts contain internal meta links to AMP versions.
Once Google is aware of AMP versions existence, it will index the AMP version of each post.

Subsequently, for supported mobile visitors who land to your site via Google search, the search engine will preload AMP posts for even faster browsing experience.

So think of AMP speed improvement in two ways:

  • The AMP version of each post is faster on its own
  • Google search engine (among others) will preload the AMP version and enable faster loading of your posts from Google’s own cache

Optional. Glue for Yoast SEO & AMP

In case you’re using Yoast SEO plugin, it is recommended to setup an additional plugin “Glue for Yoast SEO & AMP” to connect AMP and SEO plugins nicely.

Use Google Analytics with AMP

The AMP technology doesn’t really allow to place random blocks within your accelerated pages. As such, default Google Analytics tracking code won’t work there.
Once you got a hold of the Glue plugin, you can add the AMP-friendly Google Analytics tracking code on SEO->AMP settings page. Copy paste the tracking code below. Make sure to replace UA-XXXXXX-XX with your actual Google Analytics property ID.

Google recommends setting up a separate property just for the AMP pages, so your Google Analytics property ID for AMP will be different from what you use on the standard WordPress pages.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: