Guides › HTML / PHP sites › Site down or error screens

PHP 'Failed to Open Stream: No Such File or Directory' on include or require

The path in your include is wrong after moving files. Use absolute paths based on __DIR__.

Reference guide. This guide is written from established practice and the official documentation of the tools involved. We have not yet tested every step on a live demo site. Back up your site before you change anything.

This error means PHP cannot find the file you included.

Fixes

require_once __DIR__ . '/includes/config.php';

Related

See our PHP errors guide.

Related guides

Did this solve it? If not, email hello@sitefixlab.org with the exact error text and we will look into it. Try the problem finder.

Last updated 2026-11-21.