L
L
ligisayan2016-07-12 16:33:32
PHP
ligisayan, 2016-07-12 16:33:32

Why the error failed to open stream: No such file or directory in on line?

Hello! Transferred the wordpress project from real hosting to a local server running OpenServer, named it by.by and put it in the domains folder, connected and imported the database (siteurl and home http://adt.by parameters) - everything seems to be fine, but during the transition an empty white page is displayed on the site
.

Warning: include_once(/home/adtby1/www/by.by/wp-content/plugins/wp-super-cache/wp-cache-phase1.php): failed to open stream: No such file or directory in D:\ TEMP\OpenServer\domains\by.by\wp-content\advanced-cache.php on line 10

now I throw the file into the root of the folder to find out the path
<?php
echo $_SERVER['DOCUMENT_ROOT'];
?>

shows such
D:/TEMP/OpenServer/domains/by.by

Where is the catch?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
Michael, 2016-07-12
@springimport

The caching plugin saved the path from the server, hence the error.

I
Igor Vorotnev, 2016-07-12
@HeadOnFire

Because many plugins write their settings to the database (paths to files, etc.), when transferring, you need to replace them in the database dump as well. Use WP Sync DB (look on github) or similar tools to export the database so you don't have to manually search and replace.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question