wordpress加速插件_如何使用插件管理器来加速您的WordPress网站

wordpress加速插件

After WordPress hosting, plugins are the second biggest reason that can cause your WordPress site to be slow. Often times this can be mitigated by either disabling the plugin or stop it from loading in areas where you don’t need them. In this article, we will show you how to use the Plugin Organizer to speed up your WordPress site.

WordPress托管之后 ,插件是第二大原因,它可能导致WordPress网站运行缓慢。 通常,可以通过禁用插件或在不需要的地方停止加载来缓解这种情况。 在本文中,我们将向您展示如何使用插件管理器来加快WordPress网站的速度。

Using Plugin Optimizer to speed up WordPress
WordPress插件如何影响您的网站速度? (How WordPress Plugins Affect Your Website Speed?)

One of the most frequently asked questions that we get is how many WordPress plugins are too many? The two things that concerns most users are WordPress security and how plugins may affect speed and performance?

我们得到的最常见问题之一是有多少个WordPress插件太多 ? 大多数用户关心的两件事是WordPress安全性以及插件如何影响速度和性能

All good WordPress plugins are coded in a way that they are only loaded on your website when needed. You can see our infographic on how WordPress actually loads plugins (behind the scenes).

所有好的WordPress插件均以仅在需要时才加载到您的网站上的方式进行编码。 您可以在幕后看到有关WordPress实际如何加载插件的信息图。

WordPress doesn’t load inactive plugins which means they don’t affect your website’s performance. However, it does load all active plugins which then run their code when needed.

WordPress 不会加载不活动的插件 ,这意味着它们不会影响您网站的性能。 但是,它会加载所有活动的插件,然后在需要时运行它们的代码。

Now sometimes plugin authors cannot anticipate when and where you will use their plugin features on your website. In that case, they may load their code whether or not you need it. If the plugins are loading JavaScript and CSS files, then this may increase your website’s page load time.

现在,有时插件作者无法预期您将在何时何地使用其插件功能。 在这种情况下,无论您是否需要,他们都可以加载其代码。 如果插件正在加载JavaScript和CSS文件,则这可能会增加您网站的页面加载时间。

WordPress插件管理器如何加速您的网站 (How WordPress Plugin Organizer Can Speed Up Your Site)

Depending on the plugins that you’re using, there may be some that you only need on specific pages, posts, or post types. Some plugins you may only need in the WordPress admin area, so they shouldn’t load on the front-end of the website.

根据您使用的插件,可能只需要特定页面,帖子或帖子类型上的某些插件。 您可能只需要在WordPress管理区域中使用某些插件,因此不应将其加载到网站的前端。

WordPress Plugin Organizer allows you to do the following things:

WordPress插件管理器允许您执行以下操作:

  • Selectively enable or disable plugins based on URL

    根据URL选择性地启用或禁用插件
  • Enable or disable plugins for user roles

    为用户角色启用或禁用插件
  • Enable or disable plugins based on post types

    根据帖子类型启用或禁用插件
  • Rearrange the order in which plugins are loaded

    重新排列插件的加载顺序
  • Disable plugins and only load them when needed

    禁用插件,仅在需要时加载它们

Basically, it gives you the ability to fine-tune your website performance.

基本上,它使您能够调整网站性能。

That being said, let’s take a look at how to use the Plugin Organizer to speed up WordPress.

话虽如此,让我们看一下如何使用Plugin Organizer加快WordPress的速度。

使用WordPress插件管理器来管理活动的WordPress插件 (Using WordPress Plugin Organizer to Manage Active WordPress Plugins)

First, thing you need to do is install and activate the Plugin Organizer plugin. For more details, see our step by step guide on how to install a WordPress plugin.

首先,您需要做的是安装并激活Plugin Organizer插件。 有关更多详细信息,请参阅有关如何安装WordPress插件的分步指南。

Important: Plugin organizer is a very powerful plugin. Reordering or disabling plugins can cause conflicts and unexpected behavior which could make your site inaccessible. We recommend that you create a complete WordPress backup before disabling or reordering any plugins.

重要提示:插件管理器是一个非常强大的插件。 重新排序或禁用插件可能会导致冲突和意外行为,从而使您的网站无法访问。 我们建议您在禁用或重新排序任何插件之前创建一个完整的WordPress备份

Once you are ready, you need to head over to the Plugin Organizer » Settings page to configure your settings.

