Linux 软件免费装
Banner图

AMP WP - Google AMP For WordPress

开发者 mohsinrafique
pixelative
更新时间 2026年5月30日 07:08
捐献地址: 去捐款
PHP版本: 7.4 及以上
WordPress版本: 7.0
版权: GPLv2 or later
版权网址: 版权信息

标签

mobile AMP accelerated mobile pages page speed Google AMP

下载

1.0.0 1.0.1 1.0.2 1.0.3 1.0.4 1.0.5 1.1.0 1.1.1 1.2.0 1.2.1 1.2.2 1.3.0 1.3.1 1.4.0 1.4.1 1.4.2 1.4.3 1.4.3.1 1.5.0 1.5.1 1.5.10 1.5.11 1.5.12 1.5.13 1.5.14 1.5.15 1.5.16 1.5.17 1.5.18 1.5.19 1.5.2 1.5.3 1.5.4 1.5.5 1.5.6 1.5.7 1.5.8 1.5.9 1.6.0 1.7.0 1.7.1 1.7.10 1.7.11 1.7.2 1.7.3 1.7.4 1.7.5 1.7.6 1.7.7 1.7.8 1.7.9 1.8.0

详情介绍:

AMP WP is the most feature-rich, developer-friendly, and beginner-ready Google AMP plugin available for WordPress, completely free. Originally built by Pixelative, a professional web development agency, AMP WP is now independently developed and maintained by Mohsin Rafique, the lead engineer behind the plugin since its inception. AMP WP has helped thousands of website owners dramatically improve mobile page speed, search rankings, and user experience. Online Demo | CF7 Premium Extension | Support Why AMP WP? Google's Accelerated Mobile Pages (AMP) technology delivers pages up to 5x faster on mobile devices. Faster pages mean lower bounce rates, higher engagement, and better rankings in Google Search. AMP WP makes enabling AMP on your WordPress site effortless, from a single settings panel with no theme modifications needed. Free Features Performance & Compatibility Maintained by Mohsin Rafique AMP WP was originally created by Pixelative, a full-service digital agency specializing in high-performance WordPress solutions, and remains under Pixelative's ownership. The plugin is currently developed, updated, and supported independently by Mohsin Rafique, a seasoned WordPress engineer with deep expertise in AMP specification compliance, PHP performance, and modern web standards. For support, custom AMP theme development, or white-label licensing, contact Mohsin Rafique at mohsinrafique.com or mohsin.rafique@gmail.com. Credits

屏幕截图:

  • Single Post Page
  • Tags, Social Icons, Related Posts, Comments, and Footer
  • Search & Archive Page
  • 100% Valid AMP Content
  • AMP WP Options Panel
  • AMP Auto Ads Support
  • Compatible with Major Cache Plugins
  • Embed Images, Videos, Audios & iFrames
  • Toggle Search & Header
  • Recent Comments
  • Sidebar, Social Icons & Related Posts
  • Core WordPress Customizer Integration
  • AMP WP Settings Panel

升级注意事项:

