Sometimes I need to create a WordPress website clone for testing purposes. This normally goes onto a subdomain, i.e. if the main website is, the temporary test version will be If you simply restore the website, including the SQL database from a backup, as soon as you try to navigate to, you will be redirected to

To resolve the issue, you need to make a few small changes:

  • In the website's hosting root directory (normally httpdocs) open wp-config.php and update the database name, user, and password.
  • Open the SQL database table xxxx_option in phpMyAdmin, and update siteurl and home value to point to the new domain (i.e.
  • This is not required for the new website to work, but if the dev site is public, you probably don't want search engined to index it. To prevent this, login to the WordPress wp-admin, go to Settings > Reading and enable “Discourage search engines from indexing this site" option.

November 2023


No comments

Leave your comment

In reply to Some User
Captcha Image