Local Server For Testing Environment With XAMPP On Windows

If you are a PHP web developer or want to be, it is a must that you need to have a testing environment. A testing environment means you have your own local server to test and run the application you are developing before you go live on your production server. You need to develop and test your application locally rather than testing it in your production server.

So to have your local server in a Windows environment you can use XAMPP. XAMPP is a free and open source cross-platform web server package, consisting mainly of the Apache HTTP Server, MySQL database, and interpreters for scripts written in the PHP and Perl programming languages. With XAMPP you can have a web server, database server, FTP server and mail server, all in one place. And XAMPP works on Linux, Windows and Mac. What else do you need?

To install XAMPP on your Windows:

1. Download XAMPP for Windows

2. Extract it anywhere you like.

3. Open the folder, and double click the setup_xampp.bat file.

4. You will be asked a series of questions. It’s just a y/n answer, you can choose ‘y’ for all as default.

5. The setup will now relocate XAMPP to the correct path if required. Once you see the ‘XAMPP is ready to use’ message, hit Enter to continue.

6. Next you will see a message informing the time zone that was set in php.ini file. Again hit Enter to continue.

7. In the last step of the installation, you are given various choices, amongst which the first one is to start the XAMPP control panel. Note that even if you exit the setup at this point by entering x, you can always start the XAMPP control panel either from the Start Menu or desktop shortcut.

To Run XAMPP:

1. Double click the xampp desktop shortcut or from the program menu

2. You will see a window like the screenshot below:

xampp

3. Start Apache and MySQL to have your own web server. For other services like Filezilla FTP server or Mercury mail server you can start them as well according to your needs.

4. You may need to unblock port 80 and 3306 from your firewall.

5. Test it at http://localhost in your web browser.

6. To access PhpMyAdmin, just go to http://localhost/phpmyadmin

So now you have your local server environment. It is very much like your production server. So develop and test your application or web design before you go live.