tech/music/movies/musings
Show MenuHide Menu

Category Archives: WordPress

Moving WordPress from wamp to iis

February 11, 2015

Tried to install using the Microsoft Platform installer but it was only installing MYSQL and failing on PHP setup. This was down to the environment being installed on, which was very locked down. The following error was being generated:

image

The only resolution bar lifting the restrictions on the IIS server being installed onto was to install PHP manually by following the instructions here:

http://php.net/manual/en/install.windows.iis7.php

Unfortunately there was an error after PHP install when trying to view PHP pages.  By trying to launch the php-cgi.exe exe on its own the error became apparent it was down to a missing Visual C++ Resdistributable, available to download below.

http://www.microsoft.com/en-us/download/confirmation.aspx?id=30679

So MYSQL and PHP are now configured on the new host server, the next steps involve moving over the WordPress site from the previous server. The entire WordPress site can be copied from its location on the Apache server folder, in my case this was:

C:\wamp\www\wordpress_site

to an IIS folder on the new host. Once copied IIS has to be configured and this is explained in detail here:

http://www.vsysad.com/2012/04/create-a-wordpress-blog-on-windows-server-2008-r2-iis-7-5-and-mysql/

Final step involves grabbing the MYSQL database hosting the current WordPress site. I used MYSQL dump for this and the following command:

$ mysqldump -u root -p myWordPressDB > myWordPressDB_scripted.sql

This .sql file then has to be run against the MySQL database on the new host. In advance of this if your domain name has changed when moving from old host to new host. Do a find and replace of old with new before running script on new host. Use the following command to run this script:

$ mysql -u [uname] -p[pass] [myWordPressDB] < [myWordPressDB_scripted.sql]

Hopefully your WordPress site is now available on the new host.