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'm having problems moving a wordpress site from one domain to another. I've searched the site but couldn find a useful answer for my situation.

Here's what i did:

I made a backup of the website. Then i exported the database. Then i installed Wordpress on the other domain. Then i copied all my Wordpress files of the old website on the new server overwriting the new installation. Then i deleted everything from the database on the new server and imported the database of the old server. Then i changed the database name and bpassword in the wp-config file.

So i did all this but the new site isn't working, and i don't know where it went wrong? So i'd like to start over, but what should i do different?

Thankyou for your help!

share|improve this question

3 Answers 3

Are you moving WP to new server and domain or new server only? I mean will URL remain the same or will be changed?

There are several things that can go wrong and it is hard to say from details you provided.

Basically:

  • there might be something wrong with your new WP installation, had you just tried clean empty install of WP?
  • there might be something wrong with database move and/or configuration.

See Moving WordPress to a New Server in Codex for general info.

share|improve this answer
    
I also did a search and replace, but didn't work. It is to a new domain. A clean empty install worked, but as soon as i overwrite it with the other files it breaks, and even after importing the old sql file. –  user1829 Dec 6 '10 at 14:25

You forgot to search + replace in the .sql file. (I assume you did the export with phpmyadmin). Search for www.olddomain.tld and replace it with www.newdomain.tld

Log into WP-Admin and update the permalink structure, then everything should be ok.

share|improve this answer
    
I also did a search and replace, but didn't work. It is to a new domain. A clean empty install worked, but as soon as i overwrite it with the other files it breaks, and even after importing the old sql file. –  user1829 Dec 6 '10 at 14:23
    
Can you still find the old url in the sql file? –  Horttcore Dec 7 '10 at 8:10

but as soon as i overwrite it with the other files it breaks...

What exactly does that mean? When you overwrite the old theme with the new theme? Do you have hardcoded URLs in the theme that you moved?

When moving a database from one domain to another (in addition to reading See Moving WordPress « WordPress Codex), you may need to use these queries in phpmyadmin to change URLs in the database for site options, post URLs and post/page/image URLs in the post/page content.

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');
share|improve this answer

Your Answer

 
discard

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