Wednesday, May 18th, 2022

How to Enable and Disable Google AMP in WordPress

Do you want an easy way to take advantage of Google’s Accelerated Mobile Pages framework?

In this tutorial, we show you how to enable Google AMP on your WordPress site.

However, since many publishers have experienced a drop in conversion rates due to technical issues after enabling Google AMP, we’ll also show you how to disable it.

And to be clear: We have provided this tutorial at the request of our readers but We do not recommend using Google AMP.

How to Enable Google AMP in WordPress

Step 1: Install Google AMP WordPress Plugin

Warning: These plugins integrate Google AMP with your site automatically and will cause 404 errors if you remove it without following the proper steps (such as adding redirects, etc.). Do your research, and make sure Google AMP is the right fit for your site before continuing.

Automattic has its own AMP plugin, but it has an average star-rating of 3.8 out of 5 stars and limited features, so we’re going to use a third-party solution instead.

AMP for WP has an average star-rating of 4.4 out of 5 stars and allows you to completely customize the look and behavior of AMP pages.

It has a free version, so you can install it from the WordPress admin by installing the one made by the Kaludi brothers.

Select a setup option when prompted. We will be using Advanced Setup for the purpose of this tutorial.

The plugin automatically adds Google AMP to your site when activated. Open one of your latest posts and add “/amp” to the end of its URL, then refresh to see how the plugin has implemented AMP on your site.

wordpress blog google amp

Step 2: Configure basic settings

Configure the following settings using the plugin’s Setup Settings panel:

  • Where do you need AMP? – Choose the post types you want to optimize with AMP.
  • design and presentation – Add a logo in 120 x 90px format, and assign a global color to use on all AMP pages.
  • analytics tracking – Add Tracking ID for multiple analytics tools.
  • Privacy settings – Enable the cookie notification bar if your site uses them, and if relevant tell users that your site is GDPR compliant.
  • third party compatibility – Set up your SEO plugin (nine integrations to choose from), integration with Elementor, Structured Data, Ads for WP and PWA for WP.
amp to wp setup

Step 3: Configuring additional settings

There are many different settings you can configure in AMP for WP. For example, if you share your content on Facebook, you’ll probably want to go to the SEO settings page and enable the OpenGraph meta tags option.

If you already have a minify and caching solution installed, you may also want to disable the minify option in the Performance section if your solution is compatible with AMP for WP.

Filter out the rest of the technical settings, and configure any settings that apply to your site.

Another important aspect that you can customize even further is the design. For example, you can use the theme if you purchase a premium license for at least $149/year.

amp to wp themes

You can also customize styles for links, buttons, typography, your sidebar, social sharing, and more.

How to Deactivate Google AMP in WordPress

Unfortunately, disabling Google AMP for your WordPress site is not as easy as deactivating and removing the plugin that you used to implement it. You’ll notice this as soon as you try to load a non-AMP version of a page for which you have AMP implemented and are instead redirected to a 404 error page.

Also, the entire deactivation process can take up to two weeks as you will have to wait until Google stops indexing your AMP-enabled pages.

pay attention: This method is optimized for WP to AMP.

Step 1: Stop Google from indexing AMP pages

Open the SEO section of AMP for WP’s Settings Panel, and add the following code snippet to the Head section:

<मेटा नाम = "रोबोट" सामग्री = "नोइंडेक्स, अनुसरण करें" />

amp for wp seo no index

Save your changes, and wait a week or two. This gives Google enough time to stop indexing your AMP-enabled pages.

Step 2: Deactivate the Plugin, and Set Up Redirects

Deactivate and remove the AMP for WP plugin once indexing becomes slow.

Next, install a free plugin called Redirection as an easy way to fix 404 page errors left by AMP.

Go through the setup wizard, then go to the Redirection section.

Add this snippet of code to the Source URL field to set up redirects for all AMP-enabled pages instead of one, and choose Regex as the URL option:

/(.*)/amp

Add the URL of your domain in the Target URL field, but add “/$1” at the end:

https://yourdomain.com/$1

Select Redirection as a group, then click Add Redirection.

redirect wordpress plugin

To test the redirection, simply load one of your AMP pages to see if it redirects you to the non-AMP version instead.

Source link