准备就绪后,您需要转到Plugin Organizer»设置页面以配置设置。

Plugin organizer settings

There are several options on this page, and we will look at each option, what it does, and which ones you should turn on.

此页面上有几个选项,我们将研究每个选项,它的作用以及应该打开的选项。

Fuzzy URL Matching

模糊网址匹配

This option allows you to enable/disable plugins on child URL. This means that settings will affect http://example.com/sample-page/ and all subsequent URLs under it. For example, http://example.com/sample-page/child-page1/ and http://example.com/sample-page/child-page2/.

此选项允许您启用/禁用子URL上的插件。 这意味着设置将影响http://example.com/sample-page/及其下的所有后续URL。 例如,http://example.com/sample-page/child-page1/和http://example.com/sample-page/child-page2/。

Ignore URL Protocol

忽略URL协议

This option is turned off by default. It allows the plugin organizer to ignore http and https part of plugin URLs. This is particularly helpful if you have SSL enabled on your WordPress site.

默认情况下,此选项是关闭的。 它允许插件组织者忽略插件URL的http和https部分。 如果您在WordPress网站上启用了SSL,这将特别有用。

Ignore URL Arguments

忽略URL参数

This option allows you to ignore URL arguments. For example, http://example.com/page/?foo=1&bar=2 is a URL with arguments. Turning on this option is only helpful on URLs with arguments. You should leave it OFF in most cases.

此选项使您可以忽略URL参数。 例如,http://example.com/page/?foo=1&bar=2是带有参数的URL。 启用此选项仅对带有参数的URL有用。 在大多数情况下,应将其关闭。

Only allow network admins to change plugin load order?

只允许网络管理员更改插件加载顺序?

If you are running a WordPress multisite network, then turning on this option will only allow Network Administrator to rearrange plugin order. We highly recommend that you turn this on if you have a WordPress multisite network.

如果您正在运行WordPress多站点网络 ,那么启用此选项将仅允许网络管理员重新排列插件顺序。 如果您有WordPress多站点网络,我们强烈建议您将其打开。

Custom Post Type Support

自定义帖子类型支持

This option allows you to select the post types where you want to enable/disable plugins. This option is particularly useful if you have plugins that you only need for specific post types.

此选项允许您选择要启用/禁用插件的帖子类型 。 如果您有只需要特定帖子类型的插件,则此选项特别有用。

Auto Trailing Slash

自动尾随斜线

This option adds or removes the trailing slash at the end of plugin filter URLs based on your WordPress permalink settings.

此选项根据您的WordPress永久链接设置在插件过滤器URL的末尾添加或删除斜杠。

Selective Plugin Loading

选择性插件加载

This option allows you to selectively load plugins even if they are disabled in plugin settings. You need to turn on this feature if you want to enable or disable plugins on individual content types.

使用此选项,即使在插件设置中禁用了插件,也可以有选择地加载插件。 如果要启用或禁用单个内容类型上的插件,则需要打开此功能。

To properly use this option, you need to add a must use plugin or mu-plugin in WordPress. MU plugins can be added to any WordPress site, and they are activated by default. The plugin will try to create an MU plugin itself, but if it fails then you will need to create it. We will show you how to do that later in this article.

要正确使用此选项,您需要在WordPress中添加必须使用的插件或mu-plugin。 MU插件可以添加到任何WordPress网站,并且默认情况下处于激活状态。 该插件会尝试自己创建一个MU插件,但是如果失败,则需要创建它。 我们将在本文后面的部分中向您展示如何执行此操作。

Selective Mobile Plugin Loading

选择性移动插件加载

This option allows you to selectively enable or disable plugins on mobile browsers.

此选项使您可以有选择地在移动浏览器上启用或禁用插件。

Selective Admin Plugin Loading

选择性管理插件加载

You can turn on this option if you want certain plugins to only load inside the WordPress admin area.

如果您希望某些插件仅在WordPress管理区域内加载,则可以启用此选项。

Disable Plugins By Role

按角色禁用插件

This option allows you to disable plugin by user roles. You can turn on this option and then select user roles that you want to use in the next box.

此选项允许您按用户角色禁用插件。 您可以打开此选项,然后在下一个框中选择要使用的用户角色。

Don’t forget to click on the save settings button to store your changes.

不要忘记单击“保存设置”按钮来存储您的更改。

为插件管理器创建MU插件 (Creating an MU Plugin for Plugin Organizer)

