Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I have an existing wordpress that I copied to my localhost (including databases). I changed the wp-config.php for localhost, but when I try to go to wordpress/wp-admin, it connects to my live site...

What do I need to change? (btw, using XAMMP)

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
217 views
Welcome To Ask or Share your Answers For Others

1 Answer

Add these two lines to your wp-config.php, where "http://localhost/wordpress/" is the correct location of your site.

define('WP_HOME','http://localhost/wordpress/');
define('WP_SITEURL','http://localhost/wordpress/');

or check in table wp_options column option_name = siteurl check the option_value

Please refer here for more information http://codex.wordpress.org/Changing_The_Site_URL


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...