Setting up a PHP/MySQL testing server on your own computer is an invaluable time saver for web developers. Once set up and functioning properly, you can develop, test, and prep your dynamic sites without having to upload to your live server every time you make a change.
This tutorial shows you how to set up your Windows machine to run a PHP/MySQL testing environment that you can use for testing PHP pages. If you are a Mac OS X user and want to set up a testing server view the tutorial for Installing MAMP on OS X.
In most cases, having a local testing server will save you time and make developing your dynamic website easier. However, depending on the extent to which a customer is developing websites, this may not be necessary.
In this case, you should upload the Solution Pack directly to your server after modifying the necessary configuration files.
If you have ever enabled (or attempted to enable) a testing server on your Windows machine using IIS, you will want to turn that off now to avoid conflicts.
XAMPP installs everything you need to run PHP pages and a MySQL database on your local machine.

NOTE:The Installation process can take up to a few minutes. Once complete, a Command Prompt window will display for you to configure a few additional settings.
The Command Prompt dialog will ask you some questions that you can answer by choosing 'y' or 'n' on your keyboard.

Once installed, you can use the XAMPP Control Panel to start your testing server.

To make your testing server start automatically when your computer starts, you can check the Svc checkbox beside both options.
NOTE:If the XAMPP Control Panel is not already running, go to C:\xampp\control.exe to open the panel.
With your testing server now installed and running, there are a few final steps you should take to make sure everything is configured to work perfectly.
Best practices encourage you to always have a password specified for your MySQL database, and we think you should too.


The next page displays the login credentials for your MySQL database. The username (SuperUser), 'root' is created for you automatically and is the username you can use for accessing your MySQL database or creating a database connection.
You’ve now determined the username and password that you will use every time you need to access your database, or create a database connection in Dreamweaver.
Each time you change your password, you will need to restart your testing server for the change to take effect. Access the Control Panel by double-clicking the XAMPP icon in your taskbar. Choose Stop and then Start beside the MySQL option to restart the database.
Lastly, you should test your PHP Installation to make sure everything is set up for you to load PHP pages on your local computer.

If you see a PHP page similar to this, you have completed setting up your PHP/MySQL testing server.
Now that your testing server is completely set up, you can preview your PHP pages on your local computer. In order for this to work, you need to store your website's files in C:\xampp\htdocs.
NOTE:If you chose to install XAMPP to a different directory, this path will be different.
Now, you should define a site in Dreamweaver that utilizes your testing server. This will allow you to preview any PHP pages that you are developing without uploading them to your live server.
For instructions, see the Defining your site for dynamic development tutorial.
If you did not find this helpful or you are stuck on a particular step, click here to let us know what we can do to improve this tutorial.
This form was built using CSS Form Builder.