Support

Site Restoration

#35613 Warning: include_once(wp-cache-phase1.php): failed to open stream: No such file or directory

Posted in ‘Site restoration’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Environment Information

PHP version
n/a
CMS Type
Other
CMS Version
n/a
Backup Tool Version
n/a
Kickstart version
n/a

Latest post by on Friday, 10 September 2021 20:17 CDT

pelyon

Hi, I keep getting this error when restoring a WP site to a different server ( from acies.com host to siteground) and restoring to a different domain. 

Warning: include_once(wp-cache-phase1.php): failed to open stream: No such file or directory in /home/customer/www/clearlyconveyed.com/public_html/wp-content/advanced-cache.php on line 22

Warning: include_once(): Failed opening 'wp-cache-phase1.php' for inclusion (include_path='.:/usr/local/php74/pear') in /home/customer/www/clearlyconveyed.com/public_html/wp-content/advanced-cache.php on line 22

I have tried deleting WP-Super-Cache, resetting server by switching from ph 7.4 to 5.6 and back, deactivating wordfence, 

Can you recommend any other actions I can take?

nicholas
Akeeba Staff
Manager

Reading this WP Super Cache support thread gives me some insight into what this file is. You need to delete the wp-content/advanced-cache.php file from your site.

If I understand correctly the subtext of that thread, if you re-enable or re-install the WP Super Cache plugin this file will be regenerated.

I DO NOT recommend downgrading your site to PHP 5.6. It's been end of life for too long. In fact, I do not recommend using anything lower than PHP 7.4 on a production server at this moment. If anything, you should be making sure all your software is compatible with PHP 8 so you can upgrade your site over the next year — PHP as a whole 7 becomes end of life in December 2022 when PHP 7.4 (the last PHP 7 release) becomes end of life. Remember that PHP is releasing one new minor version every year, between end November and end December. Each minor version of PHP is actively developed for one more year and then gets another year of security fixes before becoming End of Life. 

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

pelyon

Hi Nicholas, I read that thread as well and completed all the steps it indicates, taking 4 different backups, using new databases.

However I could not find that file to delete. I deleted the the wp-super cache plugin, did not find the advanced-cache.php file,   made a backup and still got the error.

Re 5.6, I know, the site wouldn't even run on it, but it was an attempt to "reset the server" as the thread suggested.

Anyway, is there a way,  when backing up, to not include this file if it's present?  

Thank you,

-Jason

pelyon

I searched again for the file names in the error, both advanced-cache.php and wp-cache-phase1.php, and cache-config.php which was also mentioned in wp thread. They are not in the file manager of the new site, (from the latest backup) but still get the error.  The error by the way does not allow me to access the admin panel of the site. Akeeba restores everything just fine except for the error. Any other suggestions/ steps to tweek the backup or restoration process to avoid this error are appreciated. 

pelyon

Update: I can get into the admin panel to the site after all. However the error remains at the top of the page.  Perhaps this opens up some other options?

 

pelyon

Hi Nicholas, 

Problem solved. Not sure how, could have benn a cache issue, but as soon as I edited the header.php file in the theme with the correct links (to the new domain instead of the old) the error disappeared. Thank you and good luck with all the fires in Greece. We in California sympathize greatly.

-Jason

nicholas
Akeeba Staff
Manager

Okay, that's interesting. The header.php shouldn't have absolute links to the files. Since it runs after WP has initialised they can and should be using paths relative to ABSPATH, the WordPress constant which contains the absolute path to the site's root.

It's surprising to me that WP Super Cache would not only alter your theme files but also 1. use absolute paths and 2. not wrap the include in an if(@file_exists(...)) conditional. These are, like, kindergarten level code quality considerations. We were doing that in Joomla since it was called Mambo back in 2003. WP Super Cache is supposed to be the most widely used WP cache solution and its code is not following what's been a best practice since well over 20 years ago?! Unbelievable.

Thank you for the wishes. We had to evacuate our summer house (my mom's house) last week. Thankfully the fires didn't reach our village but they were one village over, just 2 ½ miles as the crow flies, which was scary. Good luck with the wildfires in California. Climate change is affecting our homes in equal amounts :(

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

System Task
system
This ticket has been automatically closed. All tickets which have been inactive for a long time are automatically closed. If you believe that this ticket was closed in error, please contact us.

Support Information

Working hours: We are open Monday to Friday, 9am to 7pm Cyprus timezone (EET / EEST). Support is provided by the same developers writing the software, all of which live in Europe. You can still file tickets outside of our working hours, but we cannot respond to them until we're back at the office.

Support policy: We would like to kindly inform you that when using our support you have already agreed to the Support Policy which is part of our Terms of Service. Thank you for your understanding and for helping us help you!