The following path outlines my successful migration from a custom hosted wordpress blog (not on wordpress.com) to a blog on Blogger and E-mail on Google Apps.
The reason to do this migration was that my old hosting was slow and unreliable, and I wanted a maintenance free and cheap hosting solution for both blog and e-mail. Google’s solutions were chosen over e.g. corresponding Microsoft Live products, mostly due to the excellent webmail interface Gmail offers.
The examples below use akselvoll.net, this domain, as example.
- Domain (akselvoll.net) registered with Godaddy.com
- Generally satisfied
- E-mail and webhosting with dream-hosting.co.uk
- Extremely cheap (9,99 GPB / year) but very unreliable (downtime several times per week)
- cPanel based hosting (11.24.4-RELEASE) – very flexible but mostly untouched
- Wordpress (2.7.1)
- Approximately ten e-mail forwards (no hosted e-mail)
In general, keep current domain registrar and move all other hosting to managed services (SaaS) to minimize configuration and management time, while at the same time increasing security and availability.
All content should be migrated to the new platform (although new URLs for blog entries was expected).
- Godaddy as domain registrar and for DNS
- Blogger for weblog hosting
- Google Apps for mail forwarding and optionally (on a user to user basis) as primary mail account.
Step 1: DNS migration
DNS is probably set to a server controlled by the old web host. First step is to enter Godaddy Domain Manager and choose “Hosting nameservers”. Shortly thereafter (a couple of minutes) “Total DNS Control and MX Records” will be available. Enter the following settings to temporarily replicate the old hosting:
|A||@||<OLD ID>||1/2 hour||Root of domain (akselvoll.net) to old hosting|
|CNAME||www||akselvoll.net||1/ 2 hour||Pointing www.akselvoll.net to akselvoll.net|
|MX (priority 0)||@||akselvoll.net||1/2 hour||Sending mail to old hosting|
All other default Godaddy entries should be deleted.
Note that now the DNS server had been switched. The only downtime would be for clients running NSLookup in the timespan from changing DNS servers until the servers are properly configured.
Also note that all TTL’s are set to the minimum value (1/2 hour) to be able to switch over to the new services later as quickly as possible, minimizing DNS propagation time.
Step 2: Blog migration
Create a new blog on Blogger, using default settings for most choices. Then migrate contents from the Wordpress blog using the tool blogsync-java. A couple of tips and remarks regarding this process:
- The complete JDK from Sun seems to be necessary to run this tool.
- Edit the run.bat file of blogsync to reflect your jdk installation path (the second to last line?)
- Important: Settings are not properly saved in blogsync. Enter your wordpress and blogger logins, press save and then exit and reopen the application, before you try to run it.
- Blogger seems to limit the number of items you can create automatically per day. In my case I hit this limit when three posts remained, and I simply migrated those (copy/paste) manually.
- Wordpress hosted images are not properly migrated. You need to download those and upload to blogger and fix your posts manually.
- Comments are not migrated.
Step 3: Taking the new blog live
I took the blog live before Google Apps, because several posts on the internet indicated that the opposite would not work. Most of those posts were rather old, though, so I don’t know if this is still an issue.
When the blog is more or less ready, set it up to be reached through the domain url. This is done by following the instructions in the Publishing settings in Blogger. Important: To work correctly with Godaddy DNS, set up www.akselvoll.net as the publishing URL, not akselvoll.net. This redirect will be set up later. The reason for this is that if you set up a CNAME for the root of your domain in Godaddy (and possibly other DNS servers), this will also redirect your MX lookups, and thus disable your email.
The resulting DNS setting in Godaddy are as follows:
Note that a short TTL is used on all DNS settings until the setup is testing and working, to limit the duration of any errors (and yes, I had some, not documented here :)).
The blog is now live on the url www.akselvoll.net. Next step is to set it up to respond on akselvoll.net as well.
Step 4: Setting up redirection from root of domain
To set up proper redirection from akselvoll.net to www.akselvoll.net, Godaddy’s own mechanism is used, to circumvent the above mentioned CNAME / MX problem.
Instructions, as obtained through tech support, are as follows. Set up an A record from the root of your domain to Godaddy’s forwarder IP, “188.8.131.52”. Then use the “Forwarding” options available in the Domain Manager, and forward to http://www.akselvoll.net [Edit: Do not include a trailing slash (/) in the forward URL as this may give you double slashes and HTTP 400 Bad Request errors.] I chose to use “301 Moved Permanently” for desired search engine indexing, convinced by this page.
The DNS setting is as follows:
Step 5: Testing before mail migration
Now is a good time to test that your blog is live on www.akselvoll.net and akselvoll.net. You should also test that e-mail is still delivered to the old account.
If you have problem accessing through the new URL, this may be due to DNS propagation. I recommend using http://www.network-tools.com/ for checking the DNS records, and http://www.hidemyass.com/ for accessing your site easily through a proxy.
Step 6: Signing up for Google Apps
Sign up for Google Apps Standard Edition here. Follow the instructions for setting up the domain and e-mail, but choose to set up domain later when asked. The reason for this is that you want to configure any e-mail redirections before you start receiving mail.
When your Google Apps account is working, configure an email account for each user that needs either a mail account or forwarding. Note, though, that you can create several aliases per user, in case you want to forward several addresses to the same destination. (There is no forwarding without an account.)
To set up forwarding, log on to each of the accounts, enter Settings –> Forwarding and POP/IMAP. Enable the forward option, enter the email address to forward to and choose whether you want to leave forwarded mail on the current account or not.
Step 7: Start receiving email on Google Apps
Enter e-mail settings in your Google Apps account, and select the option for activating e-mail. This should be fairly straight forward, and your DNS settings should be similar to the ones shown below:
|MX (priority 10)||@||aspmx.l.google.com.||1/2 hour|
|MX (priority 20)||@||alt1.aspmx.l.google.com.||1/2 hour|
|MX (priority 30)||@||alt2.aspmx.l.google.com.||1/2 hour|
|MX (priority 40)||@||aspmx2.googlemail.com.||1/2 hour|
|MX (priority 50)||@||aspmx3.googlemail.com.||1/2 hour|
I’m unsure to whether the trailing dots are necessary, but this is how Google instructs and it is working. Also note that I still choose to set TTL to 1/2 hour, in case anything is incorrect.
Step 8: Test email
You should now test that email is properly received / forwarded on Google Apps. It is also wise to double check your blog (with and without www) at this time.
Step 9: Increase TTL on DNS records
If you now feel sure that email and blog is correctly set up, you should increase the TTL on all DNS records, to improve caching and performance. I recommend setting all records to 1 Day or 1 Week. If you later plan to do any changes, this is the maximum time that your DNS records will be kept in any cache. Prior to doing any later changes, you should reduce them all to 1/2 hour again, and then wait for a few days, to be able to move quickly.
Step 10: Set up and an SPF record
To ensure that your outgoing Google Apps mail is not marked as spam, you should set up an SPF record. Google Apps provide instructions for this; in short you should set up the following SPF record: “v=spf1 include:aspmx.googlemail.com ~all”.
To do this in Godaddy total DNS is easy yet not intuitive.
- Click “Add new SPF record” in the total DNS control.
- Choose “an ISP or other mail provider” and click OK.
- Click the tab “Outsourced” and enter "aspmx.googlemail.com” in the textbox. Leave “Exclude all hosts not specified here ( -all )” unchecked and click OK.
This should give you a DNS record as shown below:
|TXT||@||v=spf1 include:aspmx.googlemail.com ~all||1 Day|
To test your SPF record, the easiest way is to send an email to [email protected].port25.com. You should shortly after receive an authorization report to your email, hopefully with SPF: pass. If this does not work, Google for other ways to test SPF.
Step 11: Migrate mail
If you plan on using mail accounts on your domain (not just forwarding), you should look into Settings –> Accounts on your mail account. To migrate from Gmail the procedure is as follows:
- Enter your (old) Gmail account, select Settings –> Forwarding and POP/IMAP and enable POP for all mail.
- Enter your (new) Google Apps account, select Settings –> Accounts and click “Add a mail account you own”.
- Enter your Gmail address, and accept all default values. Enter your password and click ok.
- Respond to whether you want to be able to send outgoing mail from that address and, if so, follow the instructions.
The whole migrate process can take a couple of days. When this is done, I recommend disabling the account in your Google Apps, and simply set up forwarding from the Gmail account.
You should now have moved your mail and blog to free Google services, hopefully without much downtime. If you have any questions, please comment to this article or mail me (if you can guess my address :)).