没有人喜欢加载速度慢于应有速度的网站。在当今的数字世界中,即使页面响应延迟一秒也会导致点击次数减少、用户满意度下降、转化率下降和收入损失。
不仅如此,网站速度现在是谷歌排名算法中排名因素的(ranking factors in Google’s ranking algorithm)一部分,这意味着您的网站速度会影响搜索引擎优化( SEO )。这种影响的滚雪球效应是访问者因不耐烦和搜索引擎排名下降而流失。
为什么您的 WordPress 网站运行缓慢(Why Your WordPress Site Runs Slow)
WordPress提供了一个很好的平台来设置和运行您的网站(set up and run your website)。如果没有适当的保护措施,您最终可能会得到一个缓慢的网站。
以下是您的 WordPress 网站加载或运行缓慢的一些主要原因。
- 没有内容交付网络
- 您网站上的杂乱代码(code on your site)
- 质量差(Poor)、速度慢或配置不当的主机
- 图像未针对网络进行压缩或优化
- 缓慢(Slow)、编码不佳或过时的插件
- 旧的或过时的 PHP 版本
- 您的网站没有提供缓存页面,因此服务器超载
- 您没有使用HTTPS或利用HTTP2协议
- 字体加载器或广告等外部脚本
如何加速 WordPress 网站(How to Speed up a WordPress Site)
今天的网站不仅关乎内容,还关乎速度和效率。我们涵盖了可以快速解决问题的最常见的事情。
1.分析您网站的加载速度(1. Analyze Your Site’s Load Speed)
根据Google的说法,最佳做法是将网站的加载时间保持在三秒或更短。如果您的网站在 3 秒内未加载,则用户更有可能立即离开,因此您需要争取 3 秒或更短的时间。
要了解您网站的速度负载,请使用Google PageSpeed Insights、Pingdom、WP Engine Speed Tool或GTMetrix等工具运行网站速度诊断(speed diagnosis)。
这些工具不仅可以帮助您跟踪网站速度,还可以提供有关如何使您的网站更好地运行的速度提示。另外,如果您进行更改或安装插件,您可以看到这些更改如何影响站点加载时间。
2.摆脱未使用的主题和插件(2. Get Rid of Unused Themes and Plugins)
未使用的WordPress 插件(WordPress plugins)和主题可能会降低您网站的性能,但它们也存在安全漏洞。
要删除未使用的插件,您需要先停用插件,然后转到非活动插件列表删除不需要的插件。
如果您的WordPress(WordPress)网站上有不需要的主题,请转到Appearance > Themes将其删除。如果可以的话,可能值得支付审计费用并获得帮助以清理您的网站。
3.删除未使用的媒体(3. Remove Unused Media)
随着时间的推移,您可能会在您的图库或媒体库中积累不再使用的图像、视频和其他媒体文件。
要手动删除媒体文件并释放一些空间,请转到WordPress仪表板上的Add Media > Media Library > Unattached,然后删除不需要的媒体文件。或者,您可以安装一个像Media Cleaner这样的插件来清理您的媒体库,并在完成后删除该插件。
4.定期清理你的数据库(4. Regularly Clean up Your Database)
随着时间的推移,数据库会累积可能会降低您的 WordPress 网站速度的混乱情况。定期清理将确保数据库大小合理,这将有助于您的站点更快地加载。
一些不必要的膨胀,如帖子修订、垃圾评论(spam comments)或MySQL查询可能会占用大量空间。
您可以手动清理数据库,也可以安装插件。(clean up the database)如果您不知道如何通过 phpMyAdmin 手动执行此操作,请使用Advanced Database Cleaner或WP-Sweep 之(WP-Sweep)类的插件来清理您的数据库。
5.使用轻量级主题(5. Use a Lightweight Theme)
如果您希望您的网站看起来不错,您可以选择数以千计的 WordPress 主题(免费或高级)。(thousands of WordPress themes)但是,使用具有必要元素的准系统主题可确保您的网站运行良好并快速加载。
WordPress主题的设计方式不同,但最好采用极简主义的方法,而不是使用功能丰富的主题。这是因为功能丰富的主题涉及大量代码,每次用户访问您的网站时都必须加载这些代码。
一个专注于速度和简单性的准系统入门WordPress主题是Underscores。
6. 从共享主机更改为托管主机(6. Change from Shared to Managed Hosting)
您的网站主机可以显着影响您网站的速度。
对于更快的WordPress网站,您可能希望选择托管主机,这意味着您将拥有一个专属服务器。托管主机很昂贵,尤其是在您的网站没有获得大量流量的情况下。但是,托管主机提供服务器根级别访问、可扩展的性能和存储以及更高级别的安全性。
共享主机更便宜,但不提供服务器级别的访问或控制,并且往往会过度拥挤服务器。这意味着如果同一服务器上的另一个站点获得大量流量,您的站点可能会遇到缓慢。
另外,如果在与您的站点共享服务器的其他站点上发生了某些事情,它可能会渗透到您的站点。您也可以与您的主机交谈,因为他们有技术专家,他们经常可以发现问题并快速、简单地解决问题调整以帮助加快您的WordPress网站。
7. 使用 CDN(7. Use a CDN)
内容交付网络(Content Delivery Network)( CDN ) 是一个遍布全球的服务器网络,它为您的内容提供副本,因此无论您的服务器实际位于何处,它总是很快。
CDN(CDNs)消除了通过网络传输数据时所涉及的延迟(时间或延迟)。配置后,CDN会加快页面加载时间,因为您的站点将根据用户的位置使用离用户最近的优化服务器。
WordPress网站上使用的一些流行的CDN包括(CDNs)Cloudflare、Sucuri、MaxCDN、Fastly或CacheFly。
8.优化您的图像(8. Optimize Your Images)
图片有助于保持您网站的访问者的参与度。但是,尽管大图像看起来很漂亮,优化图像(optimizing the images)将帮助您实现更快的页面加载时间。您可以使用ShortPixel 之(ShortPixel)类的工具来压缩图像。
通过在内容之前关闭背景图片和/或特色帖子,确保帖子首屏上方没有大图片。在移动设备上,请确保将图片推送到首屏下方的帖子中,因为当它们在首屏上方时,它们可能会损害您的网站速度。
9.删除入口点广告(9. Remove Entry Point Ads)
如果您通过来自入口点媒体网络的广告将您的 WordPress 网站货币化(monetizing your WordPress website through ads),那么这些相同的广告确实会减慢您的网站速度。
最好推迟使用这些媒体网络,直到您可以使用Mediavine或Monumetric等不会降低您网站速度的高级网络。这是因为他们的广告是异步提供的。
10.使用浏览器缓存(10. Use Browser Caching)
每次用户加载您的网站时,浏览器都会从托管服务器中提取所有元素。使用浏览器缓存,用户不必忍受整个过程。
浏览器(Browser)缓存通过拍摄页面快照“记住”之前加载的资源,以便用户从浏览器中看到缓存的页面和文件(sees the cached pages and files from the browser)。
当人们登陆您的网站时,您可以实施浏览器缓存以提高WordPress网站的速度,并减轻服务器的压力。(WordPress)为此,您可以使用像WP Rocket这样的插件。安装 WP Rocket后,启用延迟加载设置,保存更改,缓存将开始工作。
11. 实施 AMP(11. Implement AMP)
Accelerated Mobile Pages ( AMP ) 是Google的一个项目,可帮助您的移动页面更快地加载。
AMP文章没有太多格式,这意味着它们几乎可以立即加载。通过这种方式,用户可以在他们的移动设备上享受更流畅的体验。
用户无需离开网页即可访问您的网站并在不同文章之间滚动。这是加快WordPress网站速度、增加转化率和提高访问者保留率的好方法。
您可以按照AMP 教程(AMP tutorial)手动执行此操作,或者如果您不太懂技术或没有HTML经验,则可以使用WordPress插件(如AMP for WP)。(AMP)
其他要尝试的事情(Other Things to Try)
您可以做许多其他事情来加速您的WordPress网站,例如:
- 运行最新的 PHP 版本(Run the latest PHP version)
- 修改优化.htaccess文件(Modify and optimize the .htaccess file)
- (Create)直接在WordPress中(WordPress)创建所有帖子(切勿使用页面构建器)
- 限制每页评论数
- 减少不必要的重定向
- 禁用 pingbacks 或 trackbacks
- 删除相关帖子插件
- 减少从您的服务器发出的电子邮件数量
加速您的 WordPress 网站(Speed Up Your WordPress Site)
我们已经介绍了一些可以用来加速WordPress网站的简单而有效的步骤。您可以使用其他更多技术方法,但这 11 个步骤应该让您开始走上正确的道路。
是否(Are)有帮助您加快WordPress网站速度的特定提示和技巧?在评论中与我们分享。
How to Speed Up a WordPress Site in 11 Steps
Nobody likes a site that loads slower than it should. In today’s dіgital world, even a one-second delay in рage responsiveness translates to reduced clicks, reduced user satіsfaction, declining conversion rateѕ, and lost revenue.
Not only that, but site speed is now part of the ranking factors in Google’s ranking algorithm, meaning your site speed impacts search engine optimization (SEO). The snowball effect of this impact is loss of visitors from impatience and reduced search engine rankings.
Why Your WordPress Site Runs Slow
WordPress offers a great platform on which to set up and run your website. Without the right safeguards in place, you could end up with a sluggish website.
Here are some of the main reasons why your WordPress site loads or runs slow.
- No content delivery network
- Messy code on your site
- Poor quality, slow or improperly configured hosting
- Images aren’t compressed or optimized for the web
- Slow, poorly coded, or outdated plugins
- Old or outdated PHP version
- Your site isn’t serving cached pages thus overloads the server
- You’re not using HTTPS or leveraging HTTP2 protocol
- External scripts like font loaders or ads
How to Speed up a WordPress Site
Websites today are not only about the content, but also speed and efficiency. We cover the most common things that can quickly fix the issue.
1. Analyze Your Site’s Load Speed
According to Google, the best practice is to keep your site’s load time at three seconds or less. If your site doesn’t load in under 3 seconds, users are more likely to leave right away so you need to strive for 3 seconds or quicker than that.
To know your site’s speed load, run a site speed diagnosis using tools like Google PageSpeed Insights, Pingdom, WP Engine Speed Tool, or GTMetrix.
These tools not only help you track your site speed, but also offer speed tips on how to make your site run better. Plus, should you make changes or install a plugin, you can see how such changes affect site load times.
2. Get Rid of Unused Themes and Plugins
Unused WordPress plugins and themes can detract your site’s performance, but they also present security vulnerabilities.
To delete unused plugins, you’ll need to deactivate the plugins first, and then go to the list of inactive plugins to delete the ones you don’t need.
If there are unwanted themes on your WordPress site, go to Appearance > Themes to delete them. If you’re able, it may be worth paying for an audit and getting help to clean up your site.
3. Remove Unused Media
As time goes by, you may accumulate images, videos, and other media files in your gallery or media library that you no longer use.
To manually remove media files and free up some space, go to Add Media > Media Library > Unattached on your WordPress dashboard, and delete the unwanted media files. Alternatively, you can install a plugin like Media Cleaner to clean up your media library, and delete the plugin once you’re done.
4. Regularly Clean up Your Database
Over time, the database accumulates clutter that can slow down your WordPress site. A regular cleanup will ensure that the database size is reasonable and this will help your site load faster.
Some of the unnecessary bloat like post revisions, spam comments, or MySQL queries can take up a huge chunk of space.
You can clean up the database manually or by installing a plugin. If you don’t know how to do it manually through phpMyAdmin, use a plugin like Advanced Database Cleaner or WP-Sweep to clean up your database.
5. Use a Lightweight Theme
There are thousands of WordPress themes you can choose from – free or premium – if you want your site to look good. However, using a barebones theme that has the necessary elements ensures your site will function well and load fast.
WordPress themes are designed differently, but you’re better off taking a minimalist approach than going with a feature-rich theme. This is because feature-rich themes involve a lot of code, which has to load each time a user visits your site.
One barebones starter WordPress theme that focuses on speed and simplicity is Underscores.
6. Change from Shared to Managed Hosting
Your website host can impact your site’s speed significantly.
For a faster WordPress site, you may want to opt for managed hosting, meaning you get a dedicated server all to yourself. Managed hosting is expensive, especially if your site isn’t getting lots of traffic. However, managed hosting offers server root-level access, scalable performance and storage, and higher levels of security.
Shared hosting is cheaper, but doesn’t offer server-level access or control, and tends to overcrowd servers. This means your site may experience slowness if another site on the same server gets a lot of traffic.
Plus, if something happens on other sites sharing the server with your site, it may trickle down into your site.You can also speak with your host as they have tech experts who can often spot the problem(s) and make some quick, simple tweaks to help speed up your WordPress site.
7. Use a CDN
A Content Delivery Network (CDN) is a network of servers located across the globe, which serve copies of your content so it’s always fast regardless of where your server is actually located.
CDNs eliminate the latency (time or delay) involved as data is transmitted over a network. When configured, a CDN speeds up page load times because your site will use an optimized server that’s nearest to the user based on their location.
Some of the popular CDNs used on WordPress sites include Cloudflare, Sucuri, MaxCDN, Fastly or CacheFly.
8. Optimize Your Images
Images help keep your site’s visitors engaged. However, as beautiful as large images may look, optimizing the images will help you achieve faster page load times. You can use a tool like ShortPixel to compress your images.
Ensure that there are no big images above the fold on your posts by turning off background images and/or a featured post before the content. On mobile, make sure the image is pushed into the post below the fold because when they’re above the fold, they may hurt your site speed.
9. Remove Entry Point Ads
If you’re monetizing your WordPress website through ads from entry point media networks, those same ads can really slow down your site.
It’s better to hold off on these media networks until you can get into premium ones like Mediavine or Monumetric that won’t slow your site down as much. This is due to the fact that their ads are served up asynchronously.
10. Use Browser Caching
Each time a user loads your site, the browser pulls all the elements from the hosting server. With browser caching, the user doesn’t have to endure that whole process.
Browser caching “remembers” the resources that were loaded previously by taking a snapshot of the page so that the user sees the cached pages and files from the browser.
You can implement browser caching to increase WordPress site speed when people land on your site, and take stress off your server. To do this, you can use a plugin like WP Rocket. Once you install WP Rocket, enable the lazy loading setting, save the changes and the cache will start working.
11. Implement AMP
Accelerated Mobile Pages (AMP) is a project by Google that helps your mobile pages to load faster.
AMP articles don’t have much formatting, meaning they’ll load almost instantly. This way, users enjoy a more streamlined experience on their mobile devices.
Users can visit your site and scroll between different articles without leaving the web page. It’s a great way to speed up a WordPress site, increase conversions, and improve visitor retention.
You can follow the AMP tutorial to do it manually, or you can use a WordPress plugin like AMP for WP if you’re less tech-savvy or have no HTML experience.
Other Things to Try
There are many other things you can do to speed up your WordPress site such as:
Speed Up Your WordPress Site
We’ve covered some simple and efficient steps you can use to speed up a WordPress site. There are other more technical methods you can use but these 11 steps should get you started on the right path.
Are there specific tips and tricks that have helped you speed up your WordPress site? Share with us in the comments.