Installing WordPress on SQL Server

Before you read this article, please note: the easiest way to install WordPress on SQL Server or SQL Azure is to use the Getting Started page. If you’re still having trouble or want more details, read on!

These instructions assume you’re installing WordPress on Windows 7 or Windows Server 2008 or 2008 R2. If you’re installing WordPress in a Windows share hosting environment, many of these same concepts apply.

Here’s a summary of the steps:

  1. Install the Prerequisites
  2. Configure a Database
  3. Download the WordPress on SQL Server Distribution
  4. Configure IIS
  5. Install WordPress
  6. Remove IIS Detailed Errors and Configure URL Rewrite

1. Install the Prerequisites

Use the Microsoft Web Platform Installer. Be sure you have:

  • II7 or above (Windows Vista, Windows 7, Windows Server 2008, Windows Server 2008 R2)
  • PHP 5.2 or above
  • SQL Server Express 2008 w/Tools or above
  • PHP Driver for SQL Server v1.1 or above
  • URL Rewrite 2.0 or above

Get Products with Web Platform Installer

Click here to install all these products with the Web Platform Installer.image

Click on the Get the Microsoft Web Platform button and accept the prompts to install WPI.


Click on the bar at the top of the browser to install the add-on.


Follow the onscreen prompts and grant permission for the site to open WPI.



Once the Web Platform Installer downloads and installs all the prerequisites, it will prompt you to configure your SQL Server Express install.


Choosing Mixed Mode Authentication and providing an (sa) password will make your web development easiest.

The Web Platform Installer will now download all the bits and prerequisites.


Once the download is complete, it will automatically install and configure the software.



Now you’re ready to run web applications on the Microsoft Web Platform.

2. Configure a Database

In this step, you’ll create a database and a database user for your WordPress install.

Start by running SQL Server Management Studio from your start menu.


You’ll be prompted to log on to SQL Server.


Connect to your database using Windows Authentication and .SQLExpress for the Server name.


Create a new database Login by expanding the Security. Right click on Logins to select New Login.


Supply a Login name; select SQL Server authentication; provide a Password and uncheck User must change password at next login. You can leave the rest of the defaults.

Now you need to create a database.


Create a new Database by right clicking on Databases to select New Database.


Enter a Database name and specify the Login name of the user you created above.

Now you’re ready to proceed with the WordPress install.

3. Download the WordPress on SQL Server Distribution

Go to the Download page and select the standard or Multi-User Distribution from the box on the right side of the page.


This will take you to the SourceForge download page for the current version.


If you try to save the ZIP file directly to your IIS directory, you’ll probably get a permissions error like below.


Save the ZIP somewhere else on your machine, extract the files and copy them into the C:inetpubwwwrootwp-sqlsrv folder.




4. Configure IIS

The most common issue I’ve discovered involves WordPress’ use of HTTP errors.

Enable IIS Detailed Error Messages

When trying to install WordPress for the first time,you might get an IIS 500—an internal server error that says,“There is a problem with the resource you are looking for, and it cannot be displayed”.


WordPress is designed to throw an HTTP 500 error if a wp-config.php file is not detected. The problem is that the default install of IIS 7 is overriding HTTP errors for external users as to now show detailed information about the server.

You can temporarily override this behavior during the installation process by telling IIS to show Detailed errors. Do this by creating a web.config file in the root of your WordPress install with the following content:

<?xml version="1.0" encoding="UTF-8"?>
        <httpErrors errorMode="Detailed"/>

Grant IIS Write Permissions to WordPress Folder

Next, you need to ensure your IIS has write permissions to your WordPress installation folder. 

NOTE: If IIS does not have write permissions to your WordPress folder you will get caught in a loop where you enter your database credentials then get taken back to the initial installation screen. 

By default IIS runs as IUSR so you must add this user with Write permission through Windows Explorer.  Browse to the installation folder, right click on the wp-sqlsrv folder and select the Security tab.


