Are you facing failed to open stream error in your WordPress blog? This error shows the messages where the error occurs however it will be difficult for the beginners to find the issue. In this tutorial you will learn how to fix the WordPress failed to open stream error easily.
Cause of Failed to Open Stream Error
This error occurs because your WordPress site could not load the file from the code. Your blog may continue to load with the error message or may fails to load with error message saying fatal error.
You will see the error messages that tells you where the error is located and can be fix following the clue in the message e.g. such file or directory, permission denied, fatal error.
Warning: require(/home/blog/wp-includes/load.php): failed to open stream: No such file or directory in /home/blog/wp-settings.php on line 17.
Fatal error: require(): Failed opening required ‘/home/blog/wp-includes/load.php’ (include_path=’.:/usr/share/php/:/usr/share/php5/’) in /home/blog/wp-settings.php on line 17.
Fix Failed to Open Stream Error in WordPress
You can start troubleshooting the error following the step by step method given below.
- Regenerate .htaccess File
- Deactivate Plugins & Themes
- Check Files and Folders Permission
Step-1: Regenerate .htaccess File
One of cause of this error can be the missing .htaccess in your WordPress site. Your WordPress site may unable to locate the file because of missing .htaccess file. You can regenerate .htaccess file easily from your WordPress dashboard.
Click on permalinks under settings then click on save changes without making any changes. This will create a .htaccess file in the root directory of your website. If this did not fix the error follow the next step.
Step-2: Deactivate Plugins & Themes
If the error messages say no such file or directory then you need to deactivate the plugins or themes to fix this error. You can see this guide on how to disable WordPress plugins.
If deactivating the plugins did not fix the error then you can try switching your current theme to WordPress default themes such as twenty fifty, twenty seventeen from the WordPress dashboard.
Login to WordPress dashboard and click on themes under appearance then install WordPress default themes such as Twenty Seventeen and activate. If the error still exist then you have to check the file and folder permissions of the WordPress in next step.
Step-3: Check File and Folders Permission
Other cause of this error can be the incorrect file permission sets in your WordPress file and directory. If the error message say permission denied then you need to check the file and folder permission in your web server. You can see this guide on how to fix the file and folder permission error in WordPress.
If above troubleshooting method did not fix the error then you can see WordPress troubleshooting tutorial to resolve the issue.