How to Fix WordPress ERR_TOO_MANY_REDIRECTS — Complete Guide
ERR_TOO_MANY_REDIRECTS means WordPress is stuck in a redirect loop — usually caused by a…
WordPress Failed to Open Stream No Such File or Directory
This error is thrown by PHP when WordPress tries to load a file that simply isn’t where it expects it to be. The full message usually looks something like: Warning: require(/home/user/public_html/wp-content/plugins/some-plugin/file.php): failed to open stream: No such file or directory. PHP is telling you — loudly — that it went looking for that file and came up empty.
You’ll most often see this as a white screen, a partial page with a PHP warning at the top, or a complete site crash depending on which file is missing. If the missing file is part of a plugin, you might only lose that feature. If it’s a theme file or a WordPress core file, your entire front end could go down.
The good news is this error always tells you exactly which file is missing and the full path to where PHP expected to find it. That path is your starting point for the fix.
You should see: A path like /wp-content/plugins/plugin-name/some-file.php clearly identifying the broken component.
You should see: Either the file is missing entirely or it exists but may have a permission issue.
wp plugin deactivate plugin-name
wp plugin delete plugin-name
wp plugin install plugin-name --activate
You should see: The plugin reinstalled and active with no PHP errors on the page.
You should see: Your theme loading correctly with no stream errors.
/wp-includes/ or /wp-admin/), reinstall WordPress core. Go to Dashboard → Updates → Re-install Now, or use WP-CLI:
wp core download --force
You should see: Core files refreshed with your plugins, themes, and content completely untouched.
// Replace this:
require_once '/home/user/public_html/wp-content/plugins/my-plugin/file.php';
// With this:
require_once plugin_dir_path( __FILE__ ) . 'file.php';
You should see: No more path errors, even if the site moves to a different server or directory in the future.
Get free WordPress & AI tips
Join 500+ readers. No spam, unsubscribe anytime.
Not necessarily. If the missing file belongs to a non-critical plugin, only that plugin’s functionality breaks. But if the file is part of your active theme or WordPress core, you’ll likely see a white screen or a fully broken front end until the issue is resolved.
Yes — if your WordPress dashboard is still accessible, use the built-in plugin and theme reinstaller directly from the admin panel. Your hosting control panel’s File Manager is a solid FTP alternative. If both are inaccessible, contact your host’s support team to restore the missing file from a recent backup.
Something else on your site is likely calling that file directly. Check your active theme’s functions.php and any custom plugins for require or include statements that reference the same file path. Remove or update those references to stop the error from reappearing.
Add these two lines to wp-config.php temporarily: define('WP_DEBUG', true); and define('WP_DEBUG_LOG', true);. The full error including the missing file path will either display on screen or be written to /wp-content/debug.log. Remove both lines once you’ve identified and resolved the issue.