Writings

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.

image

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

image

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

image

image

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

image

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.

image

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

image

image

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.

image

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

image

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

image

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

image

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.

image

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

image

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.

image

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

image

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

image

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

image

image

image

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”.

image

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"?>
<configuration>
    <system.webServer>
        <httpErrors errorMode="Detailed"/>
    </system.webServer>
</configuration>

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.

image

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. 

image

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

image

5. Install WordPress on SQL Server

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

image

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

image

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.

image

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).

image

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.

image

Now WordPress should be up and running on SQL Server!

image

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"?>
<configuration>
    <system.webServer>
        <rewrite>
            <rules>
                <rule name="wordpress" patternSyntax="Wildcard">
                    <match url="*"/>
                    <conditions>
                        <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true"/>
                        <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true"/>
                    </conditions>
                    <action type="Rewrite" url="index.php"/>
                </rule>
            </rules>
        </rewrite>
    </system.webServer>
</configuration>

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,180 Comments - Join the conversation

  1. Showbox app says:

    This will enable the user decide to buy either a smart phone or
    a tablet. Other features include Video camera, GPS, touchscreens, accelerometer, and
    magnetometer etc. From finding fantastic workout plans to
    discovering ways to cut calories, you really can become fit with the help of
    your phone.

  2. Wonderful, what a webpage it is! This web site provides useful facts to us, keep it up.

  3. TRistarlaw says:

    Once you have problems switching gears while driving.
    The Benefits of a RebuildAs criminal defense attorney your car ages, sometimes it’s necessary
    to help it along by having a messy work area. Most vehicle manufacturers recommend criminal
    defense attorney the type of transmission in it.

    The key factors which cause transmission problems in internal areas
    that they have among their customers and the industrial experience they have.

  4. Hey there! I could have sworn I’ve been to this site before but after browsing through some of the post I
    realized it’s new to me. Nonetheless, I’m definitely
    delighted I found it and I’ll be bookmarking and checking back often!

  5. Write more, thats all I have to say. Literally, it seems as though you relied on the video
    to make your point. You definitely know what youre talking about, why waste
    your intelligence on just posting videos to your site when you could be giving us something enlightening to read?

  6. Co sa deje , pre celý cas Kedysi som skontrolovat ttu blog príspevky coskoro v ranné svitanie , pretože,
    pretože ako i lovbe až naucit viac a viac.

  7. Amazing things here. I’m very glad to see your article.
    Thank you a lot and I’m looking forward to touch you.
    Will you kindly drop me a e-mail?

  8. Asking questions are genuinely good thing if you are not understanding anything fully, except this post provides nice understanding yet.

    Feel free to visit my blog post – free brave frontier cheat

  9. Nice post. I was checking continuously this blog and I’m impressed!
    Extremely useful info specially the last part :) I care for such information much.
    I was looking for this certain info for a long time.
    Thank you and best of luck.

  10. I’ve been exploring for a bit for any high quality articles or
    weblog posts in this kind of area . Exploring in Yahoo I finally stumbled upoon this site.
    Reading this info So i’m glad to express that I have a very excellent uncanhny feeling I found out exactly what
    I needed. I such a lot for sure woll make certain to don?t forget
    this web site and provides it a look regularly.

  11. Nuvoderm says:

    Thank you for sharing your thoughts. I truly appreciate your efforts and I will be waiting
    for your further write ups thanks once again.

  12. Write more, thats all I have to say. Literally, it seems as though you
    relied on the video to make your point. You definitely know what youre talking about,
    why waste your intelligence on just posting videos to your blog when you could be
    giving us something enlightening to read?

  13. I’ve learn several just right stuff here.
    Definitely value bookmarking for revisiting. I surprise how much
    effort you place to create one of these magnificent informative website.

  14. Hi! Do you know if they make any plugins to protect against hackers?

    I’m kinda paranoid about losing everything I’ve worked hard
    on. Any recommendations?

  15. En 1911 , le club de rugby ASM Clermont Auvergne est créé par Marcel
    Michelin, le fils d’André, d’abord sous le nom
    de l’AS Michelin, puis de l’AS Monferrandaise,
    avant de prendre son nom actuel.

    Also visit my web site – Vente En Ligne De Pneus Et Chenilles Renforcées

  16. Mildew inspectors use each their expertise and sophisticated equipment to find any
    and all hidden mold, with minimal disturbance to your house.

    Toxic black mould needs loads of water to grow so especially verify spots where there might have been water leaks.

  17. Actually no matter if someone doesn’t understand afterward its up to other people
    that they will help, so here it takes place.

  18. My brother recommended I might like this website. He was totally right.

    This post actually made my day. You can not imagine simply how much time I had spent for
    this information! Thanks!

    Here is my site :: can dentures be permanent Elk Grove

  19. Do you have a spam problem on this website;
    I also am a blogger, and I was wondering your situation; we have
    developed some nice practices and we are looking to exchange techniques with others, please shoot
    me an email if interested.

  20. ballet terms says:

    Excellent post. I was checking constantly this weblog and I am
    inspired! Very useful info specially the final phase :) I maintain such information a lot.
    I was seeking this certain info for a very lengthy time.
    Thanks and best of luck.

  21. Undeniably believe that which you said. Your favorite reason appeared to be on the net the
    easiest thing to be aware of. I say to you, I certainly get annoyed while people consider worries that they
    just do not know about. You managed to hit the nail upon the top
    and defined out the whole thing without having side effect , people can take a signal.
    Will probably be back to get more. Thanks

    My web-site … amazing lean garcinia reviews

  22. Will the doctor performing blind dissection be able to adequately account for this
    variability in the average patient and will
    he risk operating on an unwary patient in whom these differences might be profound.
    Purchase shampoo or other hair care products that are meant specifically for people with thinning
    hair. Such devices as KTP, ERBIUM, Pulse DYE and Alexandrite have short length of laser light waves, and they are very effective for removing unwanted hair on a light colored skin.

    Here is my web site; laser hair restoration does it work

  23. Right here is the perfect website for everyone who would like to understand this topic.

    You know a whole lot its almost tough to argue with you (not that I
    personally would want to…HaHa). You certainly put
    a fresh spin on a topic that has been written about
    for many years. Wonderful stuff, just excellent!

  24. Tax law about businesses in the USA is ever changing.
    A lot of people have small business ideas that they often fail to put
    into practice either because they lack the money
    to make an investment or because the fear to lose everything.
    Typically, this works well if we are involved in a solid
    networking and we reciprocate, by referring clients to
    those other businesses.

  25. Thanks for sharing your thoughts on link building. Regards

  26. fat arms says:

    Thanks a bunch for sharing this with all of us you really recognise what you are talking about!
    Bookmarked. Kindly also seek advice from my
    website =). We will have a link exchange arrangement between us

  27. here says:

    WOW just what I was looking for. Came here by searching for financial services

  28. Hi there very cool site!! Man .. Excellent .. Amazing ..

    I will bookmark your website and take the feeds additionally?
    I am glad to seek out numerous helpful info right here in the put up, we want work out extra strategies on this regard, thanks for sharing.

    . . . . .

    My homepage – clash of lords 2 cheats ipad

  29. What’s up Dear, are you genuinely visiting this site on a regular basis,
    if so afterward you will definitely obtain good knowledge.

  30. That is really fascinating, You are an overly skilled blogger.
    I have joined your feed and stay up for looking for extra
    of your fantastic post. Additionally, I’ve shared your site in my social networks

Add a Comment