Deploy a Windows Web Server including PHP and MySQL

Install Windows Web Server with PHP and MySQLThis guide is designed more as a checklist of things to remember to do when deploying a Windows Web Server including PHP and MySQL as a WAMP server.  WAMP stands for Windows, Apache, MySQL and PHP.  In our case we will be using IIS instead of Apache, so I suppose we should call it a WIMP stack, hmmm!!!

Stage 1: Install your Windows Web Server

  1. Install Windows Server (of course!)

Next we need to do some preparation work…

  1. Install all available windows updates
  2. TEMPORARILY disable IE ESC, or install Chrome

Now let’s do MySQL first, why not?

  1. Visit http://dev.mysql.com/downloads/windows/installer/ and download the MySQL windows installer
  2. Install MySQL and select: Server only, Data Path (d:\mysqldata or wherever you want to store your data)
  3. Configure MySQL as part of the installer: Config Type: Server Machine, Port 3306, Show advanced options: set root password

Time to get started on IIS…

  1. Download Visual C++ Redistributable for Visual Studio 2012 from http://www.microsoft.com/en-gb/download/details.aspx?id=30679 – x86 version
  2. Install IIS Role with defaults from Server Manager
  3. Copy the IIS shortcut to the desktop (I do this for any role I install on a server so I quickly know what roles it has!
  4. Install Microsoft Web Platform when prompted, if not prompted you can download it here: http://www.microsoft.com/web/downloads/platform.aspx
  5. Search for PHP and select the version you wish to install and click Add -> Install
  6. Also search for IIS: Dynamic Content Compression and install that too.

Now let’s configure PHP a little…

  1. Create a folder in c:\inetpub\temp called PHP
  2. Edit the security settings of c:\inetpub\temp\php and grant USERS full control
  3. Launch or Restart IIS
  4. Select Server Name and then double click PHP Manager
  5. Fix warnings at the top of the manager
  6. Click ‘Manage all Settings’
  7. change the session.save_path to c:\inetpub\temp\php
  8. change the upload_tmp_dir to c:\inetpub\temp\php
  9. change the error_log to c:\inetpub\temp\php\PHP55_errors.log

Got this far? Great, let’s test it…

  1. Create a file in c:\inetpub\wwwroot called phpinfo.php and add just the following line:
    <?php phpinfo(); ?>
  2. browse to your webserver at http://webserver-ip/phpinfo.php
  3. Success? Of course! Well done!

Tidy up…

  1. Re-enable IE ESC
  2. Run all Windows Updates until none remaining
  3. Set windows update to Download but don’t install

Secure it…

  1. Follow Part 2 of this guide which is all about securing your Windows Web Server including PHP and MySQL

That’s it!  In under 15 minutes you should have a working Windows Web Server including PHP and MySQL.

Want to speak to us on the phone?

Please contact us and we can discuss your requirements!

High Wycombe & South Bucks

Aylesbury & North Bucks

  • Aylesbury
  • Buckingham
  • Milton Keynes
  • Leighton Buzzard

Thame & Oxfordshire

  • Thame
  • Oxford
  • Witney
  • Didcot

London & Home Counties

  • London
  • Watford
  • Uxbridge
  • Rickmansworth