Set up Windows Server 2012 R2 before migrating wordpress website [closed]

My company decides to move their website to a new Windows Dedicated Server. I am a totally newbie right here, and have no idea what to do.

Can you please let me know what are the steps to do that? Tried to figure it out but some posts are to confusing.

I have Installed IIS,php and wordpress. What should I do further?

PS. Our current website is live so I need to move it with as much less time as possible please

Answer

Too many things to assume here. This is the assumption I have made:

  • website is hosted “somewhere else”
  • dedicated server is hosted “at your site”
  • database is MySQL on both sides.

If so then there are a few steps to take. First of all, you need to secure your webserver. this is a good place to start with the basics: https://technet.microsoft.com/en-us/library/jj635855(v=ws.11).aspx you will also need .NET 4.5 and CGI enabling on your IIS side. You will also need to add an IIS handler for PHP, in IIS “add module mapping” with the details:

 Request path – *.php
 Module – FastCgiModule
 Executable – c:\php\php-cgi.exe 

PHP will need to be 32bit (even though R2 is x64). and the non-thread safe version too. There are changes to make in the default php.ini (this assumes you have installed to c:\php and you are using the default c:\inetpub)

 extension_dir = c:\php\ext)
 log_errors = On
 error_log = C:\inetpub\temp\php-errors.log
 cgi.force_redirect = 0
 cgi.fix_pathinfo = 1
 fastcgi.impersonate = 1
 fastcgi.logging = 0

maxfile size of 2M is probably a little small for you too – I’d increase that whilst we are in php.ini

you didn’t mention installing MySQL on your 2012r2 box, you will need to.

You need to make sure you have a firewall with a dedicated external IP address that is registered to the DNS of your site (the DNS will be the last thing you switch over). The firewall needs to forward port 80, 443 and 8080 from your dedicated IP to your internal webserver IP.

Once you are happy that you can access a “hello world” (and a PHP “test”) page from the outside world you can then look at migrating your wordpress site from “wherever” to local. there are lots of people who have done this before and the basics are:

setup wordpress locally, setup MySQL locally, export externally, import locally.
your MySQL and wordpress settings are more dependent on what you have done externally. A more thorough walkthrough can be found here:
(source) https://www.scotsts.com/migrating-a-wordpress-site-from-apachelinux-to-iiswindows/

Try to get the PHP “test” and “hello world” pages working internally, then externally -FIRST- before going for the big wordpress export/import!

Attribution
Source : Link , Question Author : DopeAt , Answer Author : AngryCarrotTop

Leave a Comment