we have a wordpress installation running on address www.example.com. We wanted to have a development site for it as a subdomain, so we created a subdomain dev.example.com on cpanel. Created a duplicate of its database and replicated the files to the directory root of dev.example.com. Then modified wp-config.php to point to the duplicate db. Now the problem is, when we try to access dev.example.com/wp-admin, it redirects to https://www.example.com/wp-login.php?redirect_to=https%3A%2F%2Fdev.example.com%2Fwp-admin%2F&reauth=1

Anybody can help me with this?

  • 2
    When you copied the database, did you change the site url to the sub domain? It is usually the first record in the wp_options table. – Charles Clarkson Aug 8 '13 at 20:25
  • @CharlesClarkson Actually, I'm using this interconnectit.com/products/… to change wp_options and wp_posts url to my new url. Still no luck, I'm dumping my db now to check again for any occurences of my old url. – Bryan CS Aug 8 '13 at 20:46
  • Check your theme files too. – Charles Clarkson Aug 8 '13 at 20:48

Based on Charles Clarkson's comment, I directly changed the siteurl and home options in the wp_options table to be https://dev.example.com/ and this fixed the problem for me.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.