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 just built a wordpress website and now my partner has advised me that she has bought a different domain name and wants me to swap it for the current one.

She has purchased the new domain from the same company she has hosting with for the current site.

There support team said the easiest way would be for me to forward the new domain name so that it is pointing at the current site.

However this will not change the url's right? So my site will still show the old domain name in the url?

What's the best way around this issue?

I don't really want to setup a new hosting package under the new domain name and have to migrate the site across.

share|improve this question
add comment

2 Answers

The proper way is after pointing the new domain to your hosting account to change the URL references in the Database. So, besides the siteurl & home options you shouldn't forget upload path at the same table and a complete search & replace for local links and media URLs inside post contents.

There are many ways to do this according to the Codex.

Lately I've been using the Wordpress Search & Replace tool that can scan all required tables to replace the URLs. ( Always backup the DB first )

share|improve this answer
add comment

The easiest way to handle this issue is to go throw the next steps:

  1. Dump your database
  2. Open dump and replace old domain with new domain
  3. Import your dump
share|improve this answer
1  
That would break serialized values. Not a good idea. –  toscho Apr 14 '13 at 9:16
    
Never faced up with such kind of problem. What values are stored serialized? –  razbakov Apr 14 '13 at 9:53
    
dashboard_widget_options and some transients. Plus, maybe some plugin option. Not that important but worth to be mentioned. –  toscho Apr 14 '13 at 10:27
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.