PDA

View Full Version : How to fix Wordpress when upgrade/update failed - Tutorial



Fli
01-23-2016, 09:20 AM
Wordpress update/upgrade failed and on the site there are errors, example:


"wp-includes/random_compat/random.php)
[function.require]: failed to open stream: No such file or directory"

If you see other "No such file or directory" it means that Wordpress is missing some files, you need to supply this files and you can supply them from within Wordpress original files which you download from https://wordpress.org/download/release-archive/

How to fix (tutorial for those who do not know how to do it)

0)
Backup your hosting account, the files backup should be enough. This can usually be made after login to your hosting control panel and click Backup icon. Or File manager icon and in the file manager go to www or public_html folder and select all contents (you should see wp-content and wp-includes folders) after selecting all files/folders, there should be Archive/compress button to make .zip archive out of that.

1) Download original Wordpress files

When upgrade failed, you just need to go to the https://wordpress.org/download/release-archive/ and download appropriate ZIP archive.
If you do not know which version to download, go to your hosting control panel and into File manager to browse your website files.
There in www or public_html you should be able to see "wp-includes" folder. Enter into it and view/edit file named version.php
In this file you can see the version you download from Wordpress.org website mentioned above. After download, extract the .zip archive.

2) Upload original files over to your wordpress website

A) FTP upload
Probably your hosting provider given you FTP login details. You can use FTP client like FileZilla, WinSCP, TotalCommander to transfer files between your computer and your webhosting account. After login to your webhosting from within FTP client, make sure on the left side is the Wordpress original files folder you downloaded & extracted. enter Wordpress folder and you should see wp-content, wp-includes and other folders. You are in the right folder. Then in the right window of the FTP client make sure you are in your webhosting account in the www or public_html folder and you should also see wp-content and wp-includes folders. Good. Now we synchronize both folders so you upload original Wordpress files to your hosting. Highlight all files and folders on the left (original wordpress files/folders on your local computer) and use mouse to drag and drop them to the right window (wordpress files/folders on your hosting account). Upload/copy all and overwrite those that has different size. Overwriting means that your current files will be overwriten. That is why we made a backup in the step 0).

B) Web based upload
Another option is that you login your web hosting account web based control panel, enter File manager and upload files via web browser. In such a case, first backup all files in www or public_html folder. I do it by clicking Select All button and clicking Compress button to make .zip file out of my files. We made backup of the files. Now go to your computer and browse the original wordpress archive you downloaded and extracted. Enter Wordpress directory and you should see wp-includes, wp-content folders which tells you you are on the right directory. Now select all files and folders and make a .zip archive from them. THis archive upload to your www or public_html folder on your webhosting. Then extract it.

3) Complete

Now when you uploaded all oiginal wordpress files to your hosting, wordpress should no longer be missing any files and such errors should be away. If all is OK, do not forget to download your backup & archive it or delete it from your hosting so it do not takes disk space.

kumkum
10-27-2021, 03:21 PM
Its not that much complicated to upgrade your Wordpress:
You can either do this with one click or you can also manually upgrade your Wordpress account.

You can check wordpress upgrade (https://hoststud.com/resources/steps-to-upgrade-wordpress-in-detail.768/) step by step process.