Click the Edit button, select Add, then type IUSR for Enter the object names to select.  Click on Check Names and IUSR should now be underlined. 


When you click OK the top window will close.  Make sure to give this user Write permissions by selecting the checkbox.


5. Install WordPress on SQL Server

Browse to the root of your WordPress install, which in my case is http://localhost/wp-sqlsrv/.


Follow the prompts until you’re asked for database information.


Specify the Database Name, User Name and Password you created while configuring the database. For the default SQL Server Express install, you will enter .SQLExpress for the Database Host.

Select the sqlsrv driver for Database Type. This will use the PHP Driver for SQL Server, which was developed and maintained by the SQL Server team.

You should see the screen below, with an option to Run the install.


If you don’t see this screen and are taken back to the first screen of the install, that means your web server doesn’t have permission to write to the directory (See step 4).


You can get information on IIS security here.

If the install is moving forward, you’ll just need to enter your blog information and receive the admin password.


Now WordPress should be up and running on SQL Server!


The last step is to update your web.config to remove the IIS Detailed errors and enable URL Rewrite.

6. Remove IIS Detailed Errors and Configure URL Rewrite

Remove detailed IIS error messages and add URL Rewrite rules by replacing the contents of your web.config with the following contents:

<?xml version="1.0" encoding="UTF-8"?>
                <rule name="wordpress" patternSyntax="Wildcard">
                    <match url="*"/>
                        <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true"/>
                        <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true"/>
                    <action type="Rewrite" url="index.php"/>

Now enjoy using WordPress on SQL Server!

For Support

If you’re still having issues, please using the WordPress on SQL Server forums on SourceForge.

