If you’re currently a WordPress user, there’s a 99.9999% chance you’re running on MySQL, even though you may be running PHP on Windows. Luckily, migrating your WordPress site to SQL Server or SQL Azure should only take a few hours. Here are the steps involved:
1. Create a New Installation Running WordPress on SQL Server/SQL Azure
3. Migrate Plugins and Widgets
A Case Study
My first experience doing a migration from MySQL to SQL Server or SQL Azure was for the Remix Russia keynote delivered by Eric Rudder. Now, I’m in the process of migrating my own WordPress blog (which I’ve been running on a shared LAMP hosting account for years) to Windows and SQL Server.
In this article, I’ll take you through the process.
Let’s get this party started.
1. Create a New Installation Running WordPress on SQL Server/SQL Azure
First, we need to get a default instance of WordPress running on SQL Server stood up; then we’ll go through the steps of customization. Check out the Getting Started page and the Installing WordPress on SQL Server article to get the default instance up.
Once you’ve completed this step, your site should look something like this:
I didn’t have to do anything special to get this running on my Discount ASP hosting account. I just created the database, FTP’d the files and ran through the standard WordPress install.
Make sure to update the Settings in the WordPress admin for things like Permalinks, Tagline, etc.
2. Migrate Themes
The first step in migrating themes is to copy the wp-content/themes folder to your new site via FTP.
How difficult it is to migrate your Theme depends on how it’s built. I’m using a theme that stores its settings within the wp_options table, so I needed to migrate the settings by hand.
To do this,we need to go into Appearance and Activate our theme.
In order to migrate the theme settings manually,open up the Theme options on your current site in the left window and the settings on the new SQL Server site in the right window. It’s a piece of cake to run through these and move over the settings.
Your new site should start to take shape.
3. Migrate Plugins and Widgets
Migrating Plugins and Widgets might take a bit of work. WordPress stores the settings for these within the wp_options table, and because we’re migrating our blog over by standing up a new instance, we’ll need to migrate Plugin and Widget settings manually.
NOTE: Plugins and Widgets are an area for potential incompatibility with WordPress on SQL Server. This patch works by intercepting the MySQL statements and converting them to be TSQL compatible with SQL Server/SQL Azure. You can read this article for more architecture details if you’re interested. OmniTI does a great job making sure this works for the core WordPress operations, which should cover the majority of database operations a plugin attempts to execute. There are two scenarios where the database abstraction layer may not work correctly: Either the SQL Server patch just hasn’t been built to handle a certain database statement or the plugin is written incorrectly and accesses the database directly instead of using the WordPress database execution functions. The main point is that once you’ve migrated over your Plugins and Widgets, be sure to do some testing before moving your WordPress on SQL Server site into production.
Plugins
First, make sure you have already copied over the wp-content/plugins folder to your WordPress on SQL Server site.
Open the Plugins section of your WordPress admin for your current site and the new site side-by-side. Then go through and activate the Plugins you want to continue using.
Make sure to configure the Plugins that require additional steps. For example, you’ll need to copy your Akismet API Key, etc.
Widgets
Migrating Widgets uses the same process as Plugins: Just open the WordPress admin side-by-side and migrate necessary settings.
Now your site should be ready for content.
5. Export/Import Content
Migrating your content with WordPress is straightforward, thanks to the Import/Export feature built into WordPress. The first step is to export your content from your current site using the Export feature under the Tools menu in the WordPress admin.
This will generate an XML file containing all of your Pages, Posts, Comments, Custom Fields, Categories and Tags.
Now, all you need to do is switch to your new WordPress on SQL Server site and use the Import feature under the Tools menu. Make sure to select a WordPress Import.
Now just browse to the XML export from the step above and click Upload file and import.
Now WordPress will parse the XML file and ask you for a couple more details. You can decide to either create new users or map to existing users. You’ll probably want to select the Import Attachments option.
Once the import is complete, WordPress will provide a log of the results.
If you selected to Import Attachments above,WordPress will pull images, etc. into Media for your new WordPress site. Alternatively, you could copy over the wp-content/uploads folder.
Now that your Pages and Posts are in your WordPress on SQL Server site, you may need to tweak some UI elements. For example, I needed to add the Pages and Categories to the header navigation.
Your site should now run WordPress on SQL Server!
The only thing left to do is update the DNS settings to point to my new host.
Conclusion
I spent some time researching a “better” way to do a WordPress migration but I believe that when moving to a different database platform, going through the steps in this article is probably a good idea. If you have alternate suggestions, please let me know.
I’m really excited to be running WordPress on SQL Server. Give it a try and let us know if there’s anything we can do to help!

