Background:
When WordPress.Org releases a new update to its WordPress standalone CMS (Content Management System), you may have set your website to get your installation updated automatically, or you may like to do it yourself at your preferred time.
But because of server load on the part of your web host, you may get an error something like this with a screwed-up blank website with the following error printed on the screen:
Warning: require(/nfs/domains/your-domain-name.com/html/wp-includes/session.php) [function.require]: failed to open stream: No such file or directory in /nfs/domains/your-domain-name.com/html/wp-settings.php on line 122
Fatal error: require() [function.require]: Failed opening required '/nfs/domains/your-domain-name.com/html/wp-includes/session.php' (include_path='.:/usr/local/php-5.3.27/share/pear') in /nfs/domains/your-domain-name.com/html/wp-settings.php on line 122
The actual cause of the above errors:
As mentioned, errors are generated because of interrupted WordPress updates, primarily because of heavy load on your web host’s online server. As the update fails, all files mismatch with consistent version numbers, so some old source files remain as it is & only the remaining few get updated with the new version. So, it is a problem of source code version consistency.
How to fix this:
Error 01: [function.require]: failed to open stream: No such file or directory in
Error 02: Fatal error: require() [function.require]: Failed opening required & (include_path=’.:/usr/local/php-5.3.27/share/pear’)
There is a solution for the above two errors & here is how to fix them,
Step 01: First & foremost backup your installation & database
Note: Now check on your Server Home/domains/your-domain-name.com/html/wp-content/upgrade & delete any existing files in this folder through FTP
Step 02: Download the WordPress update in a zip file from the wordpress.org download section
Step 03: Unzip that WordPress update zip file on your desktop
Step 04: Now sign in to your server to the root folder of your preferred domain
Step 05: Now delete the old wp-includes and wp-admin directories on your web host (through FTP or shell access).
Step 06: Using FTP or your shell access, upload the new wp-includes and wp-admin directories from the downloaded unpacked archive to your web host instead of the previously deleted directories.
Step 07: (Precaution) Do not delete or replace the wp-content folder on the online server on your web host
Step 08: Now upload all remaining new loose files from the new version’s root directory to your existing WordPress root directory on the online server.
Step 09: Now, after completing the upload, go to your domain’s web address and see if the website has started to work as before.
I hope your website will start to function normally.
I hope it helps.
Thanks & Regards
Mandar Apte
Leave a Reply