1.8.0 New "Hide Title in Single" toggle in Settings > Layout > Single Post Page. When enabled, the post title (the H1 heading) is hidden on AMP single-post pages - handy when a long title takes up too much space on mobile. Off by default, so existing sites are unaffected; the title still appears in the browser tab and in JSON-LD structured data, so SEO is not impacted. 1.7.11 Hardened the @view-transition AMP fix from 1.7.10 with three-layer defense: head <style> tag extraction, input-layer stripping, and output-layer safety net. Resolves sites where 1.7.10 alone did not fully eliminate the validation error. No breaking changes. 1.7.10 Fixes AMP validation failure on WordPress 7.0 caused by the new @view-transition CSS at-rule. Also includes WPCS code-quality refactors across five function files (core-functions, formatting-functions, utility-functions, theme-functions, ad-functions) and six IDE diagnostic fixes in theme-functions. No breaking changes. 1.7.9 WordPress 7.0 compatibility verified. Also includes PHPCS/code-quality refactors across multiple component files (img, instagram, playbuzz, iframe, carousel, theme-functions) and a fix for Amp_WP_Html_Util::set_outer_HTML() which previously destroyed sibling elements when replacing an iframe embed. No breaking changes. 1.7.8 AdSense Auto Ads for AMP is now turnkey end-to-end. AMP WP 1.7.7 added the Enable Google Auto Ads toggle (loader in <head>); this release completes the picture by auto-emitting the matching <amp-auto-ads type="adsense" data-ad-client="ca-pub-XXXX"> element right after <body> on every AMP page. Closes the AMP validator error "The extension 'amp-auto-ads' was found on this page, but is unused. Please remove this extension." that surfaced on sites running Google Site Kit, because Site Kit's AdSense AMP integration only fires for the official Automattic AMP plugin and never injected the body element on AMP WP routes. Setup: (1) AMP WP -> Settings -> General, tick Enable Google Auto Ads, save. (2) Publisher ID is auto-resolved from Google Site Kit's AdSense module when Site Kit is installed and connected - nothing else to do. (3) Without Site Kit, supply your ID via the new amp_wp_adsense_publisher_id filter from your theme's functions.php or a mu-plugin. The filter accepts ca-pub-XXXX, pub-XXXX, or the bare numeric ID and AMP WP normalises before output; emission is silently skipped when no ID is resolvable so the page stays validator-clean. New public API: function amp_wp_get_adsense_publisher_id(), function amp_wp_render_auto_ads_element(), filter amp_wp_adsense_publisher_id. 1.7.7 Recommended for all users. Critical fix for sites using the GDPR Compliance banner: the EU country list inside <amp-geo> was being emitted as a corrupted HTML-encoded string (via esc_js() instead of wp_json_encode()), causing the AMP runtime to reject the whole config with a "country ... not valid, will be ignored" console error and silently disabling the geo-gated consent banner on every page. Update immediately if you rely on the GDPR consent banner. Also adds a new native Google Auto Ads toggle on the Settings > General page - enabling it enqueues the amp-auto-ads runtime loader via the canonical AMP component pipeline so admins no longer need to paste the script tag into the Customizer's head-code field; the manual loader is auto-cleaned on save. Plus a full WPCS sweep of the Tez theme directory (37 files, 49 errors and 31 warnings down to 0/0, no behaviour change), and a tidy-up that removes a dormant placement-manager file from core. 1.7.6 Recommended for all users. Three SEO-impacting fixes: (1) /favicon.ico and any other root-level static-file request on mobile no longer 302s to /<file>/amp and 404s. (2) Search-engine crawlers (Googlebot-Mobile, Bingbot, social-card scrapers) are no longer caught by the mobile auto-redirect to AMP, fixing "Redirect error" rows in Google Search Console Page Indexing. After updating, click "Validate fix" on the affected URLs in GSC and Google will re-crawl within 1-7 days. (3) Pagination on AMP archives now works for every URL shape (/shop/amp/page/N/, /product-category/<slug>/amp/page/N/, /category/<slug>/amp/page/N/, etc.) - previously broken when the AMP token appeared in the middle of the URI. Also introduces the new "Premium Extensions" tab (hidden until at least one AMP WP family add-on is active) and the new public APIs amp_wp_register_premium_extension() and amp_wp_register_template_path() that let AMP WP family add-ons (CF7, Comments, WooCommerce, WPForms, Gravity Forms, Ads Manager) self-register and ship their own AMP templates. 1.7.5 Recommended for all users. Critical fix: mobile visitors could get stuck in a "too many redirects" loop on AMP URLs after admins changed the AMP-exclusion settings. Plugin-issued redirects now use 302 Found + nocache_headers(), with a one-shot Clear-Site-Data: "cache" on AMP-excluded redirects to auto-recover any client that already has a stale 301 pinned in its browser cache. The desktop-side cache-plugin fallback is now uncacheable as well, so caching plugins cannot serve a desktop response with a UA-sniffing redirect script to a mobile visitor. Also recommended for users of the AMP WP Comments add-on: Reply links were not appearing on threaded AMP comment lists in WordPress 6.8, the Reply button showed the wrong label, and amp-state blocks were silently stripped. Also fixes a malformed AFS Analytics JSON that disabled analytics on AMP pages when AFS Analytics was configured. 1.7.4 Recommended for all users. The header and sidebar logo was silently stripped on every AMP page since v1.7.2 due to a PHPCS escaping regression. Update immediately if your logo is not appearing. 1.7.3 Recommended for all users running any of these plugins alongside AMP WP:
  • Yoast SEO: meta description, Open Graph, and Twitter Card tags were silently missing on all AMP pages with Yoast v14 and above. Duplicate title and robots tags also fixed. A 300-second timeout on the AMP front page caused by an infinite callback loop is also resolved.
  • All In One SEO Pack: meta description, Open Graph, and Twitter Card tags were silently missing on all AMP pages with AIOSEO v4 and above. Homepage title sync also fixed.
  • WP-Optimize: HTML compression, Delay JS, and page caching all previously ran unchecked on AMP pages and could break or cache corrupted output. All three are now correctly disabled for AMP responses.
  • WP Fastest Cache: HTML minification, CSS minification, and comment removal all ran unconditionally on AMP pages. All are now correctly disabled.
  • OneSignal Web Push Notifications: the subscribe/unsubscribe widget was never rendered on AMP pages due to a code bug. Now fixed.
  • wpForo Forum: AMP pages were incorrectly served on wpForo forum URLs on all wpForo 3.x installs. The detection bug is now fixed.
1.7.2 Recommended for all users. Key fixes in this release:
  • AdSense Auto Ads: corrected head injection order so Auto Ads fire correctly on all AMP pages.
  • Font Awesome: upgraded from 4.7.0 to 6.7.2, eliminating browser console font warnings. No changes to your icons or templates required.
  • Google Analytics: GA4 Measurement IDs (G-XXXXXXXX) now use the correct AMP analytics tag. Fixes the console warning seen after migrating from Universal Analytics.
  • Structured Data: 11 JSON-LD / Schema.org issues resolved for better Google Rich Results compliance.
