0

i have setup e local mageto1 site from live which have magento WordPress integrate.So whenever i try to open local server admin of WordPress it automatically goes to live site how change setup that url for local site Thank you.

2
  • search in database there will be stored live url so find and replace from phpmyadmin . Commented Aug 16, 2018 at 10:31
  • i have seared in phpadmin but did't find any thing there was only a serialized value with a <a> tag i have changed it but nothing happen Commented Aug 16, 2018 at 10:34

1 Answer 1

0

You'll need to update the URLs in the database, and the tables are slightly different than typical WP table names.

Try these :

UPDATE wp_blog_options SET option_value = replace(option_value, 'http://www.oldurl.com', 'http://www.newurl.com') WHERE option_name = 'home' OR option_name = 'siteurl';
UPDATE wp_blog_posts SET guid = replace(guid, 'http://www.oldurl.com','http://www.newurl.com');
UPDATE wp_blog_posts SET post_content = replace(post_content, 'http://www.oldurl.com', 'http://www.newurl.com');
UPDATE wp_blog_postmeta SET meta_value = replace(meta_value,'http://www.oldurl.com','http://www.newurl.com');

Once complete, navigate to http://www.newurl.com/[PATH_SET_IN_FISHPIG_CONFIG]/wp-login.php in a browser, and configure the new database details to generate your wp-config.php file. We configure the PATH to blog.

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.