i had a wordpress website on xampp let's say in "localhost/listing" and it was working perfectly then i installed another copy of this website on "localhost/mylisting" now the problem is that when i type "localhost/listing/wp-admin" the site redirects itself to "localhost/mylisting/wp-admin" i dont know how to solve this problem. i tried making another directory and copying all contents on listing in it and the problem was same.

2 Answers 2


It's because your new copy of the site localhost/mylisting is still hooked into same database as localhost/listing.

So to avoid that, you have to point your new installation to a different database. to do that, goto your phpmyadmin and export your current db, then create new empty db and import into it. then goto newly imported db's wp-options table. change siteURL and homepage URL to localhost/mylisting from localhost/listing.


Change the site url and home url.The problem is database have the old url address thats why you are facing this problem. You can use this code in wp-config file and change url accordingly.




Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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