Comments 1,826 Comments - Join the conversation

  1. Laurence says:

    I just like the helpful information you supply on your articles.
    I’ll bookmark your weblog and check once more
    here frequently. I’m somewhat sure I will learn plenty of new stuff proper right
    here! Good luck for the next!

  2. Kristofer says:

    Estoy convencido de que este post es uno de los
    mejores blogs

  3. Greetings Facebook performs fine but your website is running slowly which had taken close to
    a minute to finally load up, I am not sure whether or
    not it’s my personal issue or maybe website problems. Well, Thank you for placing such a fantastic article.
    I do believe this has already been extremely helpful to user
    who actually visit here. This one is wonderful everything
    that you actually have implemented in this article and would like to see even more
    posts by you. To get more understanding from articles that you post, I actually have book-marked this
    web page.

  4. bookm?rked!!, I like yo?r blog!

    Here is m? blog post :: http://innotec-Spain.com

  5. biocitrin says:

    Un alt inggredient este cromul care stocheaza carebohidrati
    si lipide in organism, si indeplineste un roll important in reglarea glicemiei.
    Aceste doua ingrediente puse impreuna ajuta la mentinerea greutatii in parametrii optimi, si contribuie eficient la
    eliminarea grasimilor si nu permite depozitarea acestora.
    Forfemina mai contine acid folc care aare un rol important in asimilarea substantelor nutritive din alimentatie si formeaza noi celule iin organism.
    Modul de adminisrare aal acestor comprimate este cate unul pe zi.
    Compozitia Forfemina se bazeaza pe:Acid folic
    200 mcg, crom 20 mcg, extract de Guarana 100 mg, Pulbere din suc de Anghinare 100 mg, Extract
    dee Urzica 50 mg, Extract de Ceai Verde 50 mg.

  6. Thanks designed for sharing such a pleasant thinking,
    article is pleasant, thats why i have read it fully

  7. camera gopro says:

    -60 frames per second choice in 720p and WVGA
    resolutions offers liquid smooth slow motion playback.
    In the order given, they go from the least expensive to the most, but have more features
    and benefits, the Good, Better and Best. It often pays to splash out a little more for an action camera that you know
    will deliver the results you require. Let us introduce the Rembrandt series from
    Visconti pens.

  8. Tresc bliska kazdemu, zalecam lekture test obciazenia glukoza cena kraków, ski test swim test kraków (testobciazen.evenweb.com) obciazenia glukoza kraków, test obciazenia glukoza norma

  9. ?ello, its pleasant article on the topic of me?ia
    print, we ?ll be familiar with media is a wonderful source of facts.

    Also viosit my homepage – optimal stack supplement contact facebook

  10. T?is snapchat password hack l?test model
    tool has a script which can provide ?o? hidden passwords and profile of
    ?ny of ?our prey.

  11. Alex says:

    site que j’ai propose9 (office.co.uk) c’est un site aignals et pas ame9ricain donc les pointures sont pas les meames. De plus, ta pointure ame9ricaine c’est pas du 28.5. Si tu fais du 39 ta pointure ame9ricaine (US) en Nike c’est du 8 et ta pointure aignalse (UK) c’est du 5.5. Par contre sur le site aignals office.co.uk tu trouveras pas de 5.5 (39) car ils ne font pas les demi-pointures. Je fais aussi du 39 et dans ces cas-le0 j’ai pris du 5 (38.5) et e7a me va impect avec des chaussettes fines.Il reste du 5 sur le site aignals office.co.uk en camel et si jamais tu fais un bon 39 ou plus tu peux prendre du 6 (UK) qui correspond e0 un 40 mais je ne peux pas te dire si e7a ira. ;-)

  12. Hurrah! At last I got a blog from where I can really get useful
    information regarding my study and knowledge.

  13. My partner and I absolutely love your blog and find almost all of your post’s to be exactly
    I’m looking for. Do you offer guest writers to
    write content for you personally? I wouldn’t mind producding a post or elaborating on most
    of the subjects you write in relation to here. Again, awesome blog!

    Stop bby my web site … ripped rx no2 blast and t-90 Xplode

  14. Excellent website. Plenty of useful info here. I am sending it to a few friends ans additionally sharing in delicious.

    And certainly, thank you on your sweat!

  15. It’s amazing for me to have a web site, which is valuable in support of
    my knowledge. thanks admin

  16. Thank you for sharing your info. I really appreciate your efforts and I am waiting for your
    further post thanks once again.

  17. )Do you seriously want to take your Visalus home business to a new level.
    What does this growing trend represent to the average person, and
    how does it relate to the current state of the economy. Media Highlights:
    Blair on “The Big Idea – The American Dream”
    with Ivanka Trump:.

  18. In a dream vacation to Portland where one plans big road trips to amazing destinations like beaches, Columbia River George, the vineyards and desert;
    and the Portland art museum. Sometimes, original manufacturers also get used tow truck
    for sale or rental basis and so you can buy or rent out a towing business from them.

    Not only were they not going to give us our car back they were beyond rude, they actually
    started mocking my wife on the phone.

  19. My brother suggested I would possibly like this web site.
    He used to be totally right. This post truly made my day.
    You cann’t consider just how so much time I had spent for this information!

  20. What’s up to every body, it’s my first visit of this weblog; this weblog includes remarkable and actually fine information designed for

  21. Thanks for some other wonderful article. Where else maay anyone geet that
    kind of inflrmation in such aan ideal way of writing?
    I’ve a presentation next week, and I am on the search for sucfh info.

  22. After looking at a handful off the blog articles on your site, I
    really appreciate your technique of writing a blog. I book-marked
    it to my bookmark sige list annd will be checking back soon. Take a look at my website as well and let me know how you feel.

  23. Everything is very open with a very clear description of the issues.
    It was definitely informative. Your website is useful. Thanks for sharing!

  24. Dyan says:

    Very quickly thuis site will be famous amid all blogging visitors,
    due to it’s good posts

  25. Patrick says:

    You are so interesting! I don’t believe I have read through something like
    that before. So wonderful to find somebody with a few unique thoughts on this subject matter.
    Seriously.. many thanks for starting this up.
    This web site is something that is needed on the internet,
    someone with some originality!

Add a Comment