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

  1. great submit, very informative. I ponder why the opposite specialists of this sector do not
    understand this. You should continue your
    writing. I’m confident, you’ve a huge readers’ base already!

  2. Foreign lotteries do not need to contact you for your banking
    information or to buy a program that will guarantee you winning
    the foreign lottery. You can also import wheels with hundreds of different wheels
    to choose from that can generate up to 34 numbers.
    The typical lottery scam begins with an unsolicited email saying
    the victim has won the National Lottery, El Gordo lottery or similar lotteries.

  3. brings about says:

    I know this web page offers quality dependent articles or reviews
    and other data, is there any other site which presents such data in quality?

  4. I think the admin of this web site iis in fact working hard in support of his web page, because hhere every information is
    quality bsed stuff.

  5. Shantae says:

    Strawberries, blueberries, mangoes – really any fruit works jointly with it.

    Most likely, out-of-whack hormones—like estrogen, insulin, and even growth hormones from chemicals and additives in the
    foods you eat every day. Rocco also exercises regularly by walking, spinning, and cycling.

  6. Suzette says:

    Not only does it get costly when you pay for the cards individually,
    the postage adds up too. A wedding blog can be a great way to
    let people know how the planning is coming,
    where the events will be, and where you have registered.
    Depending on when the birthday party is taking place, you can do
    simple variations on summer or winter events such as gymnastics and relay races and set up your party space for indoor or outdoor play.

  7. hsv forum nz says:

    It takes place that those who find themselves suffering with frosty sores and herpes sense introverted to go over with
    medical care professional.

  8. If som? oone needs to be updated with latest technologies therefor? he must be payy a qui?k visit t?iis web site and ?e up to
    date evety day.

    Here ?s my weblog: webcam windows 7

  9. WOW just what I was searching for. Came here by searching for dui
    attorney Michigan

    my web blog lawyer Detroit Mi

  10. Charmain says:

    It begins with an added 60 points of attack harm and 15 percent
    life steal.

    Also visit my site :: champions league of legends gratuits
    (Charmain)

  11. The Japanese Terminology – A dicsussion concerning the characteristics of Japanese.
    Western Guide – online manual to Japanese
    grammar.

    my webpage dàm tho?i ti?ng nh?t

  12. sbobet says:

    Appreciation to my father who informed me regarding this webpage,
    this weblog is in fact awesome.

  13. The Sony Play – Station 3 is the third in the
    Play – Station series and is expecting great success upon its release on November 2006 in Japan, United
    States, and in Canada. Use the joystick in order to search all
    of the way lower before you start to see the “Redeem code” alternative.
    Nintendo revolutionized the industry with the very first concept of motion gaming, preceding Sony’s Playstation Move,
    and Microsoft’s Xbox Kinect.

    my web-site générateur de code xbox live gold

  14. Pretty section of content. I just stumbled upon your website and in accession capital to
    assert that I get in fact enjoyed account your blog posts.

    Anyway I will be subscribing to your augment and even I achievement you access consistently fast.

  15. If best divorce lawyer in atlanta there is no will then the property.

    Most of these criteria are being set to change the lifestyles of many best divorce lawyer in atlanta things.
    That is much more sympathetic toward the defense team but
    also legal support services from an insurance company
    out there, the Senate, 34-4.

  16. raze-123.com says:

    Plus, selling off old decorations and buying new ones is a good way to rack up some easy experience points without having to wait for
    the next harvesting and planting cycle. Many of the websites even feature paid games online that you will get totally
    sucked into, but I much prefer the free games due to the simple fact that they are much more convenient and easier to
    play. Multiplayer games are always known for
    their radical awesomeness, just look at mainstream FPS games today.

  17. casino Games says:

    Aw, this was an extremely nice post. Finding the time and actual effort
    to make a very good article… but what can I say… I procrastinate a
    whole lot and never manage to get anything done.

  18. Arturo says:

    Lots of websites have popped up on the internet that even arrange these birthday parties, or wedding decorations, and other events on your
    behalf. Online shopping cart also protects intellectual property of the owner
    with the reliable customer. The ultimate reason being the transport
    or shipping factor, why would a person want to
    wait for two or three days while one can buy the same thing from
    a store or showroom nearby.

  19. The pleasure will be too much to bear and he will have one of the best orgasms of his entire life.

    You want to learn the ultimate sex tips to transform you into a super sexy alpha female in the
    bedroom. You can make a man attracted to you faster by
    working on your looks at the same time.

  20. tablet pc says:

    Thanks ffor sharing your thoughts on amazon deals. Regards

  21. Fantastic items from you, man. I’ve consider your stuff previous to and you’re simply extremely great.
    I actually like what you’ve bought right here, certainly like what you’re saying and the way by which you are saying it.
    You’re making it enjoyable and you continue to take care of to keep it wise.

    I cant wait to read much more from you. This is actually a terrific web site.

  22. Figure A (above) is a photograph of Andrew D. Basiago as a
    Venture Pegasus time travel participant taken on the site of U.S.
    President Abraham Lincoln’s Gettysburg Deal with on November 19, 1863, to
    which Mr. Basiago had been teleported again in time by DARPA.
    many years prematurely as a result of knowledge about it was gathered by way
    of DARPA’s secret time travel program unlocks a number of of the
    more enigmatic facts within the The mahogany leatherette travel bar case is totally
    insulated with velveteen interior. That is
    the picnic travel bar set to get if you love an antique look – you
    won’t be disillusioned. This very cool leather-based travel bar set is a celebration just ready to occur.

  23. Too many married couples steer away from oral sex for various reasons but oral sex is amazing.
    Whenever I give couples the ‘How to: Orgasms’
    guide it seems that people often have a view that
    wearing costumes is about schoolgirl outfits and nurses.

    If you really want to see a girl get turned on to the point where
    she always wants to have hot and steamy sex, then I suggest
    you to keep reading.

  24. ruletista says:

    To become sharp in your ardcounting skills, you must
    practice. Article Source: Variety of High Quality Medicines at Online Medicines.
    As with any software, they are only as good as tthe intelligence programmed into them.
    When the dealer shows an ace he will slowly move his hand
    from left to right over the insurance lne on the table and ask if anyone wants insurance.
    How aree they able to make so much money when you are not.
    Today most of the leading and well-known furniture stores have websites oof their own.

    Feel free tto surf to my weblog; ruletista

  25. Dobre, dobre, dobre zalecam kazdemu! Centrum Dermatologii Estetycznej Kosmetyczka Gliwice

  26. Thank you for any other informative website. Where else may just
    I am getting that type of information written in such an ideal manner?

    I have a project that I’m just now running on, and I have been at the
    glance out for such info.

  27. Thank you for the good writeup. It in reality used to be a leisure account it.
    Look advanced to far added agreeable from you! However, how can we be in contact?

  28. Alina says:

    You ccan purchase invitation kits for a smalll cost, much
    cheaper than ordering invitations, and they lett
    you personalize everything on your cards from the
    color to the font and wording. Setting a LDS
    Wedding Budget is an important step for the LDS bride and groom.
    You must havve very good people skills in order to maintai cohesiveness and assistancde from all the individuals
    that take part in thee wedding planning process.

  29. Excellent blog you have here but I was wanting to know if you knew of
    any discussion boards that cover the same topics discussed here?
    I’d really like to be a part of online community where I can get feedback from other experienced individuals that share the same interest.
    If you have any suggestions, please let me know. Thank you!

    My weblog erotic massage

Add a Comment