At times, you may need to replace WordPress core files.
In that case:
- First, take a backup of your website âso that you may revert back to the website if anything goes wrong. We are going to remove almost all the WordPress files just without the main files of a WordPress website, those that we are keeping are: âwp_contentâ folder and âwp_config.phpâ file.
2. Before replacing, check the WordPress version. Because if WordPress is an older version and if you replace it with a newer version, then the website may have a different problem other than the problem that you are currently facing.
3. To check the version, log in to your cPanel then go to âFile Managerâ and click on the âwp_includesâ folder from âpublic_htmlâ file.
4. On the new page, you will see some folders and files. Now scroll down at the bottom of this page and click on âversion.phpâ then click on the âviewâ button at the top of this page.
5. Now from the new page, you will find the WordPress version.
6. Then you will need to download a new WordPress to replace it. You can download a New or Old version from here:
Table of Contents
Get a New Version Of WordPress:
Get an old version of WordPress:
7. The website will work only if you leave the âwp_contentâ folder and âwp_config.phpâ files and replace the rest. For this, âwp_contentâ and âwp_conflig.phpâ should be left and the rest should be deleted.
8. Now extract the previously downloaded WordPress file and delete the two files âwp_contentâ and âwp_conflig.phpâ from there and compress the rest of those files on your computer. After that, you have to upload that compressed (zip) file to cPanel and âExtractâ it in the âpublic_htmlâ file.
9. Finally, after replacing the core files check the âwp_contentâ folder to see if there are any cache files. If there are cache files, you may need to âDeleteâ those files too.
After replacing the core file in this way, now you should check to see if the problem is solved.