Failed to open stream

Hi,

I have this message while I want to open my site. I work on Mac Apple M4- Sequoia 15.1.1.
If somebody can help me, Ihave work on my site since 2 months

Warning : require(/Users/barbarasoulat/Local Sites/naia-studio-digital-1/app/public/wp-includes/functions.php): Failed to open stream: No such file or directory in /Users/barbarasoulat/Local Sites/naia-studio-digital-1/app/public/wp-settings.php on line 114

Fatal error : Uncaught Error: Failed opening required ‘/Users/barbarasoulat/Local Sites/naia-studio-digital-1/app/public/wp-includes/functions.php’ (include_path=‘.:/usr/share/php:/www/wp-content/pear’) in /Users/barbarasoulat/Local Sites/naia-studio-digital-1/app/public/wp-settings.php:114 Stack trace: #0 /Users/barbarasoulat/Local Sites/naia-studio-digital-1/app/public/wp-config.php(103): require_once() #1 /Users/barbarasoulat/Local Sites/naia-studio-digital-1/app/public/wp-load.php(50): require_once(‘/Users/barbaras…’) #2 /Users/barbarasoulat/Local Sites/naia-studio-digital-1/app/public/wp-admin/admin.php(34): require_once(‘/Users/barbaras…’) #3 /Users/barbarasoulat/Local Sites/naia-studio-digital-1/app/public/wp-admin/index.php(10): require_once(‘/Users/barbaras…’) #4 {main} thrown in /Users/barbarasoulat/Local Sites/naia-studio-digital-1/app/public/wp-settings.php on line 114

Warning : require_once(/Users/barbarasoulat/Local Sites/naia-studio-digital-1/app/public/wp-includes/functions.php): Failed to open stream: No such file or directory in /Users/barbarasoulat/Local Sites/naia-studio-digital-1/app/public/wp-includes/class-wp-fatal-error-handler.php on line 180

Fatal error : Uncaught Error: Failed opening required ‘/Users/barbarasoulat/Local Sites/naia-studio-digital-1/app/public/wp-includes/functions.php’ (include_path=‘.:/usr/share/php:/www/wp-content/pear’) in /Users/barbarasoulat/Local Sites/naia-studio-digital-1/app/public/wp-includes/class-wp-fatal-error-handler.php:180 Stack trace: #0 /Users/barbarasoulat/Local Sites/naia-studio-digital-1/app/public/wp-includes/class-wp-fatal-error-handler.php(156): WP_Fatal_Error_Handler->display_default_error_template(Array, false) #1 /Users/barbarasoulat/Local Sites/naia-studio-digital-1/app/public/wp-includes/class-wp-fatal-error-handler.php(60): WP_Fatal_Error_Handler->display_error_template(Array, false) #2 [internal function]: WP_Fatal_Error_Handler->handle() #3 {main} thrown in /Users/barbarasoulat/Local Sites/naia-studio-digital-1/app/public/wp-includes/class-wp-fatal-error-handler.php on line 180


What steps can be taken to replicate the issue? Feel free to include screenshots, videos, etc


System Details

  • Local Version:

  • Operating System (OS) and OS version:


Local Logs

Attach your Local Logs here (Help Doc - Retrieving Local’s Log)


Security Reminder
Local does a pretty good job of scrubbing private info from the logs and the errors it produces, however there’s always the possibility that something private can come through. Because these are public forums, always review the screenshots you are sharing to make sure there isn’t private info like passwords being displayed.

Hi @barbara1

With fatal errors like these you might have to try disabling plugins or swapping your theme first to see if that resolves the issue.

You can click on Site Shell in the Local app and use CLI commands like wp plugin deactivate --all and see if you can get back in once all of the plugins are disabled.

Or you can run wp theme list and see what themes you have available and run something like wp theme activate twentytwenty to switch to another one.

It’s possible that some update or conflict arose between one of these installed items and some other part of the site.

Hi @barbara1,

[Investigation] The specific “…/app/public/wp-includes/functions.php): Failed to open stream: No such file or directory in…” warning can be replicated by messing with a core WordPress file.
For Example: In a good, healthy, working installed website when tthe ‘/wp-includes/functions.php’ file is renamed or deleted; this issue will be created.

[Solution] This specific issue can be fixed by putting a copy of that core WordPress file (functions.php) back into the directory (/wp-includes/).

The most important point is that the file has to be from the same version of WordPress that your ‘naia-studio-digital-1’ website is using.

  1. Using the LocalWP application, create a new blank website on your personal computer and be sure to select the same WordPress version as the local website (naia-studio-digital-1) with the issue.
  2. In LocalWP with the new website selected, click the ‘Site Folder’ button to open the file manager application (probably Finder) at the correct directory.
  3. Navigate to the ‘/app/public/wp-includes/’ directory.
  4. Select and Copy the functions.php file.
  5. In LocalWP with the original (naia-studio-digital-1) website selected, click the ‘Site Folder’ button to open the file manager application (probably Finder) at the correct directory.
  6. Navigate to the ‘/app/public/wp-includes/’ directory.
  7. Paste the functions.php file.

In theory, if all has gone well, the missing file warning should disappear and your local website should be working again; because the ‘/wp-includes/functions.php’ file now exists in the naia-studio-digital-1 website.

Hopefully that was the only missing file.

1 Like