Transferring Between Domains


#1

Greetings All!

Please advise on the best way to do this:

I have Domain A, and I’m about to purchase Domain B. I have Wordpress installed on Domain A, and wish to transfer the site to Domain B. Once this is done, I’ll set Domain A to redirect to Domain B (I know how to do this). I also have emails set up via Google Apps for Domain A, and would like to switch it to Domain B — leaving Domain A emails as aliases to Domain B. The reason I don’t just have Domain B point to Domain A is because I will eventually stop using Domain A and give it up to the great something-or-other.

So I realize that’s more two questions of advice:

  1. How do I move everything from Domain A to Domain B? Can I just rename /user/DomainA.com to /user/DomainB.com? Would that break the WP installation?

  2. If you’re familiar with Google Apps, is there a way to switch domains? I know I can add a domain to a previous account, but to my knowledge it becomes a secondary — wherein I want the primary to be Domain B. Should I set up a Google Apps account for Domain B, transfer the users, and the domain?

Thanks so much for taking the time to help! :slight_smile:


#2

I only know the best answer to question 1. Since you’re using google for mail, I’ll pass on that one.

As far as hosting goes,
-Add the new domain as fully hosted, USING THE SAME SSH/FTP user as the old domain.
-Once that’s complete and the domainb.com directory shows up in ftp or ssh, then go into your wordpress dashboard and update the domin name there first. Saving it will give you an error message and break your site.
-Next, and you were on the right track, rename the domains folders:
domaina.com -> temp
domainb.com -> domaina.com
temp -> domainb.com

Your site should now be back up unbroken. Once you have tested thoroughly and know that you have no need to switch it back, delete hosting on domaina.com and set up your re-direct.

If you will eventually be getting rid of domaina.com then you should also add a domainb.com mysql hostname on the mysql tab in the panel. Wait awhile, for that to propagate, and then go edit you wp-config file replacing the hostname.


#3

Great! Thanks for confirming my thinking. I forgot the step on the WP end, so thanks for mentioning that. It sounds like a relatively painless process with not too much downtime.

Hopefully someone familiar with Google Apps can advise me there. :wink:


#4

Um, I think you’ll need to do some extra work in the WP database. See WP has a bad habit of storing the domain in the db rather than using the relative paths. This is especially important if you’re going to get rid of the previous domain.

The options table has two values which are pretty important, one is site_url and the other is home.

Then in the posts table you also need to check the links etc…

I normally dump the db from phpMyAdmin/Mysql and use a text editor or sed to change the values globally.

Jw


#5

This actually gets taken care of with:

It’s true that if extensive use of links or images occurs there might be a need to edit the posts table, but on the other hand if the user doesn’t have mysql experience and the size of the blog is relatively small they might choose manual edits over the mysql learning curve.

Just a few more thoughts…