1.7.1 Recommended if you use ACF or other plugins that ship Select2, fixes admin CSS conflicts. Also fixes a UX bug where the "Add Comment" button was hidden on posts with zero comments. 1.6.0 Recommended for all users. Adds Instagram Reels and IGTV support, improves AMP iframe handling and layout detection, fixes PHP 8 compatibility issues, updates JSON-LD structured data to current Schema.org standards, and removes two retired AMP components. 1.5.19 Recommended for PHP 8.4 users. Resolves a deprecated return-type warning in the HTML utility class. 1.5.10 Important fix for sites using the "AMP URL at end" format, which resolves a self-canonical AMP URL issue.

常见问题:

What is the URL structure for AMP pages?

AMP WP supports two URL formats:

  1. Prefix format: https://yoursite.com/amp/page-name
  2. Suffix format: https://yoursite.com/page-name/amp
You can choose your preferred format from AMP WP -> Settings -> General.

How do I add analytics tracking?

Go to AMP WP -> Settings -> Analytics in your WordPress admin dashboard. AMP WP supports Google Analytics, Facebook Pixel, Segment, Quantcast, Alexa Metrics, Chartbeat, comScore, Yandex Metrica, AFS Analytics, and Adobe Analytics.

The post listing layout looks broken: how do I fix it?

This is usually caused by inconsistent thumbnail sizes. Install and run Regenerate Thumbnails to normalize all image sizes.

Does AMP WP support Instagram Reels and TV posts?

Yes. Since version 1.6.0, AMP WP supports Instagram /p/, /reel/, and /tv/ post types natively via amp-instagram.

What prebuilt listing layouts are available?

Two layouts are included: Classic View and List View. Switch between them from AMP WP -> Options Panel.

How do I inject custom HTML (e.g., ad codes, analytics snippets)?

Go to Dashboard -> AMP WP -> Customize AMP. You can inject valid AMP snippets:

  • Between <head></head> tags
  • Right after the <body> opening tag
  • Right before the </body> closing tag Only valid, AMP-compatible code will function on AMP pages.

How do I enable AdSense Auto Ads for AMP?

Recommended path (AMP WP 1.7.7 and later):

  1. Open Dashboard -> AMP WP -> Settings -> General.
  2. Scroll to the Google Auto Ads section.
  3. Tick the Enable Google Auto Ads checkbox and click Save Changes.
When the toggle is on, AMP WP automatically takes care of both halves that AdSense Auto Ads needs on every AMP page:
  • The amp-auto-ads runtime loader (<script async custom-element="amp-auto-ads" src="https://cdn.ampproject.org/v0/amp-auto-ads-0.1.js"></script>) is injected inside <head> via the canonical AMP component pipeline.
  • The matching <amp-auto-ads type="adsense" data-ad-client="ca-pub-XXXXXXXXXXXXXXXX"> element is emitted right after <body> so the AMP validator sees the extension as "used" and AdSense can place anchor, vignette, and in-page ads.
Where does the publisher ID come from?
  • With Google Site Kit installed and AdSense connected: the publisher ID is read automatically from Site Kit's stored AdSense module setting (no extra typing needed).
  • Without Site Kit: supply your ca-pub-... value via the amp_wp_adsense_publisher_id filter. Drop this into your theme's functions.php or a small mu-plugin:
add_filter( 'amp_wp_adsense_publisher_id', function() { return 'ca-pub-XXXXXXXXXXXXXXXX'; } ); The filter accepts any of the three plausible input shapes - ca-pub-XXXX, pub-XXXX, or the bare numeric ID - and AMP WP normalises the value before output. If no publisher ID is resolvable, AMP WP silently skips the body-side element so the page stays validator-clean. Manual fallback (non-AdSense ad networks, custom snippets): Navigate to Dashboard -> AMP WP -> Customize AMP. Paste the runtime loader script in the "Codes between <head> and </head> tags" field, and your <amp-auto-ads> (or other AMP-valid ad markup) in the "Codes right after <body> tag" field. When you later enable the native Google Auto Ads toggle, AMP WP auto-cleans any manually-pasted amp-auto-ads loader from the head-code field and surfaces a one-shot admin notice confirming the cleanup, so the native injection path remains the single source of truth. AdSense Auto Ads for AMP - Google Help

How do I enable or disable AMP for a specific post?

Edit the post in WordPress, scroll to the AMP WP meta box in the sidebar, and toggle the AMP option on or off for that individual post.

How do I report a bug or request a feature?

Please email mohsin.rafique@gmail.com or open a thread on the WordPress support forum.

更新日志:

1.8.0 - 2026-05-30 Features 1.7.11 - 2026-05-25 Fixed 1.7.10 - 2026-05-25 Fixed 1.7.9 - 2026-05-21 Fixed 1.7.8 - 2026-05-14 Features 1.7.7 - 2026-05-14 Features 1.7.6 - 2026-05-12 Features 1.7.5 - 2026-05-07 Fixed 1.7.4 - 2026-05-01 Fixed 1.7.3 - 2026-04-30 Fixed 1.7.2 - 2026-04-26 Fixed 1.7.1 - 2026-04-26 Fixed 1.7.0 - 2026-04-23 Features