wordpress修复插件_如何修复WordPress无法打开流错误

wordpress修复插件_如何修复WordPress无法打开流错误_第1张图片

wordpress修复插件

Are you seeing the ‘failed to open stream’ error in WordPress? This error usually points out the location of the scripts where the error has occurred. However, it is quite difficult for beginner users to understand it. In this article, we will show you how to easily fix the WordPress failed to open stream error.

您是否在WordPress中看到“无法打开流”错误? 该错误通常指出发生错误的脚本位置。 但是,初学者很难理解它。 在本文中,我们将向您展示如何轻松修复WordPress无法打开流错误。

wordpress修复插件_如何修复WordPress无法打开流错误_第2张图片

为什么打开流错误失败? (Why Failed to Open Stream Error Occurs?)

Before we try to fix the error, it would be helpful to understand what causes the ‘Failed to open stream’ error in WordPress.

在我们尝试修复错误之前,了解导致WordPress中“无法打开流”错误的原因将很有帮助。

This error occurs when WordPress is unable to load the file mentioned in website code. When this error occurs, sometimes WordPress will continue loading the site and only show a warning message, while other times WordPress will show a fatal error and will not load anything else.

当WordPress无法加载网站代码中提到的文件时,会发生此错误。 发生此错误时,有时WordPress将继续加载该网站并仅显示警告消息 ,而其他时候WordPress将显示致命错误,并且不会加载其他任何内容。

The message phrasing will be different depending on where the error occurs in the code and the reason for failure. It will also give you clues about what needs to be fixed.

消息措词将有所不同,具体取决于代码中发生错误的位置和失败的原因。 它还会为您提供有关需要修复的线索。

Typically, this message would look something like this:

通常,此消息如下所示:


Warning: require(/home/website/wp-includes/load.php): failed to open stream: No such file or directory in /home/website/wp-settings.php on line 19 

Fatal error: require(): Failed opening required ‘/home/website/wp-includes/load.php’ (include_path=’.:/usr/share/php/:/usr/share/php5/’) in /home/website/wp-settings.php on line 19

Here is another example:

这是另一个示例:


Last Error: 2018-04-04 14:52:13: (2) HTTP Error: Unable to connect: ‘fopen(compress.zlib://https://www.googleapis.com/analytics/v3/management/accounts/~all/webproperties/~all/profiles?start-index=1): failed to open stream: operation failed’

Having said that, let’s take a look at how to troubleshoot and fix ‘failed to open stream’ error in WordPress.

话虽如此,让我们看一下如何解决并修复WordPress中的“无法打开流”错误。

修复无法在WordPress中打开流错误 (Fixing Failed to Open Stream Error in WordPress)

As we mentioned earlier, the error can be caused by a variety of reasons and the error message will be different depending on the cause and location of the file that’s causing the error.

正如我们前面提到的,错误可能是由多种原因引起的,并且错误消息会根据导致错误的文件的原因和位置而有所不同。

In each instance, failed to open stream phrase would be followed by a reason. For example, permission denied, no such file or directory, operation failed, and more.

在每种情况下,打开流词组失败都会有一个原因。 例如,权限被拒绝,没有此类文件或目录,操作失败等等。

Now if your error message contains ‘no such file or directory’, then you need to look in the code to figure out which file is mentioned at that particular line.

现在,如果您的错误消息中包含“没有此类文件或目录”,那么您需要查看代码以找出在该特定行中提到了哪个文件。

If it is a plugin or theme file, then this means that the plugin or theme files were either deleted or not installed correctly. Simply deactivate and reinstall the theme / plugin in question to fix the error.

如果它是插件或主题文件,则意味着插件或主题文件已删除或未正确安装。 只需停用并重新安装有问题的主题/插件即可修复该错误。

However, it is also possible that WordPress is unable to locate the files because of a missing .htaccess file in your root folder. In that case, you need to go to Settings » Permalinks page in your WordPress admin and just click on the ‘Save changes’ button to regenerate the .htaccess file.

但是,由于根文件夹中缺少.htaccess文件 ,WordPress也可能无法找到文件。 在这种情况下,您需要转到WordPress管理员中的“设置”»“永久链接”页面,只需单击“保存更改”按钮以重新生成.htaccess文件。

wordpress修复插件_如何修复WordPress无法打开流错误_第3张图片

If the error message is followed by ‘Permission denied’, then this means that WordPress does not have the right permission to access the file or directory referenced in the code.

如果错误消息后跟“权限被拒绝”,则表示WordPress没有访问代码中引用的文件或目录的正确权限。

To fix this, you need to check WordPress files and directory permissions and correct them if needed.

要解决此问题,您需要检查WordPress文件和目录权限 ,并在需要时更正它们。

Lastly, some WordPress plugins load scripts from third-party sources like Google Analytics, Facebook APIs, Google Maps, and other third-party APIs.

最后,一些WordPress插件从第三方来源(例如Google Analytics(分析) , Facebook API ,Google Maps和其他第三方API)加载脚本。

Some of these APIs may require authentication or may have changed the way developers can access them. A failure to authenticate or incorrect access method will result in WordPress failing to open the required files.

其中一些API可能需要身份验证,或者可能已更改了开发人员访问它们的方式。 身份验证失败或访问方法不正确将导致WordPress无法打开所需文件。

To fix this, you will need to contact the plugin author for support. They will be able to help you fix the error.

要解决此问题,您需要联系插件作者以获取支持 。 他们将能够帮助您解决错误。

If none of these tips help you resolve the issue, then follow the steps mentioned in our WordPress troubleshooting guide. This step by step guide will help you pinpoint the issue, so you can easily find the solution.

如果这些提示都不能帮助您解决问题,请按照WordPress故障排除指南中提到的步骤进行操作。 本分步指南将帮助您查明问题,以便轻松找到解决方案。

We hope this article helped you fix the WordPress ‘failed to open stream’ error. You may also want to bookmark our list of the most common WordPress errors and how to fix them.

我们希望本文能帮助您解决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视频教程。 您也可以在Twitter和Facebook上找到我们。

翻译自: https://www.wpbeginner.com/wp-tutorials/how-to-fix-the-wordpress-failed-to-open-stream-error/

wordpress修复插件

你可能感兴趣的:(java,python,php,linux,javascript,ViewUI)