How to Implement Google AMP for WordPress | Ultimate Guide

amp guide

In our previous article, we covered everything you need to know about Google AMP. AMP greatly improves user experience on mobile and can be a game-changer for your SEO efforts.

Learn how to implement AMP for WordPress by following this quick step-by-step guide.

Step 1: Install AMP plugin

Step 2: Set Up Google Analytics

Step 3: Validate WordPress AMP Site

Step 4: Fix the Errors

Step 5: Test your Speed

Step 1: Install AMP plugin

In our article about the best free plugins for WordPress, we already talked about the best AMP plugin and its alternative. We suggest choosing between the official AMP plugin or AMP for WP – Accelerated Mobile Pages. Which plugin is best for you depends on your preferences and priorities.

Remember, each plugin comes with additional weight, which can be bad for the web page’s speed, so make sure you use as few plugins as possible. 

AMP 

amp plugin

The official AMP plugin for WordPress is a no-brainer. It is the most straightforward and intuitive plugin which will convert all your posts into AMP versions seamlessly.

With the AMP plugin, you will benefit from 3 template modes and will be able to generate AMP-valid markups. Thanks to a recent update, AMP is now fully compatible with Yoast SEO and WP Forms plugins, meaning their features will be supported by default when you activate the AMP plugin.

How to install the AMP plugin?

  1. Log in to your WordPress account
  2. Click ‘Add New’ under the Plugins tab and search ‘AMP for WordPress’
  3. Install the first plugin called ‘AMP’
plugin wp

AMP plugin is an excellent and easy solution, however, it has limited functionality and customization options compared to its alternative–AMP for WP (discussed next).

For example, you will not be able to use structured data for logo and post image, drag-and-drop page builder, custom-style CSS, among other things.

AMP for WP – Accelerated Mobile Pages 

amp for wp plugin

This plugin has a lot more customization options than the previous one. For example, you can choose from various pre-designed templates or create your own under the Design tab. You can also use custom CSS (Cascading Style Sheets).

It is now fully compatible with the most popular and must-have WordPress plugins such as Gutenberg, Yoast SEO, Elementor, and more. It also enables third-party commenting systems such as Disqus and Facebook Comments.

This plugin also has an extensive list of paid features:

  • Email opt-in support (such as when a visitor is given an option to join a mailing list)
  • Call-to-action (CTA) support
  • AdSense support
  • Ninja Form, Contact Form 7, Caldera Form, and Graviry Form support
  • Advanced WooCommerce support

It also supports a range of third-party analytics, including Chartbeat, comScore, Statcounter, and more.

Overall, this plugin has the most to offer and has the most sophisticated customization options. However, if you’re not very tech-savvy and don’t run a website with a lot of structured data and rich user experience, the previous AMP plugin will do the job.

Regardless of which plugin you choose to install, make sure to configure your plugin settings, such as selecting the preferred design, adjusting the color scheme, enabling AMP support for different media types, and customizing CSS styling.

Step 2: Set Up Google Analytics

If the plugin supports third-party data analytics, you should definitely make use of it. We used Google Analytics in the example below, but your plugin may also support other analytics providers.

To enable Google Analytics on your AMP pages, you will need to copy your tracking ID from your Google Analytics Admin panel.

Steps how to do this:

  1. Log in to your Google Analytics and click on the gear icon ‘Admin’ in the bottom left 👇
google analytics panel
  1. You will see your ‘Tracking ID’ under the Property menu (it will begin with UA) 👇
google analytics tracking id
  1. Copy your ‘Tracking ID’ and paste it into your WordPress AMP > Analytics log 👇
amp analytics
  1. Click ‘Save Changes’

You may also need to create a new property if you don’t have one. To do so, copy the same steps as described above and from the Admin menu:

  • Click ‘Create Property
  • Fill in the field and select ‘Get Tracking ID’
google analytics panel


Step 3: Validate WordPress AMP Site

AMP Validator Extension

You will need to validate your AMP site to ensure it can be accessed and linked to. If you don’t configure it correctly, Google will not display it in search results, so make sure you do not skip this step.

The easiest way to do this is to use the AMP Validator Chrome extension. It will run your page through AMP Validator and report pass or fail.

amp validator extension

AMP Test

You can also go to https://search.google.com/test/amp, drop your URL, and click ‘Run Test’. The result will show if your page is validated or not.

valid amp page example

In most cases, you might see an error message because you have used HTML tags that are no longer supported by AMP. Make sure to check the full list of supported tags beforehand.

Step 4: Fix the Errors

For this step, you can use your browser’s Developer Tools Console. For Google Chrome, this is the Chrome DevTools console (see example below).

Steps how to do this: 

  1. Open the AMP page in your browser (it should have /amp or /?amp in the URL)
  2. Append #development=1 to your page’s URL

Your link should look like this:

https://example.com/example/amp/#development=1

  1. From the Chrome menu, select ‘More tools’ > ‘Development tools’, and then click the ‘Console’ tab
google dev console steps
  1. Check the errors. (If any errors are present, they will be highlighted)
dev console validation

Normally, you will be able to auto-fix all errors. However, the AMP project also has a full list of common errors and ways to fix them.

Step 5: Test your Speed

This is optional, but you may want to find out how your speed increased with AMP. Use a simple tool like PageSpeed Insights to measure your efforts.

Final Word

In today’s mobile-centric world, the adoption rates for AMP and similar technologies are rising, and the trend is expected to stay. Just a 1-second delay in page loading time can turn visitors away from your site.

We suggest you integrate AMP into your mobile content strategy and test how it performs. Luckily, AMP is fully compatible with WordPress, and the integration process is simple and straightforward.

Still have questions? Let us know in the comments! 👇

Join the conversation