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

  1. Right here is the perfect blog for anybody who hopes to understand this topic.

    You understand a whole lot its almost hard to argue with you (not that I
    really would want to…HaHa). You definitely put a fresh spin on a subject which
    has been written about for years. Wonderful stuff, just great!

    Feel free to surf to my web page; Forskolin Thin Review

  2. I was wondering if you ever thought of changing the page layout of your
    blog? Its very well written; I love what youve got to
    say. But maybe you could a little more in the way of content so people could
    connect with it better. Youve got an awful lot of text for only having 1 or
    two images. Maybe you could space it out better?

  3. This iss very interesting, You aare a very skilled blogger.
    I have joned your feed and look forward to seeking more oof your excellent post.
    Also, I have shared your site in my social networks!

  4. The Advantages of Softwood Casement House windows

    There are many different Casement Window Installation cincinnati Ohio possibilities,
    whether you’re at the same time of making a fresh home otherwise you need windows for your existing home.

    Not only are there variations, such as casement windows, double hung and sash, but you can also get lots of materials from hard or soft wood
    to PVC, aluminium and more.

  5. The Advantages of Softwood Casement Windows

    There are numerous different Window Installatio
    solutions, whether you’re along the way of making
    a brand new home or perhaps you need windows for your existing
    home. Not only are there different styles, for example
    casement windows, double hung and sash, but there are also
    a wide choice of materials from hard or soft wood to PVC,
    aluminium and much more.

  6. For instance, from those articles you’ll never know that an average printer woking continuously for an hour exhausts about
    10 time less benzene than one smoked cigarette. The
    particular brother printer toner tubes are broadly used due to iits
    huge possibility forr cost savings while creating excellent copies of files.
    The Lexmark Optra E321 printer has typical paper capacity for
    a small laser printer designed primarily for home or small office use.

    my bog :: print cartridge for hp laserjet 1320n

  7. Cannabis use has become engrained in human culture for over 10 millennia now; although its use being a
    drug (both medicinal and recreational) are only able to be traced back to around the year 2700 BC.
    Buy marijuana seeds for that sale of the bank of seeds of good reputation. At the same time frame, I was receiving recognition in New Hampshire and around New England.

  8. It’s a pity you don’t have a donate button! I’d
    most certainly donate to this brilliant blog! I suppose for now i’ll settle for bookmarking and adding your RSS feed to
    my Google account. I look forward to brand new updates and will share this website with my Facebook group.
    Chat soon!

  9. snabblån says:

    excellent put up, very informative. I’m wondering why the
    opposite specialists of this sector don’t realize this. You must continue your writing.

    I am confident, you’ve a huge readers’ base already!

    Review my website – snabblån

  10. Amazing blog! Is your theme custom made or did you download it from
    somewhere? A design like yous with a few simple adjustements would really make mmy blog
    shine. Please let me know where you got your theme.

    Thanks

  11. sunrise seo says:

    What is tthe main advantage of your pdoduct or service and why should
    somebody buy it instead of one from somebody else.
    Becoking an authority within your niche is crucial.

    We will gain generate your business neew sales leads, gain you
    new clients and provide additional services and features forr your
    existing customers.

    Take a look at my blog – sunrise seo

  12. here says:

    Attractive part of content. I just stumbled upon your website and
    in accession capital to claim that I acquire in fact loved
    account your blog posts. Anyway I’ll be subscribing in your augment or even I fulfillment you get admission to constantly quickly.

  13. I do not even know how I ended up here, but I thought this post was great.
    I don’t know who you are but certainly you’re going to a famous blogger if
    you are not already ;) Cheers!

  14. Do you have a spam problem on this site; I also am a blogger, and I was wondering your
    situation; we have created some nice procedures and we are looking to swap methods with others, why not shoot me an email if interested.

  15. Retha says:

    After the success that we’ve got Israel. This being the highest and narrowest of springfield illinois famous footwear heels.
    And for Franco, we’re already sold out. That’s
    $10 springfield illinois famous footwear under the midfoot and forefoot and toe.
    Unfortunately, toddlers don’t really feel comfortable when jogging/running and the trick.

    Here is my web-site :: mosser shoes springfield – Retha -

  16. Good post! We are linking to this great post on our website.

    Keep up the great writing.

    Here is my page – wachstumshormone kaufen

  17. This is my first time go to see at here and i am actually happy to read everthing at one place.

    Stop by my web-site … cordless drills glasgow; http://www.hardwaremeca.com,

  18. Hi there! Do you use Twitter? I’d like to follow you if
    that would be okay. I’m undoubtedly enjoying your blog and look forward to new updates.

  19. more says:

    May I simply say what a comfort to discover a person that actually knows what they are
    talking about over the internet. You definitely understand
    how to bring a problem to light and make it important.
    More and more people must read this and understand this side of your story.
    I was surprised that you aren’t more popular since you certainly have the gift.

  20. football says:

    In the end, you will have assigned 136 confidence points (16+15+14+.
    With the help of online resources you can easily find several online gaming sites.
    So besides the fact that both sports are being played with 11 players on the field, the similarity ends here.

  21. The convenience of these machines is hard to match.
    Microplane Grater: Originally used for smoothing wood, who knew
    how great they would contribute in la cucina. This can be a nifty little device that squeezes whole potatoes
    into perfectly cut fries which are instantly ready for frying.

    Look into my website; spark notes the odyssey

  22. Hi thewre mates, itts fantasyic piece of writing aabout teachingand full defined, keep it up all the time.

  23. Hey very nice site!! Man .. Excellent .. Superb .. I will bookmark your
    blog and take the feeds also? I am satisfied to find a lot of helpful information here in the post, we need work out extra strategies in this regard, thanks for sharing.

    . . . . .

    My blog abned seo service

Add a Comment