AMP support is integrated via official WordPress AMP plugin (built by Automattic), available for free downloadin the wordpress.org repository. You can also install it directly from the WP admin => Plugins => Add new.
After installing the plugin checkout AMP specific options in WP admin => Appearance => AMP.
Please make sure that in Dashboard => W3 Total Cache => General Settings Minify is enabled
Important to know that if Database cache is enabled
then in “Reject query words:” need to add ^\s*LOCK TABLES\b and ^\s*UNLOCK TABLES\b
Note: please don’t forget to enable minification to have valid amp pages, one of the best approaches is using appropriate option via W3 Total Cache plugin in WP-admin => Performance => Minify => HTML & XML section.
Learn more about how Google AMP Affects Your SEO here
AMP ESSB sharing plugin integration
If you are using Easy Social Share Buttons plugin, you’ll need to go to WP-admin => Easy Social Share Buttons => Where to display => AMP sharing section and turn on the checkbox for “Personalize display of share buttons on AMP pages/posts”.
In the last version of Easy Social Share Buttons plugin, AMP support module bundled into plugin core. After updating ESSB plugin to the last version, you will need to deactivate “Easy Social Share Buttons for WordPress Addon – AMP Support” addon if you used it in the past.