Help Needed Moving Domain From a.com to b.com


#1

Hi,

I’ve been struggling with this for a fair few hours because my knowledge is very limited. I’ve also extensively googled but can’t quite find the answer I’m looking for.

I have a Wordpress site hosted on Dreamhost, and I simply want to change the domain from a.com to b.com

Dreamhost has its own wiki guide that goes something like this:

  1. Fully host new domain on Dreamhost (done)
  2. Change the base URL set in your wordpress settings (not done but I know how to)
  3. Move the actual wordpress files

Now it’s at point No.3 where I start to struggle. I’ve downloaded and worked out FileZilla and am currently backing up a.com to my PC.

But the explanation for point No.3 extends no further than:

This can be done via FTP, SFTP or SSH. Once connected, you can then move your site’s Wordpress files from the old domain’s web directory, to the new domain’s web directory.

I even think I’ve got my head around this now. However what’s confused me is the whole notion of databases and if I need to think about this. All the Youtube guides have people messing about with mysql etc. which isn’t mentioned in the Dreamhost guide at all.

The guide simply has a footnote that says:

– BEFORE YOU PROCEED – please make sure to backup your database, since we will be making some changes that can potentially break things.

Now I backed up the database using the one-click tool in the Dreamhost panel. However I have no idea if I need to do anything with it to accomplish the url move.

Any advice would be very welcome, I realise this is totally simple, but it’s not if you don’t know what you’re doing :slight_smile:


#2

the 3rd step has an even easier than what you are doing.

First in step 1 make sure you hosted using the same “user” as the original site.
Next wait until DNS propagates and you can see the dreamhost coming soon page at b.com
change the worpress dashboard.
log in via SFTP and you will see both a.com and b.com folders in that users home directory.
rename b.com to temp
rename a.com to b.com
rename temp to a.com

FTP doesn’t actually have a rename function, SFTP should work tho, or you can use SSH (or some ftp clients allow you to run shell commands) in that case the command you want is “mv” (move) and if the current directory is the users home (if you don’t change directories after you log in that is the current directory) then it would be
mv b.com temp
mv a.com b.com
mv temp a.com


#3

Thanks for simplifying that!

I’d already hosted as the same user, and now the ‘coming soon’ page for b.com is there.

Now when I login to filezilla I see the following folder structure:

  • ? /
  • ? Home
  • user
  • ? .svn
  • a.com
  • a.com.old
  • ? logs
  • ? maildir
  • ? b.com

So before I actually do it…do I simply need to rename b.com to temp / a.com to b.com / temp to a.com? Do I need to worry about any of the other files such as a.com.old? Btw the question marks are as they appear in filezilla, I’ve no idea what they mean but have added in case significant.

Thanks


#4

I don’t use filezilla and don’t currently have it installed, so I can’t help with the questions marks.

a.com.old is a folder that was renamed during an upgrade so a new a.com could be created. You can tell by the date on the folder how old it is. Most likely at this point it’s ready for deletion. You should for an delete when they are no longer needed (they exist so there is a quick fix if an update needs to be rolled back. If rolled back, that should be considered a temporary fix–not the end to upgrades)

and yes the renames are all you need to switch the files to the new domain, and it’s much faster than downloading and re-uploading. FYI - I don’t know if it’s still true with the current version of WP, but it used to be that you MUST do the change in the WP dashboard FIRST, which results in a warning message in the WP dashboard and breaks the site until the renaming part is done. If the renaming is done first, I don’t think you can access the WP dashboard–which is the reason this is order dependent.