Plugin Organizer needs an MU plugin to work properly. The plugin will try to automatically add it to your website, but if it fails then you will have to create it yourself.

插件管理器需要MU插件才能正常工作。 该插件将尝试自动将其添加到您的网站,但是如果失败,则必须自己创建。

To find out whether the plugin has successfully created the MU plugin. You need to visit Plugins » Installed Plugins page. You will see a new link labeled Must-Use, clicking on it will show you the installed MU plugins on your site.

查找插件是否已成功创建MU插件。 您需要访问插件»已安装插件页面。 您将看到一个标记为“必须使用”的新链接,单击该链接将向您显示您站点上已安装的MU插件。

Must Use plugins installed in WordPress

If you don’t see the plugin or Must-Use plugins link, then this means that the plugin organizer failed to create the file, and you will need to manually do it yourself.

如果没有看到插件或“必须使用的插件”链接,则意味着插件组织者无法创建文件,您需要自己手动进行操作。

First, you need to connect to your website using an FTP client or File Manager app in cPanel.

首先,您需要使用 cPanel中的FTP客户端或文件管理器应用程序连接到您的网站。

Next, Go to the /wp-content/mu-plugins/ folder. If you don’t have a mu-plugins folder in your /wp-content/ folder, then you need to create one.

接下来,转到/ wp-content / mu-plugins /文件夹。 如果/ wp-content /文件夹中没有mu-plugins文件夹,则需要创建一个。

After that you need to go to /wp-content/plugins/plugin-organizer/lib/ folder and download the file called ‘PluginOrganizerMU.class.php’ to your computer.

之后,您需要转到/ wp-content / plugins / plugin-organizer / lib /文件夹并将名为“ PluginOrganizerMU.class.php”的文件下载到您的计算机。

Copy MU plugin file

Next, you need to go to the /wp-content/mu-plugins/ folder and upload the file from your computer.

接下来,您需要转到/ wp-content / mu-plugins /文件夹并从计算机上载文件。

Plugin Organizer mu-plugin file

The Plugin Organizer can now you use this file to properly manage your plugins efficiently. You can go ahead and continue with plugin settings.

插件管理器现在可以使您使用此文件来有效地正确管理插件。 您可以继续进行插件设置。

设置全局插件选项 (Set up Global Plugin Options)

Plugin Organizer allows you to activate plugins but keep them disabled. To set up which plugins remain active and which plugins are disabled, you need to go to the Plugin Organizer » Global Plugins page.

插件管理器允许您激活插件,但保持禁用状态。 要设置哪些插件保持活动状态以及哪些插件被禁用,您需要转到“ 插件管理器”»“全局插件”页面。

Set plugins to disable globally

You will see your installed plugin on the left. Active plugins will be highlighted and displayed on top. If you want to disable a plugin, then you can simply drag and drop it to the Disable column.

您会在左侧看到已安装的插件。 活动的插件将突出显示并显示在顶部。 如果要禁用插件,则只需将其拖放到“禁用”列即可。

This will disable the plugins without deactivating them.

这将禁用插件而不停用它们。

You can re-enable the plugin you disabled for individual post types, single post or page items, individual URLs, from different pages in the plugin settings. We will walk you through each of them later in this article.

您可以为插件设置中不同页面的单个帖子类型,单个帖子或页面项目,单个URL重新启用禁用的插件。 在本文的后面,我们将引导您逐步了解它们。

在搜索结果页面上启用或禁用插件 (Enable or Disable Plugins on Search Results Page)

To disable or enable certain plugins on search results, you will need to visit the Plugin Organizer » Search Results page.

要禁用或启用搜索结果上的某些插件,您将需要访问Plugin Organizer»搜索结果页面。

Disable plugins on search results page

On this screen, you need to simply select a plugin from the left column and drop it to the disable column. You will notice that the disable column has different boxes. You will need to click on the box where you want to disable the plugin. For example, adding a plugin to ‘Disabled Standard’ box will disable the plugin for all users on all pages.

在此屏幕上,您只需从左侧列中选择一个插件并将其放到禁用列即可。 您会注意到禁用列具有不同的框。 您需要单击要禁用插件的框。 例如,将插件添加到“禁用标准”框中将对所有页面上的所有用户禁用该插件。

If you previously set a plugin to be disabled globally, and you want it to be loaded on search results page, then you can simply drag and drop it from disabled plugins column back to available plugins.

