Using AMP plugins with WP Rocket

In this Article

AMP (Accelerated Mobile Pages) is Google's open-source project built to speed up websites’ loading time. Initially, it was aimed for mobile but now it has been extended to all kind of devices.

Compatible plugins

WP Rocket has built-in, automatic compatibility with:

  • Automattic’s AMP plugin is compatible starting from WP Rocket 2.6.16.

    When the Standard Template Mode is selected, your site uses a single theme and there is a single version of your content. In this case, page caching works but other optimizations are not applied.
    Select the Transitional Template Mode instead:

    Note: Any AMP plugin based on Automattic's solution should be compatible too. 

  • Google's Web Stories plugin is compatible starting from WP Rocket 3.7.5

This 3rd party developer have told us they have made their plugin compatible with WP Rocket:

What does our AMP compatibility do?

WP Rocket’s page cache feature will work, and WP Rocket will automatically cache the AMP posts with the ?amp query string. However, WP Rocket will deactivate these incompatible features: Minification, DNS Prefetch, LazyLoad, Optimize CSS delivery (Load CSS Asynchronously and Remove Unused CSS), Load JavaScript deferred, Delay JavaScript Execution and the CDN rewrites will work for the images only. 

Why are WP Rocket’s advanced optimizations not applied on AMP pages?

AMP pages have their own specific JavaScript components and do not allow any custom JavaScript nor anything that’s not included in their components’ catalog. Any other JavaScript  or optimization could break the AMP markup, and thus, it’s automatically excluded.

How to exclude AMP pages from other plugins to prevent issues

You can exclude AMP pages/posts from other AMP plugins by setting the /(.*)/amp exclusion in the Never Cache URL(s) box, like this:

Known issues

The following plugins are currently incompatible or have issues with WP Rocket

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.