How to Edit AMP Content for Magento 2 CMS Pages

The Magento 2 AMP extension automatically converts the HTML content of your website pages to AMP format. It perfectly deals with About Us and similar CMS pages that do not use JavaScript code or contain complex HTML elements. Otherwise, you should specify the AMP content manually and replace complex elements with AMP components.

Additionally, the extension comes with AMP Theme One that provides a template for AMP Homepage along with many templates and configurations. Please check the separate article about Magento 2 AMP Homepage configuration.

In this article, you will learn how to edit CMS pages and set AMP content manually. Please follow the instructions below.

Editing Content for CMS Pages

Step-by-step guide:

  1. In the main Magento menu, go to Content -> Elements -> Pages. You will find a grid with the available CMS pages.
  2. In the CMS Pages grid, find the needed page, and click clicking Select -> Edit in the corresponding record. You will get to the CMS edit page.

Magento AMP Pages - CMS Grid

Step-by-step guide:

  1. In the WYSIWYG editor under the Content tab, you can edit the page’s content that will be automatically converted into AMP format. Please note that the AMP Content field must be empty for the content to be automatically converted.
  2. Do not forget to click Save after changes have been made.
Editing Magento AMP Page

Editing AMP Content for CMS Pages

In this section, learn how to set AMP content manually for pages with JavaScript and other complex elements.

Step-by-step guide:

  1. In the main Magento menu, go to Content -> Elements -> Pages. In the CMS Pages grid, find the needed page, and click clicking Select -> Edit in the corresponding record. You will get to the CMS edit page.
  2. Scroll down to the AMP Content field, and enter the content for the CMS page. Currently, the WYSIWYG editor is not supported in this field, so we recommend using the online AMP playground to write valid AMP HTML code and paste it here. Additionally, check the guide on how to add AMP widgets if you want to insert one.
  3. Click Save to apply changes.
Editing Magento AMP Page 2

Validating CMS Pages

After you set AMP Content and saved the CMS page, make sure it is valid. To check it, click AMP Validation on the Edit CMS Page or check the AMP validation article.

Step-by-step guide:

  1. On the Edit CMS Page, click AMP Validation to check if the page is valid.
Validating AMP Page in Magento 2

Related page: How to Edit AMP Content for CMS Blocks in Magento 2.

Was this article helpful?