Domain Name Change - possible?


#1

Here is my issue:

We purchased “domain1” and fully hosted it here at Dreamhost. It is a WP site and while I have put a fair amount of work into building it so far, it is not live as yet.

We recently found out we cannot use “domain1”, so we secured another domain name, say “domain2” and would like to use that one.

What is the simplest way to make this change while not losing work already done? I would happily re-establishing email accounts, etc., but don’t want to lose anything else.

Any guidance here appreciated!

Thanks!


#2

Similar situation here. Other hosts have a “change primary domain” function. Does DreamHost allow primary domain changes, and if so, what is the process?


#3

There are actually quite a few threads here that cover this. The basics: (and it is order dependent.)

  1. add your new domain on the Manage Domains page of the dreamhost panel. You must specify the same “user” as old domain. Stop and wait for DNS, when you can see the dreamhost coming soon page in your broswer for new domain you are ready to move on.

  2. log into the wordpress dashboard and update the 2 fields in settings that define your url and hostname. When you save this change, your site will break or become unavailable, don’t worry the next step will resolve that.

  3. log into ftp or the shell. Find the 2 system generated directory named for newdomain.com and olddomain.com (they should both be in your home directory which is the default when you log in.) rename (or move) olddomain.com to Temp, rename newdomain.com to olddomain.com, rename Temp to newdomain.com

  4. either edit the wordpress database manual or use a plugin that updates for domain name change. Wordpress stores hardlinks back to itself in the database so all occurances of olddomain.com need to change to newdomain.com

If you used the one-click installer, you should just go remove the entry because it will no longer be pointing to the right place. These days you don’t really need it for updates, since wordpress will want you to update if any are available from within the wordpress admin.


#4

For step 4, if you’re good with command line, I would log in and run this:

That will do the DB change for you, safely! Remove the --dry-run call to run it for real :slight_smile: