Best SEO and PPC Tool - Extended Free Trial  GO!
How to Fix “WordPress Failed to Open Stream”

How to Fix “WordPress Failed to Open Stream”

Last modified: April 15, 2020


The ‘Failed to Open Stream’ error is when WordPress is unable to load a file that is mentioned in the code for the page/website. In some cases, the page will load with a warning. But sometimes the error code will appear.

There are simple fixes for this.

Show More

* This button will show the rest of the post and open up an offer from a vendor

Step One: Identifying The Problem

The first step is to identify the problem. With this error code there is usually a given reason. For example it might say permission denied, no such file, operation failed or something else. This is great because it can show what needs to be fixed.

If you’ve got a message that says ‘no such file or directory’, then you need to identify in the code what that file or directory is. Then you can edit the code to identify the correct file or directory or remove the code altogether.

Step Two: Deactivate And Reinstall Plugin/Theme

If the problem is caused by a theme/plugin, this will be identified. To solve this, simply go to your FTP files and the plugins/theme directory. Then delete and re-install the plugin/theme in question in your WordPress dashboard.

This should resolve the issue.

There is also a chance that some plugins have changed and are causing the issue because of a failure to authenticate the plugin or incorrect access method for the developer. If this is the case, you will need to contact the developer. They should fix the problem and offer you a patch/update to resolve the issue.

Step Three: The .htaccess File

It might be possible that the error is caused because of a missing .htaccess file. You can regenerate a new copy of the file by now accessing your WordPress backend. Go to the Permalinks page in the settings menu within your WordPress dashboard. All you need to do then is to click on the ‘Save Changes’ button at the bottom of the page and a new .htaccess file will be generated.

Step Four: Permission Denied

If you have a permission denied problem, then WordPress doesn’t have the right permissions to access the file or directory referenced in the website’s coding.

You therefore need to reset file permissions. All folders and files have permissions in WordPress. This controls who can access them.

Connect to your WordPress website using an FTP client. Now find the root folder, this is the file that contains all your WordPress files. Right-click on that file and select ‘File Permissions’ from the menu.

You should see a permissions dialog box. Ensure that all folders have a permission of 744 or 755.

If you make changes, ensure that you check the boxes next to the options ‘Recurse into subdirectories’ and ‘apply to directories only’.

Click on the ‘Save/OK’ button.

Then you need to repeat this process for the files, ensuring that all permissions are 644 or 640.

Final Word: How to Fix “WordPress Failed to Open Stream”

This isn’t as common as other WordPress errors, that doesn’t mean it isn’t as easy to fix. Use the guide above to ensure that your website’s downtime is as small as possible. Plus, if you can fix it yourself, you don’t need to pay a developer to do it, saving your business funds.

Save 4 Later
Email liked links to yourself