This guide explains how to restore WordPress core files. It may happen that if your WordPress site flops because of any update or a compromise, it may sometimes be helpful to restore the core WordPress files instead of going through them specifically looking for the issue.
Just keep in mind that we are unable to provide full support for changes made to a CMS, and the information provided in this post is only intended as a recommendation. To ensure relevance and compatibility with your website, we recommend contacting your website developer if you need assistance with this
The directions in this guide should only be followed as a last option.
Follow the steps:
- Download the up-to-date version of WordPress using this link: https://wordpress.org/download/
- Log in to cPanel and select “File Manager” to upload the WordPress zip file into the public_html folder.
- Select the “public_html” file.
- Locate the “wp-config.php” file and rename it to “wp-config.php.real”.
- (Optional) Remove all files save for the wp-content folder, wp-config.php.real, and .htaccess files if you’re doing this because your WordPress website has been hacked.
- In the cPanel File Manager, right-click the “WordPress.zip” file, extract the contents, and select to overwrite any existing files when prompted.
- Rename the “wp-config.php.real” file back to “wp-config.php” after deleting the freshly produced wp-config file from public_html.
Need to recover more than just WordPress files? Learn How to Restore Deleted Files in cPanel Manually