Setting up a testing server allows us to view and test the functionality of our entire web project on our local machine. This avoids having to transfer the files to our production server, every time we want to preview a file we've created, or an update we've made to an existing file.
It's very important to be able to test prior to uploading to your production server. This is primarily because any issues can be resolved during the testing process. This avoids unnecessary disruptions in service, if the changes you made contain bugs or other security vulnerabilities.
The Web Server we will be using to communicate with our MySQL Database and PHP scripts is Apache HTTP Server. When installed on your Windows or MAC machine, this server runs in the background and provides essential services through various protocols and through different ports. Some of the essential services include HTTP (Hyper Transfer Protocol) on port 80, SMTP (Simple Mail Transfer Protocol) on port 25, DNS (Domain name service) on port 53, and FTP (File Transfer Protocol) on port 21.
In addition to our Apache web server, we also need to install MySQL Database, PhpMyAdmin and PHP.
To simplify the installation of all these components we will be using a popular pre-packaged solution called WAMP (Windows Apache, MySQL, PHP) or MAMP if you have a MAC.