How to Move from BlogEngine.net to WordPress

Since its original incarnation back in 2008, NerdBeach has been running on BlogEngine.net . I have no real complaints about the paradigm, and found it be a very easy to upkeep solution for running a blog.

But as time went on I found that it required coding to do anything. In a lot of ways that is a positive, but there are nonetheless a lot of great blog goodies in the form of plugins for popular platforms such as WordPress. So, after a little planning, last week NerdBeach.com took the plunge and moved to a Linux hosted backend running WordPress. And so far I like it.

Now, as they say, even the best laid plans of mice and men sometimes go astray, and the changeover was no exception. There were no big issues, but yesterday I did see that the RSS feed collected previously distributed posts when it sent out subscriber emails. And for that I am sorry, but I’m still going to chalk it up to growing pains. But what did moving from BlogEngine.net to WordPress entail? Well, it wasn’t bad. Let’s take a look.

Step 1: Back up the current site, and create the destination WordPress Host

The first step is to make sure to do a backup of the current blog, including all image assets. Once that is done, go ahead and set up your destination host (Linux, if you want to have WordPress work at its best) and install WordPress.  Once that is done, you can go wild looking for a theme and get the look as you want it. I went with something similar to the original NerdBeach.com site, but it did require a lot of tweaks to get it there. But make sure you have the site like you want it before the move.

Step 2: Move Over the Resources and Assets to Support the Existing Posts

Needless to say, we are going to want to keep our posts intact. And a big part of any modern post are the images. Now, the plan is to NOT rewrite by hand all of those posts (NerdBeach was in the 4 figure range, not huge but too many to change by hand), but instead we will bulk edit the image tags. But before that is going to work, we have to move the existing images to the new server.

On the BlogEngine platform, the uploaded images should be found under AppData/Files. Now that you have local current backup, FTP those files to the new server. Now, instead of dumping them in the wp_content/upload folder, I suggest putting them in their own folder off the root, something like /ExistingContent. This lets WordPress continue to work without overloading its media library. Plus I think that is is a cleaner solution, but it is a matter of taste. So, go ahead, decide where you want the old images, and ftp them in place on the new server.

Step 3: Export The BlogML file from BlogEngine and Edit The Image Links

Next, and while the original site is still running, go to settings and export everything to a BlogML XML file. Now, you need to edit this file for every single image you had in a post. But this is simple enough – just find and replace every “/image.axd?picture=” with the path you used to upload the files. For example, do a global search and replace and change it to “/ExistingContent/”. It should go from

“http://example.com/image.axd?picture=MyImage.jpg”

to

“http://example.com/ExistingContent/MyImage.jpg”

Be sure to get the starting “/” and the ending “=”, and with this simple change your existing images will be fine.

Of course, if you are keeping the same domain name, then they are not going to work until you actually move the domain name to the new server, but that is to be expected.

Step 4: Fix the Categories in the BlogML XML File

Now, if your output BlogML file was like mine, you are going to find that your categories have went from being a descriptive phrase to a GUID. But this is no big deal, and with a few greps you can had this fixed. At the beginning of the XML file you will find a categories section. There will be a category entry for each of your existing categories, and its id will be a GUID. Now, the actual value will be listed as a “title” entry, and it will be a CDATA value. You need to replace all instances of said GUID with the category title.

Depending on the number of categories you have, this may take a short while or a long while. But stick with it, and soon you will have the categories in place, ready for import.

Step 5: Import the BlogML XML file into WordPress

Once you have the corrections made to the BlogML XML file, you are ready to import the file into WordPress. But first, we need to make a change to your new site’s permalinks. When running a WordPress site, I do not like the default /?p=123 URL structure. So go change your permalink structure (under Settings/Permalinks) to something that you find more human and SEO friendly. But do it now before you import the file.

Now you need to add a plugin that allows you to do so. Go ahead and search for a BLogML import plugin, and install it (this can be easily done through the WordPress dashboard). Once you have it installed and activate, go to tools/import and import your file.

With luck, your file will import clean, and you will be given an option at the end of the process to get a conversion file from the BlogML import plugin. This file will very handily list the old post URL and the new, permalink updated one (this is why we changed the permallink BEFORE importing). Grab this, it will make your life easier for the next step.