[...] recently wrote an article over at http://wordpress.visitmix.com about my experience migrating my blog over to WordPress on [...]
[...] Migrating a WordPress Site from MySQL to SQL Server/SQL Azure [...]
[...] Migrating a WordPress Site from MySQL to SQL Server/SQL Azure [...]
Just curious, what will be the cost of hosting a blog on Azure, say, for almost no visitors, and for 1,000 usrs/day?
What are the supported version for the export import using WXR?
The import just shows completed but nothing actually imports.
[...] Note: I’m just showing how to migrate a WordPress database as an example. If you actually want to run WordPress on SQL Server, see this post by Zach Owens: WordPress on Microsoft. [...]
[...] Note: I’m just showing how to migrate a WordPress database as an example. If you actually want to run WordPress on SQL Server, see this post by Zach Owens: WordPress on Microsoft. [...]
[...] I had a chance to play with the SQL Server Migration Assistant for MySQL when it was in beta a few months ago. It did a great job then of migrating a simple MySQL database, but the team has added lots of functionality since the first beta release (including support for migrating stored procedures). The download includes a help file with documentation that will give you an understanding of other features the team has added. What I’ll do here is walk you through the “Hello World”-type usage of the assistant. I’ll use SSMA to move a MySQL WordPress database to SQL Server. ‘Note: I’m just showing how to migrate a WordPress database as an example. If you actually want to run WordPress on SQL Server, see this post by Zach Owens: WordPress on Microsoft. [...]
hey guys i found a great get paid survey site where you can make cash quickly. check out goo.gl/hqcR
[...] Migrate a WordPress Site From MySQL to SQL Server/SQL Azure [...]
Damn, pretty great article. Where can I get this subscription?
Sara Swift
camera scramblers
How to deal with plugins? Do all plugins work with your ””WordPress on Microsoft”” solution?
Has anyone tried this with SQL Express?
It is very interesting for me to read the article. Thanks for it. I like such topics and everything that is connected to this matter. I definitely want to read a bit more soon.
Katherine Karver
escort woman
[...] I chose to implement this utilizing the Windows Azure VM role. With an on-premises Hyper-V server, I created a virtual image of Windows Server 2008 R2 with IIS and installed WordPress. The install wizard automatically implemented database schema, making the database portion of setup very easy. During the setup wizards, all I had to do was provide the location and credentials for my SQL Azure database running in the cloud. Walkthroughs of how to accomplish that are here. [...]
[...] I chose to implement this utilizing the Windows Azure VM role. With an on-premises Hyper-V server, I created a virtual image of Windows Server 2008 R2 with IIS and installed WordPress. The install wizard automatically implemented database schema, making the database portion of setup very easy. During the setup wizards, all I had to do was provide the location and credentials for my SQL Azure database running in the cloud. Walkthroughs of how to accomplish that are here. [...]
[...] out how to Migrate to Windows and SQL Server by Zach Owens who is moving his blog to Windows and SQL [...]
[...] out how to Migrate to Windows and SQL Server by Zach Owens who is moving his blog to Windows and SQL [...]
[...] Azure and SQL Server Azure. Zach Owens is an evangelist for Microsoft who is supporting this and blogs all about it. It sounds interesting but I get the sense that this is just some sort of Microsoft pet project and [...]
Any idea why the patch and the distribution files have been pulled? All the links and readme,.txts are there, but download files missing.
Microsoft”s .MSI installer is still availablbe, but that will not run on my Windows Server 2008 host.
Good article and I hope there”s some hope for making this available as I was about to install WordPress and really would prefer to use the SQLServer thats already running.
Excellent post. I was checking constantly this blog and
I care for such information much. I was looking for this certain information for a very long time. Thank you and best of luck.
I”m impressed! Very useful information specially the last part
[...] I chose to implement this utilizing the Windows Azure VM role. With an on-premises Hyper-V server, I created a virtual image of Windows Server 2008 R2 with IIS and installed WordPress. The install wizard automatically implemented database schema, making the database portion of setup very easy. During the setup wizards, all I had to do was provide the location and credentials for my SQL Azure database running in the cloud. Walkthroughs of how to accomplish that are here. [...]
Hi there! This article could not be written any better! Looking at this post reminds me of my previous roommate! He always kept preaching about this. I most certainly will forward this information to him. Fairly certain he will have a great read. Many thanks for sharing!