Also valid for other versions (no guarantees though)
Xampp is a free web server that interprets php and perl programming language. It's mainly used as a test bed during the development of a website.
Things you'll need for this tutorial
Step 1: Download xampp
- Go to the official website of xampp
- Click the "installer" download link (it's the easiest method)
- Wait for the download to start (about five seconds)
- In the pop up window, click save or save as depending on your browser
- Choose local disk (D:) as the save as folder
Step 2: Install xampp
- Go to computer >>local disk D the downloaded file should be in there
- Double click it
- A warning window will show up, click yes
- Select a language and click OK
- In the xampp installation wizard, click next
- Click browse, select local disk D and click OK
- Click next
- Check the buttons for install Apache, MySQL and Filezilla as service
- Click install
- Wait till the installation process is complete then click finish
- Wait for these messages (screen shot below) to be sure that the installation was successful
- Click yes, click ok
This is what xampp control panel looks like (below), you can stop, start Apache, MySQL and Filezilla services from here. We don't need to do anything here for now.
You can access the xampp control panel at any time by clicking the xampp icon on your desktop or going to all programs >>apache friends >>xampp >>control panel
Step 3: Test xampp
- Launch any browser then go to this url: http://localhost
- Choose a language
- After choosing a language, you should get a page that looks like this:
- Click status (left side of the page); this is to ensure that everything is ok. The status page should look like this:
- Exit the browser
The htdocs folder is the main directory for all www documents; that is, this is where you should keep all your web stuff. It's highly recommended to create a new folder for every website you want to create in xampp.
Let's create a one page website to test xampp
- Go to computer >> local disk D >>xampp >> htdocs
- In the htdocs folder, create a new folder; name it mysite
- Launch notepad (Go to all programs >>accessories >>notepad)
- Enter the code below into the new notepad document
echo "Have a nice weekend!";
echo "Have a nice day!";
- Save the notepad file (file >> save as) as "test.php" (without the quotes. Make sure you add the .php extension) in the mysite folder we created above (computer >>local disk D >> xampp >>htdots >>mysite)
- Go to your browser then go to this address: http://localhost/mysite/test.php (mysite is the name of the folder we created earlier).
This is the result you should get:
*If you're reading this article on a Friday, the result will be: Have a nice weekend
*The default installation of xampp is not secure and should not be used as a publicly accessible server. It's perfect when used as a test bed server if you want to experiment with PHP and for software packages like Joomla, WordPress, Drupal etc.
That's it; you can start working with xampp for your test projects.