Migrating blog from GraffitiCMS to WordPress
As I had mentioned in my previous post, GraffitiCMS appeared as if it was on life support, so it was time to consider a new platform for this site. The impetus to me wanting to make the switch was worrying how I was going to migrate my existing content URLs to the new format for the chosen platform.
After much research, I finally settled on WordPress mainly because the community support for things like plugins and widgets which allowed me resolve the URL remapping issue quite easily.
While there are many CMS systems out there, both paid and free, it really came down to how extensible the platform would be based upon the community that uses it. I was not thrilled to be using PHP as I am more familiar with the .NET technologies, but considering I don’t have a lot of time to develop for the site, I wanted something that I could find supported code for.
So since I was hosting GraffitiCMS on IIS6, I upgraded my site to be hosted on IIS7 because of the URL rewrite plugin that is available. This allows me to specify a list of old URLs to rewrite to new URLs in the WordPress format by issuing 301 responses so that search engines recognize the content has moved. This should minimize the impact to SEO, and allow existing sites which linked to my site to still function. This provided similar function to the .htaccess file used Apache web servers. If you are using IIS6, there is a .htaccess solution from Micronovae’s IIS Mod-Rewrite module available. However, as I mention below, with some of the WordPress plugins available you can also handle the redirects.
Some prerequisites to migrating to WordPress is that you must install PHP on the server that is going to host your blog, as well as have access to a MySQL instance which will house your database.
So here are the steps I used to migrate from GCMS to WordPress.
- Export existing content from GCMS into a format that can be imported into WordPress: This was accomplished by the tool created by Jon Sagara called GraffitiToBlogML (Jon ported Curt’s original VB code to C# which I prefer.) which will export your content into either MoveableType export format or BlogML format. I did have to modify Jon’s code to include Extended Post information and not just Body information since I had used the extended post feature of GraffitiCMS. If you need to know how to do that, please drop a comment, and I will post those details. I used Jon’s app to export my content into the MoveableType format, as there didn’t appear to be a direct imported for BlogML in WordPress. In hind sight I didn’t realize it did not export the tag data, so you might want to modify the code to see if it can support exporting tags
- BACKUP! BACKUP! BACKUP! : Backup your GraffitiCMS database, and backup your GraffitiCMS files on your site before you modify anything so in case you need to revert back you can.
- Download the latest WordPress release and upload it to your website: You can create a sub-directory on your site named "wp" and copy all the WordPress files in there. However, doing this will yield needing the "wp" in all of your links, which for me in an OCD kind of way I was not happy with. Since GraffitiCMS is .NET and WordPress is PHP I was able to upload WordPress to the the root of my site, since there were no conflicting file or directory names. This also had the side effect of letting me configure and update WordPress while GraffitiCMS was still serving content.
- Import GraffitiCMS data into WordPress: Since I exported the data previously, I used WordPress’s import function to bring in posts, comments, and categories. It worked quite well with using the MoveableType format prepared by the above mentioned application.
- Configure WordPress and Install Plugins: Follow the current setup guides on the web, and use these plugins below to achieve similar functionality to what you had in GraffitiCMS. You might want to leave some of these plugins inactive so you can configure your site url redirections before you actually start redirecting. It should be noted that if you want to use the “pretty permalink” (no index.php) option, you will need the .htaccess or the URL Rewrite rule to do this. I was not able to find a way with the Redirection plugin below.
- Redirection – A great plugin where you can map the old GraffitiCMS URLs to the new WordPress URLs. It also allows you to track links which issued a 404 error so you can adjust your rule set to match how your site is being used. It was quite simple to create an import file in CSV, .htaccess, or XML where I was able to provide the old and new URLs. I used the 301 rewrite function so search engines will pick up the new links. Remember to also update the links for any RSS feeds you had in your site for categories or tags as well.
- Google Analyticator – An integrated plugin that allows you to use Google Analytics which also includes a module for the WordPress dashboard to display latest statistics.
- Woopra Analytics – My favorite web analytics engine includes a dashboard module for real time data on who is visiting your site.
- Google XML SiteMaps – Sitemaps are generated when you update your content so they can be crawled by Google, Yahoo, or Bing (or other search engines).
- All in One SEO Pack – GraffitiCMS really had a nice design which was well thought out for SEO optimization. This plugin uses many of those same rules with your content to achieve similar results.
- Easy Adsense – If you have Google’s Adsense ads on your site, this is a great way to integrate them into your content. It allows dynamic placement to adhere to Google’s policies as well.
- Akismet – The comment SPAM technology that was used in GraffitiCMS.
- Disqus – A full featured comment system which allows federated use of OpenID, FaceBook credentials for having conversations on your content. It replaces the default Comment system in WordPress and includes Dashboard modules for tracking conversations. It also allows you to import your existing comments from posts. Install this one after you import your existing GraffitiCMS data so the comments exist to be imported.
- Yet Another Related Posts Plugin (YARPP) – Adds links of related posts from your site to the bottom of posts and RSS feeds similar to one of the modules that was available for GraffitiCMS.
- Switch to WordPress from GCMS: After you have all your content in WordPress, your URLs mapped out, and you are ready to make the switch, make the index.php on your root the default page to load. Also activate the redirector plugin so your old links now go to your new content. Hopefully all is well, but expect to be checking your 404 logs and adjusting your rules.
- Remove GraffitiCMS files: After you have been running your new WordPress site for a few days, and are sure this is the direction you want to go in, you can remove your legacy GraffitiCMS files. Be aware if you used the IIS7 URL rewrite module, these rules are stored in the Web.config file so you might still need that.
- Monitor Search Engines and Logs: If you setup all your redirection information and verified that the new sitemap.xml contains your new links search engine crawlers should rediscover your content and update your pages within their results. Also, if you use Feedburner you might need to update your sites syndicated feed URL.
That really should be all there is to it. It will take some time to get used to the differences of WordPress from GraffitiCMS, but so far I am very happy I made the move. GraffitiCMS had much promise of an easy to deploy app, which looked like it might build a good community following, but it didn’t quite make it that far. GraffitiCMS definitely had a quicker deployment ability, but I think the community support for extending WordPress makes up for the learning curve to get similar results.
If you have any questions, please post it in a comment below and I will see what information I could supply. Overall, I felt the process was pretty painless, even when working with a completely different platform.
Updated:
.htaccess definition for “pretty permalink”:
To create a .htaccess file, open up your preferred text editor and enter in the following:
# BEGIN WordPress
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule . index.php [L]
# END WordPress
IIS7 URL Rewrite module for "pretty permalink"
- Video walk through
- Creating rewrite rules
- Using global and distributed rules
- Using rewrite maps
- Importing Apache mod_rewrite Rules
- Enabling "Pretty Permalinks" in WordPress
- Rule Templates
- Testing rewrite rule and condition patterns
Related posts:

September 22nd, 2009 at 11:55 pm
The built-in MovableType-to-WordPress importer does not import tags. There is a utility I found that does this, however:
http://www.simonecarletti.com/blog/2009/02/mova...
September 23rd, 2009 at 8:06 am
Awesome! Re-tagging was not a big deal for me since I have a small number of posts, but for others I can see how it would be annoying to have to redo.
September 27th, 2009 at 11:50 pm
[...] the original: Migrating blog from GraffitiCMS to WordPress | JefTek.com Comments0 Leave a Reply Click here to cancel [...]
October 12th, 2009 at 2:43 pm
You can do away with some of the rewriting if you want – you can keep the URLs from your posts the same as they were in Graffiti by just changing the permalink format in wordpress. Of course, then it's a little hard to have both running at the same time like you have here, but you could always get it running, then add the step to change the permalinks when you switch over the site default file.
October 12th, 2009 at 2:44 pm
Also, your facebook connect setup doesn't appear to be working. When I tried to log in that way, I got this:
Invalid Argument
The Facebook Connect cross-domain receiver URL (http://jeftek.com/wp-content/plugins/disqus-com...) must be in the same domain or be in a subdomain of an application's base domain (JefTek.com). You can configure the base domain in the application's settings.
October 12th, 2009 at 3:13 pm
Charles,
You are correct in that you could maintain your existing PermaLink structure by specifying the %category%/%postname%/ variable for permalinks. I didn't try this though, but I believe you need to make sure your have your categories structured in the same hierarchy as you did in GCMS to make this work. You might still need to rewrite any existing Default.aspx to index.php in case someone used it in their links to your site though.
I'd be curious if anyone tries this to see how well it works.
For me, I wanted to do away with using categories in the Permalink since over time you could decide to re categorize posts which would affect your Permalinks. You can have the Redirector plugin manage this for you much in the same way GCMS would manage it if you did it. I decided to go with the PostID and PostName to minimize that amount of potential change.
October 12th, 2009 at 3:13 pm
Well that is disappointing!
Thanks for the heads up…I'll try and correct it in the Disqus plugin.
October 12th, 2009 at 3:25 pm
I think I resolved this, but if you would could try again I would appreciate it! thanks!
October 12th, 2009 at 9:09 pm
Nope, still got the same error
October 12th, 2009 at 9:34 pm
Hmmm… Thanks for trying again though. It must be something with
the updated disqus plugin.
Jef
October 13th, 2009 at 1:51 pm
Ok, It is now fixed! Thanks to help from @disqus on Twitter, I had to add a new FaceBook API Key and all is well it looks like. Thanks for discovering this for me.
October 14th, 2009 at 9:37 am
Wanted to do one more test for you, and yep, it's working for me now. Glad you got it fixed.
October 20th, 2009 at 6:13 pm
Hey, thanks for the great article. How did you point the export tool in the direction of your current gcms database?
October 20th, 2009 at 6:40 pm
You can specify the website url in the .config file with the exe
Jef
November 23rd, 2009 at 2:26 pm
Hey Jef,
How did you include the extended post information?
November 23rd, 2009 at 3:17 pm
Mike,
Sorry, I totally forgot to post that earlier.
Open up the project in Visual Studio 2008
Open up the Form1.cs file
View Code
Add the following line after line 90 which exports the BODY values
mtimport.AppendFormat(“EXTENDED BODY:n{0}n”, p.ExtendedBody);
Save, Compile, and Run. Now your export file will have the Body and the Extended Body ready for import
November 23rd, 2009 at 9:26 pm
Hey Jef,
How did you include the extended post information?
November 23rd, 2009 at 10:17 pm
Mike,
Sorry, I totally forgot to post that earlier.
Open up the project in Visual Studio 2008
Open up the Form1.cs file
View Code
Add the following line after line 90 which exports the BODY values
mtimport.AppendFormat(“EXTENDED BODY:n{0}n”, p.ExtendedBody);
Save, Compile, and Run. Now your export file will have the Body and the Extended Body ready for import
December 19th, 2009 at 9:06 am
and here is not a kind of SNS website (Social Networking Services).
so nobody think that's necessary to comment here..
hot deal–
January 1st, 2010 at 11:02 pm
[...] that all the posts we’re migrated over from my previous blog thanks to the great post over at JefTek. If you see any problems with them, please drop me a comment and let me [...]
March 17th, 2010 at 11:46 am
Some prerequisites to migrating to WordPress is that you must install PHP on the server that is going to host your blog
May 5th, 2010 at 4:28 am
[...] http://jeftek.com/520/migrating-blog-from-graffiticms-to-wordpress/ [...]
May 20th, 2010 at 4:57 pm
For those who also wish to migrate away from Graffiti CMS, I found the two links below extremely helpful. Essentially you need to export to
low cost web design
May 21st, 2010 at 2:22 am
Thanks a lot for sharing a very interesting idea. I have used it after informing from here and I have enjoyed it a lot.
June 3rd, 2010 at 8:18 am
[...] from Jon Sagara which allows you to export Graffiti posts to the Movable Type export format, and this article from JefTek.com which also walked through the migration steps. I did not have any trouble importing the MovableType [...]
June 4th, 2010 at 6:17 am
thanks.
June 27th, 2010 at 3:01 am
I very like wordpress, for it's very easy for common people:P
July 30th, 2010 at 10:11 am
@timheuer @John_Papa info on migrating from graffiticms to wordpress: http://bit.ly/16CfYQ