1. Home
  2. Developer Docs
  3. How to make your theme compatible with AMP

How to make your theme compatible with AMP

If you want to make your theme compatible with AMP like the same design in AMP then you need to follow this tutorial.

Step 1:

Create a folder with the name “ampforwp” in your theme which you are currently using.

e.g: if you are using Twenty Seventeen theme then you have to create “ampforwp” folder in the twenty seventeen theme folder

The directory will look like


Step 2:

Add the file which you want to override in this folder.

For example: If you want to override index.php that is your homepage then you need to add your index.php in this folder and it will override the index.php of your AMP version.

Similarly, you can override all files like single, archive etc according to your needs.

Note: If you need to add custom CSS then you can add it by creating a new file with the name style.php in the same folder and add it.

That’s it for this tutorial!

We hope it helped you. If you have any feedback or questions, then please share them in the comments section below.

Ask your Questions Directly!
If you can't find the solutions in this article, then just ask us in the comments and we will answer it for you!
Updated on September 9, 2019

Was this article helpful?

Related Articles

Need Support?
Can’t find the answer you’re looking for? Don’t worry we’re here to help!
Contact Support


    1. Hi Zain,

      Will you please elaborate more about your issue so that we will understand and help you.

  1. hi
    the amp pages should be seen automatically just in mobile size?
    if yes, it does not work for me.

    1. Hi alireza,

      Will you please enable mobile redirection option for this follow these steps WordPress dashboard -> AMP option panel -> Settings -> Advance Settings ->
      enable “Mobile Redirection” option like below the screenshot -> and still if you are facing issue/problem then contact our technical team - they will help you as soon as possible

Leave a Comment