Answer the question
In order to leave comments, you need to log in
How to cancel redirect from localhost to original wordpress site?
Hello! The problem is the following: the client gave access to everything in general, I downloaded the image of the site, deployed it on my localhost, connected everything as it should, but the problem is that I can’t go to my localhost to fasten the layout because it immediately throws it on the site itself. Accordingly, there is no access to the admin panel on the localhost :(
Who faced such a problem? Where to even dig? There is nothing special in htaccess (
Answer the question
In order to leave comments, you need to log in
Run three queries on
your local UPDATE wp_options SET option_value = replace(option_value, 'http://origin-site.com', 'http://local-site.com') WHERE option_name = 'home' OR option_name = ' siteurl';
UPDATE wp_posts SET guid = replace(guid, 'http://origin-site.com,'http://local-site.com');
UPDATE wp_posts SET post_content = replace(post_content, 'http://origin-site.com, 'http://local-site.com');
where, origin-site.com is the address of the live site, and local-site.com is the address of the site that is deployed locally.
When moving back, do not forget to do the same, swapping the addresses in
http requests - no spaces
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question