0

I have done all the steps requiered to import the dump.sql file to new database, and copiey the entire content from the old domain over to the new one.

When i login to mydomain/wp-admin, i'm redirected back to the frontpage of the old domain, and can't access my control panel. I've followed all the steps for setting it up to the new domain, but i can't figure out where the problem is.

3

First add

define('WP_SITEURL', 'http://example.com');
define('WP_HOME', 'http://example.com');

To your wp-config.php file (obviously change example.com to your domain)

then login and once you see the admin panel navigate to http://yoursite/wp-admin/options.php

there you can change home and siteurl to your new domain and save.

You will also need to change the links for images and other media in your post database table.

  • +1, Your answer was a lifesaver. However, editing those two items on the options.php page does not work. You get a options "saved" confirmation, but they still show up as the old values when the options.php page is reloaded. I had to locate those two values in the database table and edit them manually. – Sparky Apr 30 '12 at 19:53
2

Update URLs in the database, re: How to Move WordPress Blog to New Domain or Location

UPDATE wp_options SET option_value = replace(option_value, 'http://olddomain.com', 'http://newdomain.com') WHERE option_name = 'home' OR option_name = 'siteurl';

UPDATE wp_posts SET guid = replace(guid, 'http://olddomain.com','http://newdomain.com');

UPDATE wp_posts SET post_content = replace(post_content, 'http://olddomain.com', 'http://newdomain.com');

UPDATE wp_postmeta SET meta_value = replace(meta_value, 'http://olddomain.com', 'http://newdomain.com');

and/or, Search RegEx is a good plugin to be able to search and replace with Grep through all posts and pages.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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