How to setup a wordpress stage website locally with IIS

Wordpress Localhost Setup

Having a local instance of your wordpress blog at your computer has great benefits. You can try out new themes, plug-ins, style changes and you can also customize the backend .php files for your needs before making any changes to your actual blog.

When you have this test/stage blog setup locally (at your computer) you don’t need to worry about search engines indexing as well. If you have a windows computer you can manage this very easily with the windows IIS service.



Step 1 – IIS setup

First ensure you have IIS installed as a service at your computer. You can add the IIS service from Control Panel > Programs and Features > Add/Remove Windows Components

Once the IIS service is installed, when you type http://localhost on your browser (try it on IE first) it should bring up IIS startup page.

For any reason if you are having trouble in getting your IIS started after installation then try this post to troubleshoot – How to troubleshoot IIS localhost startup issues


Step 2 – Web Platform Installer

Once you have your IIS ready, open up the IIS manager application (from start menu search for IIS).

Switch to the ‘features view’ from the option available at the bottom


Local WordPress - Features View on IIS

WebPlatform Installer on IIS manager


Look for the application named ‘Web Platform Installer’ under Management. This is a great tool to install everything you need for your local IIS server.

If you don’t see this application listed then you can download and install from – http://www.microsoft.com/web/downloads/platform.aspx


Step 3 – Install MySQL application

WordPress works with MySQL database. Search and install the MySQL application on the web platform installer (it will be displayed as MySQL Windows usually)

When you install MySQL it will prompt you to enter a master (root) password for accessing MySQL application. Set one and store it somewhere, you would need this password for the later steps.


MySQL listed on Webplatform Installer of IIS

MySQL listed on Webplatform Installer of IIS


Step 4 – Install WordPress

Next search and install the wordpress. If you don’t have PHP installed it will be automatically detected and installed as a prerequisite along with wordpress.


Wordpress listed on Webplatform Installer of IIS

WordPress listed on Webplatform Installer of IIS


During the installation you would be asked to enter the root password for the MySQL application you have set previously.

You will be also taken through configuration wizard where you would be required to specify basic details such as installation directory.

Here name your database similar to your live site. This will be useful to import the database from the live site (explained later in this post)


Step 5 – WordPress Configuration

Post the installation; visit the local site through your URL you have configured for example, http://localhost/myblog

Here you will be required configure the first time details such as database username and password, site title (like the very first time you have configured your wordpress blog).


Step 6 – Sync your data with your parent site

Now that you have a working instance of wordpress blog ready, you will have to import all your information from your parent site.

If you are using an FTP to manage your parent blog you can simply copy the themes and plugins directory into your local directory. Alternatively you can manually search and install theme and plugins like you manage your live site.

To import all your post contents you would have couple of options.

From the wordpress admin interface visit Tools > Import and you will notice a page with many import options.


Wordpress Posts Import Option

WordPress Posts Import Option


You can install the wordpress importer tool from here. Once the tool is installed you will be prompted with the FTP information to connect to your blog to import the information to your local blog.

But I have noticed this FTP option is not working properly in some cases. I have found one reliable alternative for this.

From your live site’s hosting control panel you can launch the PHPmyAdmin control panel.

From the PHPmyAdmin control panel interface choose the wp_posts table and Export it as an SQL file.

You can download and install the PHPmyAdmin locally at your machine (I have noticed this application not listed in web platform installer).

If you are unsure about how to configure PHPmyAdmin application locally on your IIS, this post will help you.

Once the PHPmyAdmin is up and running, you can visit its control panel and import the SQL data table exported from your live site (be sure to import into the wp_posts table again). This will sync all your post contents into your local site.

If you are facing the PHP import file size limitation then check this post to increase your import limit – How to increase PHP file size import limit for PHPMyAdmin

If you want to import all your post comments, then you can follow same steps like posts to sync them.

Now that all your sites data synched up, you would be required to do some finishing tasks such as setting up your permalink structure and configuring your plug-in options etc.

Many of the professional themes allow export/import of theme settings. You can check your theme options page to look for such options to sync your theme settings and customizations quickly.

Have a question or comment? Feel free to post them in the comments area, I would be glad to assist during my available time.


Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>