如果您先前已将某个插件设置为全局禁用,并且希望将其加载到搜索结果页面上,则只需将其从“禁用的插件”列中拖放回可用的插件即可。

Enable plugins on search results page
选择性地启用/禁用自定义帖子类型的插件 (Selectively Enable / Disable Plugins for Custom Post Types)

To control which plugins work on certain post types, you need to visit Plugin Organizer » Post Type Plugins page.

要控制哪些插件可以在某些帖子类型上使用,您需要访问插件管理器»帖子类型插件页面。

Enable or disable plugins for post types

First, you will select the post type where you want to apply the changes. After that, you can drag and drop plugins from available items column to the disable column.

首先,您将选择要应用更改的帖子类型。 之后,您可以将插件从可用项目列拖放到禁用列。

You can also enable a plugin that you have disabled in Global Plugins page by dragging it from the Disabled column to the available items.

您还可以通过将其从“禁用”列拖动到可用项来启用已在“全局插件”页面中禁用的插件。

组插件和更改插件加载顺序 (Group Plugins and Change Plugin Load Order)

By default, WordPress loads your current active plugin files alphabetically. This alphabetical order may sometimes cause conflicts if you have plugins depending on each other’s code.

默认情况下,WordPress按字母顺序加载当前的活动插件文件。 如果您使用的插件取决于彼此的代码,则此字母顺序有时可能会导致冲突。

For example, if you have a plugin file apple.php which relies on functions in another plugin called zebra.php, then you may need the zebra.php file to load first so that apple.php works properly.

例如,如果您有一个依赖于另一个名为zebra.php的插件中的功能的插件文件apple.php,则可能需要首先加载zebra.php文件,以便apple.php正常工作。

Plugin Organizer allows you to manually change the plugin order and group plugins. However, be very careful as this could make your website inaccessible.

插件管理器允许您手动更改插件顺序和分组插件。 但是,请务必小心,因为这可能使您的网站无法访问。

To rearrange the plugin load order, you need to visit Plugin Organizer » Group and Order Plugins page.

要重新安排插件的加载顺序,您需要访问插件管理器»组和订单插件页面。

The plugin organizer will display your plugins in default alphabetical order, and you can rearrange the order by simple drag and drop.

插件组织者将以默认字母顺序显示您的插件,您可以通过简单的拖放来重新排列顺序。

You can also group plugins together by selecting ‘Create new group’ from the drop down menu at the top. Next, you need to enter a name for the group and select the plugins you want to add in it.

您也可以通过从顶部的下拉菜单中选择“创建新组”将插件分组在一起。 接下来,您需要输入组的名称,然后选择要添加到其中的插件。

Creating a plugin group

Once you are done with the group, click on the Submit button to continue. Plugin organizer will now create a plugin group for you.

完成组的操作后,单击“提交”按钮以继续。 插件管理器现在将为您创建一个插件组。

Now if you go to the Plugins page, then you will see a new link named after your group name. When you click on it, you will see all the plugins inside that group.

现在,如果您转到“插件”页面,则将看到一个以您的组名命名的新链接。 当您单击它时,您将看到该组中的所有插件。

Plugin group list on the plugins page
使用插件管理器创建插件过滤器 (Creating Plugin Filters with Plugin Organizer)

Plugin Organizer allows you to enable or disable plugin based on URL. To do that you need to create Plugin Filters. These filters will allow you to enable or disable plugins that match specific URLs.

插件管理器允许您基于URL启用或禁用插件。 为此,您需要创建插件过滤器。 这些过滤器将允许您启用或禁用与特定URL匹配的插件。

First you need to go to the Plugin Organizer » Plugin Filters page and click on ‘Add Plugin Filter’ link.

首先,您需要转到“ 插件管理器»插件过滤器”页面,然后单击“添加插件过滤器”链接。

Add plugin filter

This will bring you tothe add new plugin filter page. You will need to provide a name for your plugin filter and then add permalinks (URLs) that you want to be affected by this filter.

这将带您进入添加新的插件过滤器页面。 您将需要为插件过滤器提供一个名称,然后添加您希望受到此过滤器影响的永久链接(URL)。

Creating a plugin filter

You can add multiple URLs by clicking the Add Permalink button.

您可以通过单击添加永久链接按钮来添加多个URL。

Under the settings section, you can choose whether this filter will also affect child URLs of permalinks you have added. You can leave the priority field blank.

