Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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.

share|improve this question
add comment

2 Answers

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.

share|improve this answer
    
+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
add comment

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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