{"id":34896,"date":"2022-02-20T15:00:32","date_gmt":"2022-02-20T14:00:32","guid":{"rendered":"https:\/\/qodeinteractive.com\/magazine\/?p=34896"},"modified":"2022-02-17T13:29:48","modified_gmt":"2022-02-17T12:29:48","slug":"how-to-fix-wordpress-failed-to-open-stream-error","status":"publish","type":"post","link":"https:\/\/qodeinteractive.com\/magazine\/how-to-fix-wordpress-failed-to-open-stream-error\/","title":{"rendered":"How to Fix the WordPress Failed to Open Stream Error"},"content":{"rendered":"<div class=\"wpb-content-wrapper\"><p>[vc_row][vc_column][vc_column_text]The WordPress failed to open stream error is <strong>one of the commonest WordPress errors<\/strong> that most WordPress webmasters have experienced. The naming for this error comes from the \u201cfailed to open stream\u201d label that is part of the error messages that accompany the error. And, while this error can be easily solved by intermediate and advanced WordPress users, it is quite difficult to deal with for beginners, as it can break the website.[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]This is why we have decided to create this article, explaining the reasons behind the error and the methods of solving it. Therefore, if you have ever seen error messages similar to the ones shown below:[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]<em>Warning: require(home\/website\/root\/wp-includes\/meta.php): failed to open stream: No such file or directory in home\\website\\root\\wp-settings.php on line 112<\/em>[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]<em>Fatal error: require(): Failed opening required &#8216;home\/website\/root\/wp-includes\/meta.php&#8217; (include_path=&#8217;.;C:\\php\\pear&#8217;) in home\\website\\root\\wp-settings.php on line 112,<\/em>[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]you shouldn\u2019t worry anymore. This article will help you solve it in no time. We have subdivided it into sections just in case you have some idea of what is causing the issue. Having said that, let us begin.<br \/>\n[\/vc_column_text][vc_empty_space height=&#8221;22px&#8221;]<ul class=\"qodef-unordered-list-item qodef-toc\">\n    <li>\n\t        <div class=\"qodef-ul-title-holder\">\n            <span class=\"qodef-ul-title-content\"><a href=\"#why-does-thewordpress-failed-to-open-stream-error-occur\">Why Does the WordPress Failed to Open Stream Error Occur<\/a><\/span>        <\/div>\n            <\/li>\n<\/ul>[vc_empty_space height=&#8221;5px&#8221;]<ul class=\"qodef-unordered-list-item qodef-toc\">\n    <li>\n\t        <div class=\"qodef-ul-title-holder\">\n            <span class=\"qodef-ul-title-content\"><a href=\"#what-to-do-beforehand\">What to Do Beforehand<\/a><\/span>        <\/div>\n            <\/li>\n<\/ul>[vc_empty_space height=&#8221;5px&#8221;]<ul class=\"qodef-unordered-list-item qodef-toc\">\n    <li>\n\t        <div class=\"qodef-ul-title-holder\">\n            <span class=\"qodef-ul-title-content\"><a href=\"#reinstalling-plugin-or-theme\">Reinstalling a Plugin or Theme<\/a><\/span>        <\/div>\n            <\/li>\n<\/ul>[vc_empty_space height=&#8221;5px&#8221;]<ul class=\"qodef-unordered-list-item qodef-toc\">\n    <li>\n\t        <div class=\"qodef-ul-title-holder\">\n            <span class=\"qodef-ul-title-content\"><a href=\"#reinstalling-wordpress\">Reinstalling WordPress<\/a><\/span>        <\/div>\n            <\/li>\n<\/ul>[vc_empty_space height=&#8221;5px&#8221;]<ul class=\"qodef-unordered-list-item qodef-toc\">\n    <li>\n\t        <div class=\"qodef-ul-title-holder\">\n            <span class=\"qodef-ul-title-content\"><a href=\"#saving-permalinks\">Saving Permalinks<\/a><\/span>        <\/div>\n            <\/li>\n<\/ul>[vc_empty_space height=&#8221;5px&#8221;]<ul class=\"qodef-unordered-list-item qodef-toc\">\n    <li>\n\t        <div class=\"qodef-ul-title-holder\">\n            <span class=\"qodef-ul-title-content\"><a href=\"#properly-setting-up-file-and-folder-permissions\">Properly Setting Up File and Folder Permissions<\/a><\/span>        <\/div>\n            <\/li>\n<\/ul>[vc_empty_space height=&#8221;5px&#8221;]<ul class=\"qodef-unordered-list-item qodef-toc\">\n    <li>\n\t        <div class=\"qodef-ul-title-holder\">\n            <span class=\"qodef-ul-title-content\"><a href=\"#asking-help-from-plugin-or-theme-authors\">Asking Help From Plugin or Theme Authors<\/a><\/span>        <\/div>\n            <\/li>\n<\/ul>[vc_empty_space height=&#8221;68px&#8221;][\/vc_column][\/vc_row][vc_row][vc_column][vc_column_text]<\/p>\n<h2 class=\"qodef-h4\"><a id=\"why-does-thewordpress-failed-to-open-stream-error-occur\"><\/a>Why Does the WordPress Failed to Open Stream Error Occur<\/h2>\n<p>[\/vc_column_text][vc_column_text]Despite its rather odd and vague name, the <strong>WordPress Failed to open stream error occurs in very specific situations<\/strong> \u2013 when WordPress is unable to load a specific file which was requested. The file can be a part of a plugin, theme, or even within the core of WordPress. The <strong>consequences of this error can also vary<\/strong> depending on the importance of the file to the normal functioning of the website. In some cases, <strong>it can disable some functionalities<\/strong> on the website while letting you access and use it normally, while in others <strong>it can cause a fatal error<\/strong>, rendering you <strong>unable to log in or use the website.<\/strong>[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]That said, there are quite <strong>a few reasons why WordPress can\u2019t load a specific file<\/strong> resulting in the aforementioned error. The file could simply not exist, or it could have been improperly installed on the website, WordPress might not have adequate permissions to access it, there could be some authentication issues when accessing it, other coding errors, including file name typos, and so on. Therefore, it is important to conduct the proper troubleshooting steps to pinpoint the exact reason behind the error and resolve it. Luckily, error messages will often reveal clues helpful for the troubleshooting process.[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]For example, a typical Failed to open stream error message could look as follows:<br \/>\n[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]Warning: require_once() (<strong> path-to-the-missing-file<\/strong> ): failed to open stream:<strong> explanation-for-the-error<\/strong> in <strong>path-to-the-file-that-is-requesting-the-missing-file<\/strong> on line <strong>XYZ<\/strong>[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]Fatal error: require_once(): Failed opening required<strong> &#8216;path-to-the-file-that-is-missing&#8217;<\/strong> in <strong>path-to-the-file-that-is-requesting-the-missing-file<\/strong> on line <strong>XYZ<\/strong>[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]with the placeholder parts being replaced with corresponding file paths, explanation for the error, and code line, respectively.<br \/>\n[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]While more advanced WordPress users can investigate the files indicated in the error messages thoroughly, even some basic understanding of how to interpret the message can go a long way. This includes figuring out which file is not being loaded, indicated by our <strong>path-to-the-missing-file<\/strong> placeholder, and the technical reason for the error, indicated by the <strong>explanation-for-the-error<\/strong> placeholder.[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]The former will let you understand if the missing file is a part of your theme, a plugin you installed, or part of the WordPress core files. The latter can point you to the best course of action. These technical explanations include labels such as \u201cNo such file or directory\u201d, \u201cPermission denied\u201d or \u201cOperation failed\u201d. The first of these three is most commonly solved by reinstalling a part of your website (theme, plugin, or WordPress itself), the second by adjusting the file and folder permissions, while in the case of the last one, asking the plugin or theme authors for help is the suggested route.[\/vc_column_text][vc_empty_space height=&#8221;80px&#8221;][vc_widget_sidebar sidebar_id=&#8221;new-top-picks-banner&#8221;][vc_empty_space height=&#8221;80px&#8221;][\/vc_column][\/vc_row][vc_row][vc_column][vc_column_text]<\/p>\n<h2 class=\"qodef-h4\"><a id=\"what-to-do-beforehand\"><\/a>What to Do Beforehand<\/h2>\n<p>[\/vc_column_text][vc_column_text]Let us explore the methods of resolving this error. You can troubleshoot all the major reasons behind it, starting from the most obvious to the ones that are less so. However, to ensure the success of the troubleshooting process, some steps need to be taken beforehand.<br \/>\n[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]Firstly, as the error has a typical error message, <a href=\"https:\/\/qodeinteractive.com\/magazine\/how-to-turn-on-error-logs-in-wordpress\/\">enabling the error log<\/a> is an obvious prerequisite for establishing that the error is present. Furthermore, understanding at least the basics of how to interpret the error messages that are shown can help you greatly in resolving the error. For that reason, we advise consulting <a href=\"#why-does-thewordpress-failed-to-open-stream-error-occur\">the previous section<\/a> if you haven\u2019t done so already. Additionally, as some steps might require the use of FTP, we also suggest brushing up your <a href=\"https:\/\/qodeinteractive.com\/magazine\/how-to-use-ftp\/\">knowledge of FTP<\/a>. Having done all that, you can proceed to the main troubleshooting process below.[\/vc_column_text][vc_empty_space height=&#8221;68px&#8221;][\/vc_column][\/vc_row][vc_row][vc_column][vc_column_text]<\/p>\n<h2 class=\"qodef-h4\"><a id=\"reinstalling-plugin-or-theme\"><\/a>Reinstalling a Plugin or Theme<\/h2>\n<p>[\/vc_column_text][vc_column_text]As mentioned in the previous section, there are quite a few possible reasons for the error. However, the most common is that<strong> some plugin or theme files are missing or haven\u2019t been installed properly<\/strong>, indicated by the \u201cNo such file or directory\u201d label in the error messages.[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]Luckily, these error variations can be solved simply by reinstalling the plugin or theme. Of course, the first part of this process is figuring out which exact plugin or theme is the problem. To do so, you only need to examine the error messages according to the instructions given previously.<br \/>\n[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]For example, if you had seen the following error messages:<br \/>\n[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]<em>Warning: require(<strong>\/home\/website\/root\/wp-content\/plugins\/plugin-name\/includes\/plugin.php<\/strong>): failed to open stream: No such file or directory in \/home\/website\/root\/wp-content\/plugins\/plugin-name\/plugin-name.php on line 54<\/em>[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]<em>Fatal error: require(): Failed opening required &#8216;\/home\/website\/root\/wp-content\/plugins\/plugin-name\/includes\/plugin.php&#8217; (include_path=&#8217;.:\/usr\/share\/php&#8217;) in \/home\/website\/root\/wp-content\/plugins\/plugin-name\/plugin-name.php on line 54<\/em>[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]you would know that the relative path to the missing file is the following:<br \/>\n[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]<strong>\/wp-content\/plugins\/plugin-name\/includes\/plugin.php<\/strong> and you only need to<strong> reinstall the plugin named plugin-name.<\/strong>[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]Similarly, if the path to the missing file had contained the <strong>\/wp-content\/themes\/theme-name\/ part<\/strong>, you only need to <strong>reinstall the theme named theme-name.<\/strong>[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]While these are only examples, we hope they are instructive enough. That said, let us explain how to reinstall a plugin or theme.<br \/>\n[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]If you still have access to your admin dashboard, you can simply reinstall a plugin from the Plugins screen. To do so, navigate to the <strong>Plugins &gt; Installed Plugins<\/strong> section and <strong>locate the plugin shown in the error message<\/strong>. Then, <strong>click the \u201cDeactivate\u201d link<\/strong> below it to deactivate it.[\/vc_column_text][vc_empty_space height=&#8221;50px&#8221;]<div class=\"qodef-single-image-holder   qodef-has-border \">\n    <div class=\"qodef-si-inner\" >\n                                    <img loading=\"lazy\" decoding=\"async\" width=\"969\" height=\"486\" src=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/02\/Deactivate-Plugin.jpg\" class=\"attachment-full size-full\" alt=\"Deactivate Plugin\" srcset=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/02\/Deactivate-Plugin.jpg 969w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/02\/Deactivate-Plugin-300x150.jpg 300w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/02\/Deactivate-Plugin-768x385.jpg 768w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/02\/Deactivate-Plugin-620x311.jpg 620w\" sizes=\"auto, (max-width: 969px) 100vw, 969px\" \/>                        <\/div>\n<\/div>[vc_empty_space height=&#8221;38px&#8221;][vc_column_text]Shortly hereafter, you will see the \u201cDelete\u201d link instead. To delete it, <strong>click the \u201cDelete\u201d link.<\/strong>[\/vc_column_text][vc_empty_space height=&#8221;50px&#8221;]<div class=\"qodef-single-image-holder   qodef-has-border \">\n    <div class=\"qodef-si-inner\" >\n                                    <img loading=\"lazy\" decoding=\"async\" width=\"969\" height=\"488\" src=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/02\/Delete-Plugin.jpg\" class=\"attachment-full size-full\" alt=\"Delete Plugin\" srcset=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/02\/Delete-Plugin.jpg 969w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/02\/Delete-Plugin-300x151.jpg 300w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/02\/Delete-Plugin-768x387.jpg 768w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/02\/Delete-Plugin-620x312.jpg 620w\" sizes=\"auto, (max-width: 969px) 100vw, 969px\" \/>                        <\/div>\n<\/div>[vc_empty_space height=&#8221;38px&#8221;][vc_column_text]Then, you will need to reinstall it. To do so, <strong>navigate to the Plugins &gt; Add New section<\/strong> and <strong>locate the plugin once more<\/strong>, by using the search feature or any of the plugin tabs. Having found it, <strong>click the \u201cInstall Now\u201d button.<\/strong>[\/vc_column_text][vc_empty_space height=&#8221;50px&#8221;]<div class=\"qodef-single-image-holder   qodef-has-border \">\n    <div class=\"qodef-si-inner\" >\n                                    <img loading=\"lazy\" decoding=\"async\" width=\"969\" height=\"518\" src=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/02\/Install-Plugin.jpg\" class=\"attachment-full size-full\" alt=\"Install Plugin\" srcset=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/02\/Install-Plugin.jpg 969w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/02\/Install-Plugin-300x160.jpg 300w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/02\/Install-Plugin-768x411.jpg 768w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/02\/Install-Plugin-620x331.jpg 620w\" sizes=\"auto, (max-width: 969px) 100vw, 969px\" \/>                        <\/div>\n<\/div>[vc_empty_space height=&#8221;38px&#8221;][vc_column_text]Shortly after, the plugin will be installed and you can activate it by <strong>pressing the \u201cActivate\u201d button.<\/strong>[\/vc_column_text][vc_empty_space height=&#8221;50px&#8221;]<div class=\"qodef-single-image-holder   qodef-has-border \">\n    <div class=\"qodef-si-inner\" >\n                                    <img loading=\"lazy\" decoding=\"async\" width=\"969\" height=\"518\" src=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/02\/Activate-Plugin.jpg\" class=\"attachment-full size-full\" alt=\"Activate Plugin\" srcset=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/02\/Activate-Plugin.jpg 969w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/02\/Activate-Plugin-300x160.jpg 300w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/02\/Activate-Plugin-768x411.jpg 768w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/02\/Activate-Plugin-620x331.jpg 620w\" sizes=\"auto, (max-width: 969px) 100vw, 969px\" \/>                        <\/div>\n<\/div>[vc_empty_space height=&#8221;38px&#8221;][vc_column_text]Then, you only need to <strong>examine the status of the error messages previously shown<\/strong>. If they are gone, the issue has been solved.[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]On the other hand,<strong> if you are unable to log in to your dashboard, you will need to disable the faulty plugin via FTP<\/strong>. To do so, we advise consulting our article on <a href=\"https:\/\/qodeinteractive.com\/magazine\/disable-plugins-wordpress\/\">how to disable plugins when locked out of WP Admin<\/a>. Then, having disabled it via FTP, <strong>you will be able to regain access<\/strong> and install it once more in the manner mentioned above.[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]As for reinstalling a theme, you can do so from <strong>the Appearance &gt; Themes section<\/strong>, if you still have access to your admin dashboard. To do so, you will first need to <strong>enable a default WordPress theme by clicking the \u201cActivate\u201d button next to it<\/strong>. If you don\u2019t have such a theme, you will need to install it.[\/vc_column_text][vc_empty_space height=&#8221;50px&#8221;]<div class=\"qodef-single-image-holder   qodef-has-border \">\n    <div class=\"qodef-si-inner\" >\n                                    <img loading=\"lazy\" decoding=\"async\" width=\"969\" height=\"518\" src=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/02\/Activate-Theme.jpg\" class=\"attachment-full size-full\" alt=\"Activate Theme\" srcset=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/02\/Activate-Theme.jpg 969w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/02\/Activate-Theme-300x160.jpg 300w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/02\/Activate-Theme-768x411.jpg 768w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/02\/Activate-Theme-620x331.jpg 620w\" sizes=\"auto, (max-width: 969px) 100vw, 969px\" \/>                        <\/div>\n<\/div>[vc_empty_space height=&#8221;38px&#8221;][vc_column_text]Then, <strong>you will need to delete your current theme via FTP and <a href=\"https:\/\/qodeinteractive.com\/magazine\/how-to-install-wordpress-theme\/\">install it<\/a> once more.<\/strong>[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]On the other hand, if you are unable to log in to the admin dashboard, then you will need to find an alternative way of <a href=\"https:\/\/qodeinteractive.com\/magazine\/how-to-change-wordpress-theme\/\">switching the theme<\/a> to a default one. Doing so via FTP is the most common way. Having enabled a default theme, you can proceed as mentioned above, i.e. to delete your current theme via FTP and install it once more. Then, you can <strong>review the status of the issue<\/strong>. If it hasn\u2019t been resolved, you can proceed to the following troubleshooting step.[\/vc_column_text][vc_empty_space height=&#8221;68px&#8221;][\/vc_column][\/vc_row][vc_row][vc_column][vc_column_text]<\/p>\n<h2 class=\"qodef-h4\"><a id=\"reinstalling-wordpress\"><\/a>Reinstalling WordPress<\/h2>\n<p>[\/vc_column_text][vc_column_text]What was said for plugin and theme files goes to some extent for core WordPress files. More precisely, if one of the <a href=\"https:\/\/qodeinteractive.com\/magazine\/wordpress-file-structure\/\">WordPress core files<\/a> wasn\u2019t properly installed or is missing from the WordPress installation, it can cause the Failed to open stream error. In which case, <strong>the most likely error message variation would be the \u201cNo such file or directory\u201d and would be pointing to a file located either in the wp-admin, wp-includes, or the root WordPress directory<\/strong>. An example for this kind of error variation is given in the article\u2019s intro, pointing to the <strong>meta.php<\/strong> file that is missing from the wp-includes directory.[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]In most cases, these kinds of the failed to open stream error will lock you out of your admin dashboard, because an important file is missing from the default WordPress installation. Luckily, there is an easy solution for this subtype of the WordPress Failed to open stream error \u2013 reinstall the WordPress files. We will explain how to do it below, both in the case that you still have access to the admin dashboard and if you are locked out of it.<br \/>\n[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]If you have access to the admin dashboard, you can reinstall WordPress by <strong>navigating to the Dashboard &gt; Updates section<\/strong>. In this section, you will see the update status of your plugins, themes, and WordPress files. Users with the latest WordPress version will see a notification confirming it as well as a button which allows them to re-install that version, while others will see an update button which will allow them to update their current WordPress version to the latest one. To reinstall WordPress, simply <strong>press the \u201cRe-install version\u201d button.<\/strong>[\/vc_column_text][vc_empty_space height=&#8221;50px&#8221;]<div class=\"qodef-single-image-holder   qodef-has-border \">\n    <div class=\"qodef-si-inner\" >\n                                    <img loading=\"lazy\" decoding=\"async\" width=\"969\" height=\"654\" src=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/02\/Reinstall-WordPress.jpg\" class=\"attachment-full size-full\" alt=\"Reinstall WordPress\" srcset=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/02\/Reinstall-WordPress.jpg 969w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/02\/Reinstall-WordPress-300x202.jpg 300w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/02\/Reinstall-WordPress-768x518.jpg 768w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/02\/Reinstall-WordPress-620x418.jpg 620w\" sizes=\"auto, (max-width: 969px) 100vw, 969px\" \/>                        <\/div>\n<\/div>[vc_empty_space height=&#8221;38px&#8221;][vc_column_text]After <strong>waiting for a while<\/strong>, your WordPress version will be successfully re-installed and you will be redirected to the page displaying all the fixes and features the new version brings. Of course, at this point, you only need to<strong> focus on verifying if the failed to stream error has been resolved<\/strong> by checking if the same error messages are still present. If they aren\u2019t, it means that the issue has been resolved.[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]On the other hand,<strong> if you are unable to regain access to your admin dashboard<\/strong>, the process of reinstalling WordPress is quite different. You will need to <strong>download the WordPress files from the official WordPress.org download page<\/strong> and <strong>upload them to your server<\/strong> via FTP.[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]This will override any WordPress files that were previously installed, while also installing any that were missing and that have caused the error. As this is something that we have already covered previously, we advise reviewing the article on <a href=\"https:\/\/qodeinteractive.com\/magazine\/how-to-reinstall-wordpress\/#via-ftp\">how to reinstall WordPress via FTP<\/a> at this point. Then,<strong> check the status of the Failed to open stream error<\/strong>. If the missing WordPress core files were behind the error, at this point, you should regain access to your admin dashboard and will no longer see the error messages. But, if this wasn\u2019t the case, then you should proceed with troubleshooting.[\/vc_column_text][vc_empty_space height=&#8221;68px&#8221;][\/vc_column][\/vc_row][vc_row][vc_column][vc_column_text]<\/p>\n<h2 class=\"qodef-h4\"><a id=\"saving-permalinks\"><\/a>Saving Permalinks<\/h2>\n<p>[\/vc_column_text][vc_column_text]Another possible reason for WordPress\u2019 inability to locate the missing files could lie in the fact that your website may be missing the <em>.htaccess<\/em> file in the root WordPress folder. Luckily, this can be easily tested for.[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]If you have access to your admin dashboard, you will only need to <strong>navigate to the Settings &gt; Permalinks section<\/strong> and <strong>click the \u201cSave Changes\u201d button<\/strong> at the bottom to regenerate the<em> .htaccess<\/em> file.[\/vc_column_text][vc_empty_space height=&#8221;50px&#8221;]<div class=\"qodef-single-image-holder   qodef-has-border \">\n    <div class=\"qodef-si-inner\" >\n                                    <img loading=\"lazy\" decoding=\"async\" width=\"969\" height=\"700\" src=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/02\/Permalinks.jpg\" class=\"attachment-full size-full\" alt=\"Permalinks\" srcset=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/02\/Permalinks.jpg 969w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/02\/Permalinks-300x217.jpg 300w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/02\/Permalinks-768x555.jpg 768w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/02\/Permalinks-620x448.jpg 620w\" sizes=\"auto, (max-width: 969px) 100vw, 969px\" \/>                        <\/div>\n<\/div>[vc_empty_space height=&#8221;38px&#8221;][vc_column_text]Then, you should<strong> investigate if the error has passed by checking the status of the error messages previously displayed.<\/strong> Of course, if you no longer see those error messages or any other, it means that the issue was successfully solved.[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]On the other hand,<strong> if you are unable to access your admin dashboard, you need to create the<em> .htaccess<\/em> file manually, via FTP.<\/strong> The<em> .htaccess<\/em> code which is part of most basic WordPress installations is given below:[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\"># BEGIN WordPress\r\n# The directives (lines) between \"BEGIN WordPress\" and \"END WordPress\" are\r\n# dynamically generated, and should only be modified via WordPress filters.\r\n# Any changes to the directives between these markers will be overwritten.\r\n&lt;IfModule mod_rewrite.c&gt;\r\nRewriteEngine On\r\nRewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]\r\nRewriteBase \/\r\nRewriteRule ^index\\.php$ - [L]\r\nRewriteCond %{REQUEST_FILENAME} !-f\r\nRewriteCond %{REQUEST_FILENAME} !-d\r\nRewriteRule . \/index.php [L]\r\n&lt;\/IfModule&gt;\r\n# END WordPress<\/pre>\n<p>[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]Of course, the code will be slightly different if you are running a multisite. In that case, we advise using one of the suggested code versions found in <a href=\"https:\/\/wordpress.org\/support\/article\/htaccess\/\" target=\"_blank\" rel=\"noopener\">the official WordPress.org support article on the .htaccess file<\/a>. As for the exact steps required to implement the code, we advise consulting our article on <a href=\"https:\/\/qodeinteractive.com\/magazine\/how-to-troubleshoot-wordpress-errors\/#recreating-the-default-htaccess-file\">how to recreate the default .htaccess file<\/a>. After performing the suggested steps, check if the error persists. If it does, proceed to the following troubleshooting step.[\/vc_column_text][vc_empty_space height=&#8221;68px&#8221;][\/vc_column][\/vc_row][vc_row][vc_column][vc_column_text]<\/p>\n<h2 class=\"qodef-h4\"><a id=\"properly-setting-up-file-and-folder-permissions\"><\/a>Properly Setting Up File and Folder Permissions<\/h2>\n<p>[\/vc_column_text][vc_column_text]One of the reasons for the error is tied to not having the necessary permissions to access a given file or directory. This error variation is accompanied by the error message withs the words \u201cPermission denied\u201d in it. Here is a possible example of such an error message:<br \/>\n[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]<em>Warning: require_once(\/home\/website\/public_html\/wp-config.php): failed to open stream: Permission denied in \/home\/website\/public_html\/wp-load.php on line 37<\/em>[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]<em>Fatal error: require_once(): Failed opening required &#8216;\/home\/website\/public_html\/wp-config.php&#8217; (include_path=&#8217;.:\/usr\/lib\/php:\/usr\/local\/lib\/php&#8217;) in \/home\/website\/public_html\/wp-load.php on line 37<\/em>[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]Therefore,<strong> if you have seen this or a similar error message, it only means you need to set the permissions on your WordPress files and folders properly to resolve the issue<\/strong>. This step should generally be performed as WordPress error messages change over time. But, having the permissions set on your WordPress files and folders properly secures that they can be read, written to, or executed accordingly.[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]For reference, the suggested permissions for folders are 755 or 750. For files, those are 644 or 640, and specifically for the <em>wp-config.php<\/em> file, the value should be either 440 or 400. You can adjust them via FTP, either using an FTP client or via cPanel. To find out more on the steps needed for this process, we advise consulting our article on <a href=\"https:\/\/qodeinteractive.com\/magazine\/set-file-and-folder-permissions-in-wordpress\/\">how to set file and folder permissions in WordPress<\/a>. Having done that, <strong>check the status of the error<\/strong>. If it hasn\u2019t been resolved, proceed to the final step in our troubleshooting guide.[\/vc_column_text][vc_empty_space height=&#8221;68px&#8221;][\/vc_column][\/vc_row][vc_row][vc_column][vc_column_text]<\/p>\n<h2 class=\"qodef-h4\"><a id=\"asking-help-from-plugin-or-theme-authors\"><\/a>Asking Help From Plugin or Theme Authors<\/h2>\n<p>[\/vc_column_text][vc_column_text]Finally, if the error messages point to a plugin or theme file, but any of the previous troubleshooting steps haven\u2019t resolved the error, <strong>we strongly advise asking for further help from plugin or theme authors.<\/strong> Needless to say,<strong> you should refer to the authors of the file shown in the error message.<\/strong>[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]The reasons for the error vary significantly, ranging from simple typos in file names or code to complex ones like missing third party scripts or authentication errors when accessing third party APIs. Whichever the case, <a href=\"https:\/\/qodeinteractive.com\/magazine\/how-to-ask-for-wordpress-support\/\">asking the professionals for help<\/a> is the way to go after performing the initial troubleshooting steps previously discussed. Of course, when asking for help, make sure to supply the error log and state all the steps that performed before contacting them, as it will speed up the error resolution process.[\/vc_column_text][vc_empty_space height=&#8221;68px&#8221;][\/vc_column][\/vc_row][vc_row][vc_column][vc_column_text]<\/p>\n<h2 class=\"qodef-h4\">Final Thoughts<\/h2>\n<p>[\/vc_column_text][vc_column_text]The WordPress Failed to open stream error can be quite a headache for novice WordPress users, as it can deny them access to their website. Furthermore, it comes with seemingly hard-to-understand error messages which might frighten some users. Luckily, perusing this article carefully you will have learned how to \u201cread\u201d those error messages properly and apply the necessary troubleshooting steps to resolve the error.[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]These steps include reinstalling a plugin or theme, reinstalling WordPress core files, regenerating the default <em>.htaccess<\/em> file, setting the proper file and folder permissions, and asking for support from plugin or theme authors, all of which we have thoroughly explained.[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]This is why we are sure that you will be able to resolve the error with our help. And, with the knowledge you have gained, you will understand the cases in which each of these steps is used best, to optimize the troubleshooting process. Finally, as this is one of the many common WordPress errors, bookmarking this article for future use is something we strongly recommend.<br \/>\n[\/vc_column_text][\/vc_column][\/vc_row]<\/p>\n<\/div>","protected":false},"excerpt":{"rendered":"<p>There are several reasons why the WordPress Failed ot Open Stream Error occurs &#8211; and several fixes. We will walk you through them. <\/p>\n","protected":false},"author":11229,"featured_media":34914,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[219,4,13],"class_list":["post-34896","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorials","tag-error","tag-tips","tag-wordpress"],"_links":{"self":[{"href":"https:\/\/qodeinteractive.com\/magazine\/wp-json\/wp\/v2\/posts\/34896","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/qodeinteractive.com\/magazine\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/qodeinteractive.com\/magazine\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/qodeinteractive.com\/magazine\/wp-json\/wp\/v2\/users\/11229"}],"replies":[{"embeddable":true,"href":"https:\/\/qodeinteractive.com\/magazine\/wp-json\/wp\/v2\/comments?post=34896"}],"version-history":[{"count":0,"href":"https:\/\/qodeinteractive.com\/magazine\/wp-json\/wp\/v2\/posts\/34896\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/qodeinteractive.com\/magazine\/wp-json\/wp\/v2\/media\/34914"}],"wp:attachment":[{"href":"https:\/\/qodeinteractive.com\/magazine\/wp-json\/wp\/v2\/media?parent=34896"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/qodeinteractive.com\/magazine\/wp-json\/wp\/v2\/categories?post=34896"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/qodeinteractive.com\/magazine\/wp-json\/wp\/v2\/tags?post=34896"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}