DopeAt DopeAt - 2 years ago 174
PHP Question

Wordpress local admin redirects to live server admin page

Just transfer my live server wordpress website. Everything wprks fine when i realize that the locally localhost/site/wp-admin is redirecting in the live one.

And i can't access locally website.

What should i do to fix this, and work locally to do some experiments?

Thats the sql commands i put after transferring database locally

UPDATE wp_options SET option_value = replace(option_value,'', '') WHERE option_name = 'home' OR option_name = 'siteurl';

UPDATE wp_posts SET guid = replace(guid, '','');

UPDATE wp_posts SET post_content = replace(post_content, '', '');

UPDATE wp_postmeta SET meta_value = replace(meta_value, '', '');

Answer Source

I use the following in wp-config.php to fix this:

define('DOMAIN_ROOT', 'http://localhost/site');
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download