Setup local web server for windows - Install, configure and testing xampp

Why do you need a local web server? Most would answer it's for testing a website. It doesn't matter whatever reason you need a web server for, here is a simple, easy and free way to have one in your computer.

For a free web server and compatible with Windows operating system, we have Apache web server. Apache is a great web server, well established and has been using in Unix and Unix-based operating system for many years. It is well maintains and has many source of support such as online forum and security guide.

Then, maybe you would need a database server. Mysql is a good choice. It's free and stable and has well support too. There are lots of FAQs and forum available in Internet if you need help. Documentation is well written, it's our perfect choice then.

Perhaps we need a server side scripting too. For many years, people has been using Mysql with PHP. They are a great couple. And good news, PHP is free too.

So, there we have all softwares that we need. Here's the list of where you can have them:

Download Apache web server.
Look for Apache for Windows. Choose the right version for your Windows.
Download Mysql database server.
Look for Mysql database for Windows. Scroll down the page until you find the right version.
Download php for Windows installer.
Pick a mirror closest to you for a faster download. Choose the right version for your Windows.

From the list above, you can customize your web server however you want. But if what you need is only a simple, working web server to use locally and easy to install and configure than I recommend Apache Friends XAMPP for windows. It is a package of softwares mentioned above plus an FTP server and a mail server.

You can download Apache Friends XAMPP for windows from their website.

Here the step by step on how to install xampp in windows:

Firstly, download xampp installer from the Apache Friends wesite's link above.

After finished downloading, double click xampp installer to start the installation. You should get the welcome message like the picture below:

xampp welcome message

Just click next and xampp installer will ask for xampp install location. You can change to your preference or just click next for default location.

xampp install location

Here is the options. You can install xampps as a service too. That means xampp will be added into Windows services. That means you can start and stop apache, mysql and other xampp services from Windows Services in Windows Control Panel. If you choose not to add to Windows services, you can always start apache and mysql from zampp control panel.

xampp install options

Xampp installation in process. It takes only a few seconds and not worth to grap your pizza. Just wait for a while.

xampp install process

Xampp installer will install php automatically, so don't worry if this command prompt pop up. During this time, if you have a firewall in your system, it will warn you about xampp services. It's green so it means friendly warning. Give access for xampp services.

xampp php configuration

There you go. Less than 5 minutes of installation process.

xampp install finish

A little hint from xampp.

xampp hint

A congratulation message from xampp.

xampp congratulation message

Here is xampp control panel. If you didn't choose to install services during the installation process, you can still tick the box beside each services to install it into Windows Services. Click start button to start service.

xampp control panel

Configure web server

1. Now that our web server is ready to use, we are going to configure the web server folder. Click start --> All Programs --> Apache Friends --> XAMPP --> XAMPP Httpdocs folder. That is the location of our web server root directory.

xampp web server root location

2. Let's create a shortcut on the desktop to make our job easier in the future. We are going to open this folder frequently. Just right-click on the XAMPP httpdocs folder and choose Send to --> Desktop (create shortcut)

Create shortcut for xampp httpdocs folder

3. Open xampp httpdocs folder. This is the root directory of our web server. Put all our website file here and open web browser to view it.

xampp web server root directory

4. To test our website, open web browser and type localhost/website_folder/ in the url and enter.

xampp website testing

That's all. The Apache Friends really did a great job. The xampp project is really useful and save us lots of our time. There are more projects and add on for xampp in their website. We can show our support by giving a donation.

Apache Friends xampp project page.

Add new comment