0

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.

0

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.

0

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.

define('WP_HOME','http://example');

define('WP_SITEURL','http://example');

define('RELOCATE',true);

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.