Migrating your WordPress site from GoDaddy

This week I got an email from GoDaddy stating that once again their hosting fees would be increasing 10% . I have been wanting to migrate away from their hosting and move my WordPress sites to my home server for a while now so I figured now is the time. Also it did not help that they supported PIPA and SOPA.  I was helping a friend (Kevin Crafford) set up his Windows Home Server (2011). Together we put together this tutorial for migrating your WordPress site from GoDaddy to Windows Home Server 2011 . Hopefully we can help you out from blogging about our experience. While this tutorial focuses on WHS, this can be used on a Windows Server 2008 box running IIS7.



Install web platform installer for IIS http://www.microsoft.com/web/downloads/platform.aspx

 Install web platform installer

Create a folder in your inetpub -> wwwroot folder   named whatever you want to name your website “mywebsite.com”

Start IIS

Click Add Web Site…

And add your site name  and the physical path

After you create the site, you need to edit bindings….

We want to add “www.mywebsite.com”

Next we will need to install WordPress on IIS  using the web platform installer

 

Search for “Wordpress” and hit Enter

Click Add on “Wordpress” and press Install

 

Create a MySQL account…

 

Click I Accept

Select your Website name from the list

Under ‘Wordpress’ application name I make it blank, because I do not want to type in “mywebsite.com/wordpress”

Next you will need to open a Text file to put the password settings for your database in for Future use

You will need the Database name, database user name, and database password.

In this case it is

Database Name:

wordpress156

Database User Name:

wordpressuser156

Database Password:

U-v&ek#N6LW4

 

 

Next we will need to install phpMyAdmin for a “gui” to the SQL database for migration.

http://www.phpmyadmin.net/home_page/downloads.php

Installing this can be a bit of a pain in the ass if you have a wife that won’t leave you alone!

Create a folder under your C:\inetpub\wwwroot folder for the phpmyadmin.

In IIS Right click on Default Web Site and add Virtual Directory…

This will allow you to access the phpmyadmin from your localhost using http://localhost/phpmyadmin

Now we are to the point where you will need to Export your SQL Database from Godaddy so that you can put them on your localhost.

Log in to Godaddy Control Panel for your website go to Hosting à Databases à MySQL

 

Select your database and click phpMyAdmin

 

Tip: If you can’t remember your database password you’ll find it in your wp-config.php file

Click on your Database

Here you will see a tab that says Export

Now you will have several options in front of you.  Be sure your Schema has all selected and SQL is selected.

As you can see in the picture below

Save this file to your server where you know where it is.

Now its time to import your database into your localhost for your website.

Log into your phpmyadmin using http://localhost/phpmyadmin/ and the Username and password from the web platform installer WordPress  installation from earlier, in our case its Username: wordpressuser156 Pass: U-v&ek#N6LW4

Click on Import

Browse for the file you downloaded from Godaddy

 

(Tip: The default Max file size is limited to 2MB. You can change this by going to your php.ini and changing the line

“upload_max_filesize = 2M” to something like 50)

And click Go.

Next we will need to FTP all the Files from Godaddy to your C:\inetpub\wwwroot\mywebsite.com folder

 

After these files are downloaded you will need to open the wp-config.php and update the MySQL details of your new database

You will need to change the following:

After these settings are changed you will need to restart IIS by opening command prompt and typing “iisreset”

Also restarting the mySQL Service is needed. To restart MySQL you will need to run Services.msc from the command promp, scroll through the list to find MySQL and click Restart the service

 

Now your website will work as it is, but there are a few more things we need to do.

Click on your site in IIS mine is “MyWebSite.com” then under IIS in the main screen of your website you will see

Open Authentication right click on Anonymous Authentication and go to edit

Change from Specific user to Aplication pool identity

In your %SystemRoot%\TEMP folder you will want to change the permissions for IIS_IUSRS to have read/write access

(WordPress runs on PHP and PHP uploads files to a temporary location before moving them to their final resting place and when the file is moved the permissions are moved with it.  By default that temporary location is %SystemRoot%\TEMP.  Editing the permission on that folder to include your application pool’s identity (e.g. Network Service, etc.) resolves the issue since the file will now be created with the permissions that are expected when the file is accessed from your site’s wp-content folder.)

 

 

 

Posted in Fun Stuff, Technology, Web and tagged , , , , .

Leave a Reply

Your email address will not be published. Required fields are marked *