Step 6: Edit the .htaccess File to Add the Search Engine Redirects

Now, the last thing you want to do in a website move is to trash all of your search engine and web links that you have built up over time. And you certainly don’t want to lose that sterling Alexa ranking that you have worked so hard to build. The good news is that you won’t but we need to tell everyone that things have moved.

The mechanism for doing this on the Linux host is as close as hidden file in the root of your new site, called .htaccess. You will need to edit this file in your favorite editor.

When you first load the .htaccess file, you may be surprised to find a “# BEGIN WordPress” section. The reason for this is simple enough – when you changed the permalink earlier, WordPress uses this file to rewrite the inbound link back to something it likes. This is no problem, but we have to make an important note here: Do all redirects ABOVE the WordPress section in the .htaccess file. Failure to do so will cause you mysterious problems, especially after the original inbound links are re-written.

Okay duly noted. Remember that file you got from the import process? Go open it, and copy its contents to the clipboard. Now paste it into that .htaccess file you are editing, ABOVE the WordPress section. But don’t save yet, we have some editing to do.

You may note that the information we just paste in has two complete URLS, the original and the URL on the new site. We need to have this structure in the file for a redirect to work:

Redirect 301 /post/name-of-article.aspx http:example.com/name-of-article/

Of course, either side may vary depending on your chosen site options. The important thing to note is that the left side has only the path information, and the right has the complete link. Of course, you also need the “Redirect 301 ” bit as well. If your blogengine path was like mine, then a simple search and replace from “http://example.com/post/” to “Redirect 301 /post/” will be specific enough to fit the bill. Your required creativity may vary.

Once you have the .htaccess file complete with the redirects for every existing post on your site, then save it back to the server. Since it should have been a pre-existing file the permission should be fine. If for some reason they are not, set the permission to 644 or whatever you feel is best for your situation. But in most cases a permission change won’t be required. Congratulations, all google juice and web rankings should now be intact after the move thanks to the 301 permanent move notification.

 Step 7: Pull the Hammer

At this point there is only one more thing to do to make the changeover happen – you have to pull the trigger. That is, you need to point the domain name to the new site. This will vary depending on your host service, but in most cases it involves removing the domain from the existng host, waiting for that to take place, and then assigning the freed up domain to the new server.

This is a simple matter if you are keeping the same host company for the new site. In my case the changeover took about an hour from start to finish, at which time NerdBeach was down. But if I had changed host companies in the process, it could have taken much longer for the DNS change to happen. But this is your choice, and it really is a great time to change hosts if you are planning to do so.

After the Domain is officially pointing to the new site, you should find that the old links now take you to the new site posts. And hopefully the images in the old posts now display more or less properly. Congratulations, you have moved your Blogengine site to WordPress.

Step 8: Don’t forget these things

In the rush to get the site moved over, it might be easy to overlook a few details that you need to take care of. First, make sure that any tracking code, such as Stat Counter or Google Analytics, is on the new site. You don;t want to go a few days and realize that you lost all of that tracking information. In fact, you may want to closely monitor it for a few days and make sure that the incoming links continue to do so.

Next, you may want to take note that your feed address has changed. Where before it was something like http://example.com/syndication.axd, it is now probably http://example.com/feed. You can add this to the .htaccess file as a redirect, but if you are using feed burner or other such services, go and update the address. This will prevent future gotchas when you clean up the .htaccess file (the search engines would have updated the address by then) and suddenly your feeds stop working.

Finally, consider grabbing a wordpress plugin that will find missing links in your posts. This may help in detecting any issues with the move. Of course, you may be bombarded with old links that just don’t work anymore, but hey it’s free information.

With a little planning, a move from BlogEngine.net to WordPress can be easily done. The important thing is to have the new site looking as you want it before the move, and being responsive to any issues created during the process. With luck they will be minimal, but it may be entertaining nonetheless.

WordPress

WordPress is a free and open source blogging tool and a dynamic content management system (CMS) based on PHP and MySQL. It has many features including a plug-in architecture and a template system. WordPress is used by over 14.7% of Alexa Internet’s “top 1 million” websites and as of August 2011 manages 22% of all new websites. WordPress is currently the most popular CMS in use on the Internet

source:wikipedia

Related Articles