wordpress优化_优化WordPress网站性能的10个步骤

wordpress优化

This article on WordPress site performance is part of a series created in partnership with SiteGround. Thank you for supporting the partners who make SitePoint possible.

有关WordPress网站性能的这篇文章是与SiteGround合作创建的系列文章的一部分。 感谢您支持使SitePoint成为可能的合作伙伴。

You don’t want a slow website. Potential visitors may leave before your page even finishes loading. And you’ll be penalized in search results, meaning even less traffic.

您不希望网站运行缓慢。 潜在的访问者可能在您的页面加载完成之前就离开了。 而且您将在搜索结果中受到惩罚,这意味着更少的访问量。

You want your web pages to load in two seconds or less. How do you achieve that? One step at a time.

您希望网页在两秒钟或更短时间内加载。 您如何实现的? 一步一步来。

In this article, we cover a list of items you can optimize to speed up your WordPress site.

在本文中,我们涵盖了可以优化以加快WordPress网站速度的项目列表。

我的网站到底有多慢? (Just How Slow Is My Site?)

Your site may not feel slow to you. Most likely your browser has already cached it, so you won’t be experiencing it the same way as a new visitor.

您的网站可能不会让您感到缓慢。 您的浏览器很可能已经缓存了它,因此您不会像新访问者那样体验它。

Here are some services that will inform you how long your page takes to load and tell you the overall file size of your page:

以下是一些服务,这些服务将通知您页面加载需要多长时间,并告诉您页面的整体文件大小:

Check the speed of your sites before and after tweaking them for performance. If you can get your pages loading in two seconds, you’re doing well.

在对网站进行性能调整之前和之后,请检查它们的速度。 如果您可以在两秒钟内加载页面,那就很好。

Keep a record of how much difference each step you take makes. What made the most difference?

记录您采取的每个步骤有多大的差异。 什么才是最重要的?

#1。 选择一个好的虚拟主机 (#1. Choose a Good Web Host)

It’s impossible to speed up a website that’s being hosted on a slow server. Choosing the right hosting provider is the first important step towards having a fast-loading website.

加快由慢速服务器托管的网站的速度是不可能的。 选择合适的托管服务提供商是建立快速加载网站的第一步。

How do you choose a company that makes speed a priority? Check out our Performance Checklist in The Ultimate Guide to Choosing a Hosting Provider.

您如何选择以速度为优先的公司? 请查阅《选择托管服务提供商的终极指南》性能检查表。

SitePoint recently partnered with SiteGround as our official recommended host. With servers on multiple continents and the use of the latest SSD hardware, an in-house caching tool, and a free CDN service, SiteGround provides and invests heavily in speed acceleration. Their flexible servers support PHP7 and HTTP/2 and they have ongoing software and hardware updates.

SitePoint最近与SiteGround合作成为我们的官方推荐主机 。 SiteGround拥有分布在多个大洲的服务器,并使用最新的SSD硬件,内部缓存工具和免费的CDN服务,从而提供并投入了大量资金来加速速度 。 其灵活的服务器支持PHP7和HTTP / 2,并且具有持续的软件和硬件更新。

#2。 优化主题 (#2. Optimize Your Theme)

First, use a fast theme. Themes with a lot of options make your job easier, but at the expense of making the web server and browser work harder. Some WordPress themes are megabytes in size, adding seconds to your page loading time.

首先, 使用快速主题 。 具有很多选项的主题使您的工作更轻松,但以使Web服务器和浏览器更难工作为代价。 某些WordPress主题的大小为兆字节,从而使页面加载时间增加了几秒钟。

Every feature you don’t use slows your site down for no reason. If you’re comfortable tweaking code, choose a theme with fewer options to speed up your site.

您不使用的所有功能都会毫无理由地降低网站速度。 如果您愿意调整代码,请选择较少选项的主题以加快网站速度。

  • The default WordPress themes are easy to tweak, lightweight, and well-coded. Consider using one and either tweaking the code yourself, or hiring a developer.

    默认的WordPress主题易于调整,轻巧且编码良好。 考虑使用一个,或者自己调整代码,或雇用开发人员。
  • Thesis and Schema are two more themes that prioritize performance.

    论文模式是另外两个优先考虑性能的主题。

Further reading:

进一步阅读:

Second, use a responsive design. These load less resources for mobile devices, or specify high-res images for desktop displays. Mobile users don’t have to download huge images, while desktop users don’t have to squint at tiny ones.

其次, 使用响应式设计 。 这些为移动设备加载较少的资源,或为台式机显示器指定高分辨率图像。 移动用户不必下载庞大的图像,而台式机用户则不必斜视微小的图像。

Responsive sites are also preferred by Google, so expect a slight boost in SEO once you switch.

响应式网站也是Google首选的网站,因此,一旦您转换,期望SEO会有所提高。

#3。 监视您的插件 (#3. Monitor Your Plugins)

First, minimize the number of plugins you use. Before you install any plugin, ask if it’s really necessary. Having a large number of plugins installed won’t make a huge difference to the speed of your site, but it increases the risk of installing badly behaved plugins.

首先, 尽量减少使用的插件数量 。 在安装任何插件之前,请询问是否确实必要。 安装大量插件不会对您的网站速度产生太大影响,但会增加安装行为不佳的插件的风险。

Second, make sure your plugins are optimized for the current version of W

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值