It is possible that your WorPress website is giving error and has gone corrupt. There are several reasons for such error and one such reason could be an incomplete upgrade or a bad plugin etc.
When you have exhausted all your options to get your Wordpress website running, then the final solution is to restore Wordpress core files.
IMPORTANT: Before following our guide OR making any changes to your WordPress, please make sure to generate a full backup of your existing WordPress website (including files, databases etc) and download it to your local machine.
Reinstalling Wordpress Core files using FTP:
- Visit https://wordpress.org/download to download the WordPress .zip file to your computer.
- Unzip the file on your computer. This unpacks all WordPress files and directories.
- Within these files, rename the wp-content directory to wp-content_bk
- Copy existing wp-config.php file to wp-config.php_bk.
- Log into your site from your cPanel -> File Manager. Alternatively you can use your preferred FTP tool such as Filezilla etc.
- Upload all files and directories you just downloaded into your current site. When prompted, choose to overwrite the files on the server.
- Now copy the mysql database name, mysql username, mysql hostname and mysql password from the wp-config.php_bk to wp-config.php
Above method will help you restore Wordpress core files, and your themes, plugins, database, and wp-content folder will not be affected.