没有什么比访问一个网站却发现它的主页需要很长时间才能加载(homepage takes ages to load)更令人沮丧的了。更糟糕的是,当图像质量很差并且布局没有得到很好的优化时。
事实上,谷歌的一项研究(Google study)发现,53% 的人离开的网站在三秒或更短时间内无法加载,这导致跳出率高,收入下降。
为了解决这些问题,Google创建了Accelerated Mobile Pages ( AMP )。AMP不仅可以加快您网站的加载时间,还可以帮助您设计一个引人入胜的网站(design a compelling site)、激动人心的移动体验,并提高平均点击率 ( CTR )。
在本指南中,我们将解释为什么Google AMP是 Google 首选的移动页面格式,以及如何为WordPress实施(WordPress)AMP。
什么是谷歌 AMP?(What Is Google AMP?)
Google AMP是 2015 年10 月(October 2015)推出的 Web 组件框架,旨在帮助创建和构建轻量级、用户至上的网站。移动计划旨在通过提供精简版网页来加速网络。
包括WordPress(WordPress)、Pinterest、华盛顿邮报(Washington Post)和Reddit在内的许多大公司都采用了AMP,并且每月独立访问者数量有所增加(increase in monthly unique visitors)。
当您的网页通过Google中的AMP提供给移动用户时,它看起来很简单,从而实现了AMP的目标,即闪电般的快速、动态体验和更好的可用性。
您的 WordPress 网站需要 AMP 吗?(Do You Need AMP on Your WordPress Site?)
AMP速度很快,但它并不是加快网页加载速度或提高网站速度(increase your site speed)的唯一方法。
有许多案例研究证明了AMP对出版商、企业和其他行业的积极影响,但也有许多案例研究失败。这意味着对于AMP(AMP)是否适用于所有网站没有明确的决定。
然而,真正的事实是AMP的成功取决于一些决策因素。例如,如果您的用户主要来自桌面设备,则AMP不适合您,因为AMP页面不会在桌面设备上显示丰富的功能,并且它们不是通过AMP 缓存(AMP Cache)提供的,因此用户可能无法享受这些好处。
黄金法则是AMP主要推荐给运行新闻网站和博客的发布商。像投资组合网站或登陆页面这样的其他任何东西都不一定需要AMP。
另外,如果您的非AMP页面可以在 2.5 秒内或以下标准加载,您可能不需要安装或维护AMP。
如何在 WordPress 网站上实施 AMP(How to Implement AMP on a WordPress Site)
在WordPress(WordPress)上创建网页的AMP版本可能看起来只有开发人员才能处理的任务,但只要有一点知识和一些指导,您就可以自己完成。
Google有一个工作流程,可指导您构建AMP页面、集成和优化页面、设置分析跟踪(set up analytics tracking),然后根据您的网站需求设计页面。
首先,Google会为您提供一个模板代码,您可以将其复制并保存为 .html 扩展名,然后添加所需的标记。这会将页面转换为可用的AMP HTML文档。
在发布之前,您可以使用边栏上提供的说明添加图像、修改布局、优化页面以进行 SEO(optimize the page for SEO)、预览和最终确定页面。
如果您愿意,可以先在amp.dev主页上试用(amp.dev)AMP ,然后再在自己的WordPress网站上试用。
如何在 WordPress 上安装 Google AMP(How to Install Google AMP on WordPress)
在您的WordPress网站上手动设置和安装Google AMP很复杂。但是,您可以使用官方 AMP WordPress 插件(official AMP plugin for WordPress)、AMP WP(AMP for WP)或AMP WP等插件来简化流程。
对于本指南,我们将向您展示如何使用官方WordPress AMP插件在WordPress网站上设置和安装AMP 。
如何使用 WordPress AMP 插件安装 AMP(How to Use the WordPress AMP Plugin to Install AMP)
- 首先,在您的WordPress网站上安装并激活WordPress AMP插件。转到WordPress仪表板,选择Plugins > Add New。
- 在搜索框中键入AMP 插件,然后选择(plugin)立即(Install Now)安装以安装插件。
注意(Note):如果您使用的是WordPress.com,则必须升级到商业(Business)计划才能安装任何插件(install any plugins)。
- 转到Plugins > Installed Plugins,找到AMP并选择激活(Activate )链接以激活AMP插件并使其在您的站点上运行。
- 激活插件后,调整设置以自定义AMP页面。要配置插件,请转到AMP > Settings并使用向导配置您的AMP页面设置。
- 完成调整设置后,选择“发布”按钮。(Publish )您的网站不会对您的访问者可见或被Google发现,但您可以选择是否希望页面、帖子或两者都显示在您的AMP网站上。为此,请转到AMP > Settings > Advanced Settings, 然后取消选中支持的模板(Supported Templates)复选框以获取更多选项。
- 选择所需的选项(options),然后选择Save Changes。
- 您还可以通过转到Plugins > Add New然后搜索Yoast SEO & AMP将(Yoast SEO & AMP)Yoast SEO集成到您的AMP设置中。
- 选择立即安装(Install Now),然后激活(Activate)插件。激活后,转到SEO并选择AMP为您的页面获取更多自定义选项,然后选择Save Changes。
- 在发布之前,通过将amp(amp)添加到您想要的任何帖子或页面URL的末尾来预览您的AMP网站。例如,您可以访问 https://yourwebsite.com/blog-post-title/amp/
如何验证 WordPress AMP(How to Validate WordPress AMP)
在您的WordPress网站上安装(WordPress)AMP后,下一步是测试它是否正常工作。不仅如此,验证还可以确保支持的平台可以访问和链接到您的网站,并且您可以找到AMP错误以进行故障排除(errors for troubleshooting)。
您可以手动验证WordPress AMP或使用(WordPress AMP)Google 的 AMP 测试工具(Google’s AMP Testing tool)。
如何手动验证 WordPress AMP(How to Validate WordPress AMP Manually)
- 为此,请打开一个AMP页面,然后将#development=1添加到您正在验证的网页的URL末尾。
- 转到您的浏览器并打开开发人员工具控制台(developer tools console)。如果您使用的是Firefox,请选择menu > Web Developer > Web Console。如果AMP(AMP)页面上有任何错误,它们将以红色突出显示。
验证错误可能由不正确的代码、无效的前缀或不允许的标签引起,但您会在错误旁边看到原因说明。
如何使用 Google 的 AMP 测试工具验证 WordPress AMP(How to Validate WordPress AMP Using Google’s AMP Testing Tool)
- 打开Google AMP 测试工具(Google AMP Testing tool)页面,输入您的站点、帖子或页面的URL,然后选择Test URL。您还可以粘贴站点的代码并选择Test URL。
- Googlebot将分析您的网站,如果有效,您将看到AMP网页在Google SERP(Google SERPs)上的显示方式的预览。
使用Google AMP 测试(Google AMP Testing)工具,您可以识别AMP错误并在您的网站上查看导致问题的代码。您还可以选择共享(Share)按钮与您的同事共享分析。
您还可以使用Google AMP Validator工具来确保您的代码经过验证,或者使用Chrome AMP 扩展程序(Chrome AMP extension),它也可以验证页面,并显示任何警告或错误。
放大您的 WordPress 网站(AMP up Your WordPress Site)
Google AMP对任何网站来说都是一个重大变化,尤其是在您已经拥有大量移动流量的情况下。如果您运营的网站包含新闻内容,那么立即安装AMP(AMP)可能是有意义的,但对于其他企业来说,如果您弄错了,可能会损害您的转化率。
我们建议在决定在整个网站上使用 AMP 之前,先在一些高流量页面上测试AMP ,看看您是否获得了正面或负面的结果。(AMP)
您是否在WordPress网站上尝试过(WordPress)AMP?您还有其他关于使用AMP for WordPress的技巧要分享吗?在评论中与我们分享。
What Is AMP for WordPress and How To Install It
Few things are more fruѕtrating than visiting a websitе only to find that its homepage takes ages to load. Worse still, is when the images are of poor quality and layouts aren’t well optimized.
In fact, a Google study found that 53 percent of people leave sites that fail to load in three seconds or less, which leads to high bounce rates and decreased revenues.
To deal with these issues, Google created the Accelerated Mobile Pages (AMP). Not only does AMP accelerate your site’s loading time, but it also helps you design a compelling site, thrilling mobile experience, and increase in average click-through rate (CTR).
In this guide, we’ll explain why Google AMP is Google’s preferred format for mobile pages, and how you can implement AMP for WordPress.
What Is Google AMP?
Google AMP is a web component framework launched in October 2015 to help create and build lightweight, user-first websites. The mobile initiative is designed to speed up the web by serving up a stripped down version of your webpage.
Many large companies including WordPress, Pinterest, Washington Post, and Reddit have adopted AMP and experienced an increase in monthly unique visitors.
When your webpage is served to mobile users via AMP in Google, it’ll look basic and simplistic, thus achieving AMP’s goal of lightning fast, dynamic experiences and better usability.
Do You Need AMP on Your WordPress Site?
AMP is fast, but it’s not the only way to make web pages load faster or increase your site speed.
There are many case studies that demonstrate AMP’s positive impact on publishers, businesses, and other industries, but there are also many case study failures. This means there’s no clear-cut decision as to whether AMP is for all sites or not.
What rings true though is that the success of AMP depends on some decision factors. For example, if your users are primarily from desktop, AMP isn’t for you because AMP pages don’t display with rich features on desktop, and they’re not served from the AMP Cache so users may not enjoy these benefits.
The golden rule is that AMP is recommended primarily for publishers running news sites and blogs. Anything else like a portfolio site or landing pages doesn’t necessarily need AMP.
Plus, if your non-AMP pages can load within or below the 2.5-second standard, you probably don’t need to install or maintain AMP.
How to Implement AMP on a WordPress Site
Creating an AMP version of your web page on WordPress may look like a task only developers can handle, but with a little knowledge and some guidance, you can do it on your own.
Google has a workflow process that guides you as you build an AMP page, integrate and optimize the page, set up analytics tracking, and then design the page for your site’s needs.
To get started, Google will provide you with a template code, which you can copy and save to a .html extension, and then add the required mark-up. This will turn the page into a workable AMP HTML document.
Before you publish, you can include images, modify the layout, optimize the page for SEO, preview, and finalize the pages using instructions provided on the sidebar.
If you want, you can experiment with AMP on the amp.dev homepage before trying it out on your own WordPress site.
How to Install Google AMP on WordPress
Manually setting up and installing Google AMP on your WordPress site is complicated. However, you can use plugins like the official AMP plugin for WordPress, AMP for WP, or AMP WP to make the process simpler.
For this guide, we’ll show you how to set up and install AMP on a WordPress site using the official WordPress AMP plugin.
How to Use the WordPress AMP Plugin to Install AMP
- To get started, install and activate the WordPress AMP plugin on your WordPress site. Go to the WordPress dashboard, select Plugins > Add New.
- Type AMP plugin in the search box, and select Install Now to install the plugin.
Note: If you’re using WordPress.com, you have to upgrade to the Business plan to install any plugins.
- Go to Plugins > Installed Plugins, find AMP and select the Activate link to activate the AMP plugin and make it work on your site.
- Once you activate the plugin, adjust the settings to customize the AMP pages. To configure the plugin, go to AMP > Settings and use the wizard to configure your AMP page settings.
- Select the Publish button once you’re done adjusting the settings. Your site won’t be visible to your visitors or discoverable by Google, but you can choose whether you want the pages, posts, or both to be shown on your AMP site. To do this, go to AMP > Settings > Advanced Settings, and deselect the Supported Templates checkbox to get more options.
- Select the options you want and then select Save Changes.
- You can also integrate Yoast SEO into your AMP setup by going to Plugins > Add New and then search for Yoast SEO & AMP.
- Select Install Now, and Activate the plugin. Once activated, go to SEO and select AMP to get further customization options for your page, and then select Save Changes.
- Before publishing, preview your AMP site by adding amp to the end of any post or page URL you want . For example, you can go to https://yourwebsite.com/blog-post-title/amp/
How to Validate WordPress AMP
With AMP installed on your WordPress site, the next step is to test that it works correctly. Not only that, but validation also ensures that supported platforms can access and link to your site, and you can find AMP errors for troubleshooting.
You can validate WordPress AMP manually or using Google’s AMP Testing tool.
How to Validate WordPress AMP Manually
- To do this, open an AMP page, and then add #development=1 to the end of the URL for the web page you’re validating.
- Go to your browser and open the developer tools console. If you’re using Firefox, select the menu > Web Developer > Web Console. If there are any errors on the AMP page, they’ll be highlighted in red.
Validation errors can be caused by incorrect code, invalid prefixes, or disallowed tags, but you’ll see an explanation of the causes next to the error.
How to Validate WordPress AMP Using Google’s AMP Testing Tool
- Open the Google AMP Testing tool page, enter the URL of your site, post, or page, and then select Test URL. You can also paste the site’s code and select Test URL.
- The Googlebot will analyze your site and if valid, you’ll see a preview of how your AMP pages could appear on Google SERPs.
With the Google AMP Testing tool, you can identify AMP errors and see the problem-causing code on your site. You can also select the Share button to share the analysis with your colleagues.
You can also use Google AMP Validator tool to make sure that your code validates, or use the Chrome AMP extension, which also validates the pages, and shows any warnings or errors.
AMP up Your WordPress Site
Google AMP is a major change for any site, especially if you already have lots of mobile traffic. If you run a site with newsy content, it may make sense to install AMP right away, but for other businesses, you could hurt your conversions if you get it wrong.
We recommend testing AMP on a few high-traffic pages to see if you get positive or negative results before making the decision to use it across your entire site.
Have you tried AMP on your WordPress site? Do you have any other tips to share about using AMP for WordPress? Share with us in the comments.