在设置部分下,您可以选择此过滤器是否还会影响您添加的永久链接的子URL。 您可以将优先级字段留空。

After that, scroll down to the ‘Plugins’ section. Here you can drag and drop plugins from the available items to Disabled boxes.

之后,向下滚动到“插件”部分。 在这里,您可以将插件从可用项目拖放到“禁用”框中。

Disable plugins based on URL filters

Similarly, you can also drag and drop a plugin from the disabled column to available items to make a plugin load when this filter is matched.

同样,您也可以将插件从“禁用”列拖放到可用项目,以在匹配此过滤器时加载插件。

Additionally, you can save this filter inside a filter group. Filter groups are like categories. Their purpose is to help you sort similar plugin filters together.

此外,您可以将此过滤器保存在过滤器组中。 过滤器组就像类别。 它们的目的是帮助您将相似的插件过滤器排序在一起。

Organize your filters in groups

Once you are done, click on the publish button to make this plugin filter active. It will start working as soon as you click on the publish button.

完成后,单击“发布”按钮以使该插件过滤器处于活动状态。 单击发布按钮后,它将立即开始工作。

在单个帖子或页面上启用或禁用插件 (Enable or Disable a Plugin on a Single Post or Page)

Plugin Organizer also allows you to load or disable plugins on a single post, page, or custom post type item. First you need to make sure that you have enabled the post type support on Plugin Organizer » Settings page.

插件管理器还允许您在单个帖子,页面或自定义帖子类型项目上加载或禁用插件。 首先,您需要确保已在Plugin Organizer»设置页面上启用了帖子类型支持。

Post types enabled

Next, go ahead and edit the post, page, or custom post type you want to change. On the post edit screen, scroll down to the ‘Plugin Organizer’ section.

接下来,继续编辑要更改的帖子,页面或自定义帖子类型。 在帖子编辑屏幕上,向下滚动到“插件管理器”部分。

Plugin organizer section on post edit screen

You will see the plugin organizer settings with your plugins. You can drag and drop plugins to disable them or drag disabled plugins to available items to make them active.

您将看到带有插件的插件管理器设置。 您可以拖放插件以禁用它们,也可以将禁用的插件拖放到可用项目上以使其处于活动状态。

Don’t forget to click on the save changes or update button to store your changes.

不要忘记单击保存更改或更新按钮来存储您的更改。

解决插件管理器问题 (Troubleshooting Plugin Organizer Issues)

Plugin Organizer plugin is used to change the default behavior of WordPress plugins on your website. Your settings may cause unexpected results including fatal errors, syntax errors, or white screen of death.

插件管理器插件用于更改您网站上WordPress插件的默认行为。 您的设置可能会导致意外结果,包括致命错误语法错误死机白屏

A quick way to resolve those issues is by deactivating all your WordPress plugins via FTP. This will deactivate plugin organizer as well.

解决这些问题的快速方法是通过FTP停用所有WordPress插件 。 这也将停用插件管理器。

To uninstall Plugin Organizer, simply delete the plugin from the plugins page. This will not only delete the plugin itself, but it will also delete all plugin settings. You can then reinstall the plugin if you want.

要卸载Plugin Organizer,只需从插件页面删除插件即可。 这不仅会删除插件本身,还将删除所有插件设置。 然后,您可以根据需要重新安装插件。

For most errors, see our comprehensive list of most common WordPress errors and how to fix them. If the error you are seeing is not listed, then try our step by step WordPress troubleshooting guide to find the cause of the error and possible solutions.

对于大多数错误,请参阅我们最常见的WordPress错误的全面列表以及如何修复它们。 如果未列出您所看到的错误,请尝试执行WordPress逐步疑难解答指南,以查找错误原因和可能的解决方案。

We hope this article helped you efficiently use WordPress plugin organizer to speed up your WordPress site. If you want to just install best of the best plugins, then see our list of must have WordPress plugins for all websites.

我们希望本文能帮助您有效地使用WordPress插件组织器来加快WordPress网站的速度。 如果您只想安装最好的最好的插件,请参阅我们的清单,其中必须包含所有网站的WordPress插件

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

如果您喜欢这篇文章,请订阅我们的YouTube频道 WordPress视频教程。 您也可以在TwitterFacebook上找到我们。

翻译自: https://www.wpbeginner.com/plugins/how-to-use-the-plugin-organizer-to-speed-up-your-wordpress-site/

wordpress加速插件

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值