M
M
maxme19852018-05-17 15:35:38
WordPress
maxme1985, 2018-05-17 15:35:38

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

3 answer(s)
T
tyzberd, 2018-05-17
@maxme1985

create not localhost but a folder with the same address as the site

M
Max Medar, 2018-05-17
@MedVedar

https://codex.wordpress.org/Changing_The_Site_URL

J
jeka89, 2018-05-17
@jeka89

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 question

Ask a Question

731 491 924 answers to any question