How to Install WordPress on Root Folder & Sub Folder on a Windows IIS Server at Godaddy

One of my clients uses Windows hosting on Godaddy. They wanted to host a new WordPress website on a new subdomain when a WordPress website was already installed on the their primary domain. I wasn’t familiar with Windows IIS hosting at the time (WordPress is normally hosted on Linux servers), and so gathering this information took several days and a call to Godaddy Support before I figured it all out.

Here are the 4 steps to install WordPress on a subdomain in Windows IIS in Godaddy when a WordPress installation already exists on the primary domain:

  1. Upgrade to Deluxe or Ultimate Hosting
  2. Setup the Subdomain and Subfolder
  3. Create the web.config file in the Subdirectory
  4. Install WordPress Like Normal

Godaddy Hosting Control Panel

1. Upgrade to Deluxe or Ultimate Hosting

Because they used Godaddy, they first had to upgrade to a deluxe hosting package as the base, “Economy” hosting plan does not allow you to host websites on subdomains. An upgrade was an extra $2 a month. Thanks to Chip O’Toole for this tip.

2. Setup the Subdomain and Subfolder

In Godaddy, this is done in the hosting control panel under “Manage Domains”. Click the domain you want to manage, and then create a new subdomain. It will prompt you to create a folder with the same or different name after that. Once a folder is created, go back to the control panel and setup a new FTP user account to access that folder if needed.

3. Create the web.config file in the Subdirectory

Once the hosting was upgraded, the subdomain still did not ‘show up’, but simply redirected to the primary domain’s website. To fix that, you have to create a web.config file in the subdirectory you created in step 2. To do that, go back to the hosting control panel and click on “File Manager”. Browse to the subfolder and then click new. Copy and paste the following code:

<!--?xml version="1.0" encoding="UTF-8"?-->
<rule name="SubWordpressFolder" stopprocessing="true">
<match url=".*">
<add input="{HTTP_HOST}" pattern="^(www.)?">
<add input="{PATH_INFO}" pattern="^/" negate="true">
<action type="Rewrite" url="\your\sub\domain\directory\path\{R:0}">

<rule name="SubWordpressFolder-wp" 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">

Thanks to Samrat Saha on the WordPress Forums for this solution, which is based on this “Install WordPress on IIS” tutorial from Microsoft.

Note:Be sure to change the “www” to your subdomain name, “” to your primary domain name, and “\your\sub…” directory path to the actual path.

PS. The “R:0” are “back-references to condition patterns“.

4. Install WordPress Like Normal

You may not be able to use the one-click install application in Godaddy for a subdomain, but you can still manually install WordPress. First create a MySQL database. Record all of the info from setup such as database name, username, password, and host name. You’ll need all of that to configure WordPress. Next, download the latest installation files from Unzip the file and upload to your sub-folder using FTP. Once the files have been uploaded, go to [subdomain.primarydomain] and follow the prompts to create a configuration file.

How I Almost Lost Everything

Well, not everything, but my entire blog.

I went to create a blog post yesterday and instead of a publish button, there was a “Submit for Review”. Not really thinking, I just clicked it anyway, the page refreshed, and the post was gone.
After doing some research it appeared that the database was full. I was using 150.6 MB out of an allotted 100 MB.
While modern databases now come in 1000MB chunks, this database was started back when the standard was 100 MB and they had graciously let me go over by 50% until cutting me off (without notice).
What else happened because of this?
Backups had stopped running. Since there was no way for the plugin to add more data to the database, a new backup could not be created.
One option was to clean up the database with a plugin, but I couldn’t add any new plugins because again, the database was so full, it couldn’t make an entry.
How did I fix it?
I created a new 1000 MB database, did an export, then attempted to import into the new database using WordPress’ import tool, but the file was too big (6 MB). The max size is 2 MB.
So instead I went into the web host and used PHPMyAdmin to manually export and attempt to import the data. This also didn’t work because it exceeded the “max packet size”.
Now I was starting to get a little panicked.
I went back to the website and deleted all spam messages (~3000), which freed up enough space to install a plugin called WP-Optimize. I ran that, which deleted all revisions, freeing up almost half of the database, but the export file was still just as big.
Another thing I noticed was that the theme I recently installed (Jupiter) had created several new tables and may have been what put me over the top in space so I removed it.
Finally I remembered that posts can be exported by category, author, or date range so I exported them individually by category, which kept each file under 2 MB.
I imported them into the new WordPress database 1 by 1, semi-automatically restoring the data to the new database. This worked.
All 619 posts and all 5 pages have been restored.
This is just another example of The White Album Problem. As databases outgrow their restraints they will need moved to larger databases over time and knowing how to manage this data transfer process is critical to preventing data loss.
In addition, this process highlighted the need to monitor database usage at least on an annual scale.
It would be nice if the web host would provide a function to expand out an existing database, but maybe this is an option they or some enterprising young entrepreneur will do in the future.

How I Use Google Analytics for Business

There are 6 main areas that I check in Google Analytics to get a feel for how a site is performing, where the traffic is coming from, and what the people are interested in.

Audience Overview

2014-04-08 09_29_03-Audience Overview - Google Analytics

While some may view these as “vanity metrics”, they give you a baseline comparison month over month and year over year for how your site is trending over time.

To give you some context, a starter site should aim for 200 visitors a month, then 200 a day. A good bounce rate (user visits one page and then leaves) is less than 60%.

Acquisition Referrals

2014-04-08 09_32_38-Referral Traffic - Google Analytics

There are multiple views under Acquisition (overview, channels, traffic), but I focus on “All Referrals” as it is the most specific category. It lists specific referring sites.

Organic Keywords

The other category under Acquisition I review often is “Keywords > Organic”. It can give some insight into what search terms people are using to find the site.

If your top keywords are your brand name, don’t fret. Congratulate yourself. That’s a sign of success. It means people are searching for your brand name specifically.

Search Engine Optimization Queries

If your top Organic Keyword is “(not provided)” you can still get the keyword information as long as your site is connected to Google Webmaster Tools.

Under Acquisition > Search Engine Optimization > Queries will tell you the keyword, impressions, clicks, and average position for each search query.

Site Content

Under Behavior > Site Content > All Pages, Google Analytics lists the top pages on the site by pageview, time on page, and bounce rate.

I use this in combination with the keyword data for content marketing to determine what to write about when creating new blog posts and pages.

Advanced Analytics

There is much more that Google Analytics can do from A/B testing to automatic reports to goal and conversion tracking to automatic alerts.

If you are interested in learning more about the insights Google Analytics can give your business, contact me or leave a comment below.