Posts tagged: wordpress

Migrating from WordPress.com to your own

Like some of you might know or notice, we recently moved from Wordpress.com’s blog hosting to our self-hosted version (for hardcore fans, this is the second time this blog has moved). As good web citizens, we here at Tech IT Easy believe in sharing information, so here’s how we did our migration.

Moving over the WordPress content

Moving over the WordPress content

There are couple of issues we hit during the migration, and might be good to know for anyone who plans to do the same. Many Google searches were used and multiple blog posts were read in order for our migration to happen, so hopefully this summary makes it easier for future generations…

Preparing for the migration

Our blog had its own domain name already on WP, so one thing to keep in mind is that you need to update the nameserver records from wordpress’s to whoever you’re planning to host your site. However, this is the last thing you will do. Just make sure you have access (or you know how to contact the right guy) to change the  nameservers.

Install Wordpress

Next, install Wordpress on your new host. For example, we initially installed it at techiteasy.webfactional.com. Many hosts allow you to do 1-click style of installs with takes much of the pain away.

Copy the settings over from your wordpress.com blog as well as you can to your new. Make sure you keep the same permalink structure. Do set your blog URLs to your temporary URL instead (in our case, techiteasy.webfactional.com).

Don’t get fancy just yet, but just go with the admin account. We’ll get to user accounts later.

Install plug-ins and themes

Another thing to note when hosting your own blog is that you’re now responsible for security issues in your blog. This means that there are couple of plug-ins you’ll need to install. If you allow user-registrations, you really need the WP-reCAPTCHA -plugin. Also remember to set-up the Akismet-plugin with your Wordpress.com user account API code.

On some hosts WordPress’s normal way of sending e-mail doesn’t work (like at our webhost, Webfaction) and you need to install Configure SMTP-plugin instead. Also, if you want to keep your experience similar to what you had at WP.com, be sure to install Wordpress.com Stats and Yet Another Related Posts Plugin.

Some other plugins you might want to consider are Google Analyticator (If you’re into Google Analytics), Google XML Sitemaps and WP Super Cache.

Back-up Wordpress.com

First of all, do a backup of your blog at wordpress.com. Don’t worry about images or other content, they’ll join your post texts when you’ll import the backup to your new blog later.

It probably goes without saying that all content that arrives to your blog after this point isn’t in the backup, so you might want to do this when it’s quiet in your blog and afterwards remember to manually add all the “missed” content.

Import backup

Our back-up file was about 12 megs in size, which turned out to be a problem because you need to upload the backup using WordPress’s web admin panel. Some web hosts will allow you to override PHP’s maximum file upload and script execution times (default is 2 MB), but some don’t (In WordPress’s Restore page you’ll see what is the effective limit). Even though we did increase both limits, uploading the 12 MB backup didn’t work. At this point I did wonder what use is a back-up you can’t restore.

Your best (and almost only) way to work-around this is to split the XML file into smaller chunks. You need to retain the headers and footers in each chunk, but otherwise it’s quite straight-forward.

You probably want to change to the new site pretty quickly after importing, so you might want to do some of the tune-ups mentioned here only later. What you really should do now is  to now check that the URLs you care about look the same in your new site as they do in the old one (fe. www.techiteasy.org/2008/09/01/random-post and techiteasy.webfactional.com/2008/09/01/random-post).

Fix user accounts

At least for us, user accounts did not transfer smoothly over. First of all, the usernames are wrong and you probably can’t login with them. On top of that, your author links are probably screwed on the new blog. To fix these, you need to do some SQL to fix the entries in database. This isn’t a clean solution, but so far seems to have worked for us.

The easiest way is to create a new account with the same username you have at WP.com and then transfer all the “old” account’s posts to you (and then delete that old account). This takes care of the author URL’s to remain same as previously.You can transfer the posts to your new account by noting your new and old account IDs in the wp_users table and then doing UPDATE wp_posts SET post_author = <your new account ID> WHERE post_author = <your old account ID>. You can check from WP’s admin panel that your new account should have all your posts and the old account should have zero. You can now delete the old account.

If you want to have another username, you need to change the user_nicename field in wp_users table to your WP.com username, if you want to keep your author URLs.

We also had some problems with duplicate and non-working categories, but for most part those are easy to fix using the WP admin panel (except for the categories that show up as numbers, no idea where they came from).

Change nameservers

Image search gave this for "nameservers", but changing them isn't as hardcore or cool. Beards are optional, too.

Image search gave this for "nameservers", but changing them isn't as hardcore or cool. Beards are recommended, though.

Once you change your domain’s nameservers to your new host, it can take some hours before DNS caches around the intertubes get updated. In the meantime strange things can happen and people might end up at different places or your blog might be unreachable. Also, if you take advantage of Wordpress.com’s Gmail integration, remember to copy over those DNS entries too. (We didn’t, so no idea how that is done.)

Now is the time to go to your new blog’s settings and change the blog URLs to the “real” ones (in our case, from techiteasy.webfactional.com to www.techiteasy.org).

You might want to use something like IntoDNS to check the status of your DNS entries and that they’re working.

Once this is all clear, you might want to use Google’s webmaster tools to see if there are any problems with your site. You can do this earlier, but you need to verify the domain to access all the stuff (and you can’t verify it while on WP.com).

This is also a good point to send e-mails to other authors of your blog of all the changes you’ve done (Sorry, guys) and that they might need to create new accounts.

One nice side effect is that people who access your blog’s ancient address (yourblog.wordpress.com) are redirected to your new place as long as you’ve subscribed to WP’s own domain thing. This also goes for RSS feeds. However, it’s a bit troublesome trying to access your old blog’s admin panel anymore at WP.com, because even that tries to redirect to the new one. Once you get there, though, you might want to write an entry explaining that the site has moved for the time when your domain add-on runs out at WP.com.

Conclusion

And that’s pretty much that. Now what you need to do is to keep on cranking out blog posts.

Maintaining your blog on your own does add a bunch of overhead. You need to make sure your setup is up-to-date and secure. On the other hand, you have complete freedom to tweak every aspect of your blog. For us, the benefits of latter were big enough to do the change. If this had been my personal blog, I wouldn’t have bothered.

The migration is far from simple and there are lots of things that can go wrong, so do set a good amount of time to do the migration (fe. a weekend). Basically as long as you don’t update nameservers, you have a nice test environment where to test out different aspects of your new and shiny blog. The only problem is syncing the content (including comments) between your “live” and test sites.

So far, I’ve been very pleased by the set-up Webfaction has and do recommend them. Full SSH and their custom domain/app/site panel are excellent. It beats hands down many of the other hosts that I’ve used so far. Even though with the latest WordPress that doesn’t mean so much because you don’t have any reason to dig into the system with FTP or SSH because everything is available from the web interface.

Photos by Bethany L King (CC BY-ND 2.0) and rangerdawson.

Staypressed theme by Themocracy