2

I have a database backup and entire site folder backup of a wordpress site. I want to setup it in my localhost. These are the steps I followed.

  1. Create a database
  2. Import the database_backup.sql
  3. Open the wp-config.php and edit the following details

define( 'DB_NAME', 'contents_wp' );

define( 'DB_USER', 'root' );

define( 'DB_PASSWORD', '' );

define( 'DB_HOST', '127.0.0.1' );

But I cannot log in to the admin panel. It redirects to the live site. How to solve this? What I am doing wrong here?

Any suggestions will be appreciated.

3 Answers 3

1

You need to edit the site URL : http://codex.wordpress.org/Changing_The_Site_URL

Sign up to request clarification or add additional context in comments.

Comments

1
Simple trick here 1>> Delete your wp-config.php file, so that it will ask you re create the file 2>> Give the details as the system asks, like your db name, user name, password and table prefix. 3>> Next set the site title and log in to the admin panel. 4>> After logging in to the admin panel go to the "settings" menu set the "site url" and "home url" over there. 5>> Then you are all set with the settings, you can see your site in the system now 6>> You might need to change the image paths if required, for that build a query and run that for ex: update clc_postmeta set meta_value= REPLACE(meta_value, 'http://wp.raddyx.in/CLC-Wordpress', 'http://clc.com/~clc/') WHERE meta_value LIKE '%http://wp.raddyx.in/CLC-Wordpress%'; 7>> Atleast run this query for wp_posts and postmeta table 

Comments

0

For migrate Wordpress website You require to Edit information in config.php file, After that In your Database table name "wp_options" Require to edit value in "siteurl" and "home" fields.

1)) siteurl is url where to redirect our site, when we write url in browser. 2)) home is url , when we add url/wp-admin, then where to redirect.

See Screenshot.enter image description here

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.