3 weeks ago I uploaded all my files from localhost to cPanel. I want to switch it back , the issue I facing is my original database from the localhost is not updated . I downloaded the database from the cPanel and tried to set it in local host in wp-config.php , but its transferring me to installation every time and then resetting all the data. How can I update the database so it will show the site the same exact way as in production?
just to understand you... You have a livesite on some host which uses cpanel and you want to revert it back to your local Installation? (e.g. xamp)
I think the easiest way is to use a Backup/Restore plugin. For example Akeeba Backup (free and easy to use). It also helps you to replace permalinks that may have changed.
If you're getting the installation page, it means that you probably have:
- Incorrect database name in
wp-config.php- Look for
DB_NAMEin the file. It should match the database name used when you imported it to localhost
- Incorrect database table prefix in
wp-config.php. Check if
$table_prefixis the same on production and on your local
Note: I'm assuming that you already downloaded the database from cPanel and imported it into localhost. You can read the Moving WordPress page on the Codex. Don't forget to update the
home fields in the
options table, else you'll be redirected to the production server.