How To Install A Windows Web Server On Your PC With XAMPP

Ads by Google

xampp title   How To Install A Windows Web Server On Your PC With XAMPPSome of our articles here on MakeUseOf require the use of your own web server. Although the easiest way to go about finding web space is to purchase hosting where a web server is already set up for you, a free and almost-as-easy to use option is to install a server on your local home computer. We have covered WAMP previously and now I would like to update the topic with a software package known as XAMPP.


XAMPP is a collection of software that includes Apache, MySQL, PHP and Perl. It also includes Tomcat, FileZilla FTP server and Mercury Mail for sending emails. These packages are used for the following tasks:

  • Apache – Web Server, hosts content at http://localhost/
  • MySQL – Database Server, many software packages use this to store data
  • PHP – Programming language, many modern programs use this as a language
  • Perl – Programming language, many programs use this language and has been around longer than PHP
  • Tomcat – Server used to execute Java programs
  • FileZilla – FTP server used to transfer files to/from your local machine (only necessary if you need access remotely)
  • Mercury Mail – Mail system used for sending emails

These programs work together to give you a very robust environment for hosting web programs on your local machine.

Ads by Google

Getting Started

Download the correct program for your operating system. This tutorial will go over the Windows version, but the MacOS X, Linux and Solaris versions are very similar. Run the installer and click OK on any security dialogs that pop up. When you get to the following menu:

xampp install   How To Install A Windows Web Server On Your PC With XAMPP

I would suggest checking off Apache and MySQL as a service as this will allow you to better manage this software later.

When finished, click “Yes” to start the control panel.

xampp start   How To Install A Windows Web Server On Your PC With XAMPP

There is a bug if you are running 64-bit versions of Windows (Vista, 7 or Server 2008). It will say “XAMPP Component Status Check Failure [3]”, but it is safe to ignore this error as everything else seems to work fine.

I also received several popups after installing the software. One was from Microsoft Security Essentials asking to send the FileZilla binary to them for analysis (this software can sometimes be used in backdoors – however this use is legitimate) and also the Firewall will pop up a few boxes asking if you want to allow the port to be used. Leave the checkbox unchecked so that your server will not be available over public wifi and other open networks (for example if you connect at a Starbucks), but to still allow your server to be available from your local PC and other computers in your own private network.

Once the control panel is up, click “Start” on Apache and MySQL.

xampp control   How To Install A Windows Web Server On Your PC With XAMPP

Your web server is now up and running, if all went properly!

Managing Your Server

The first thing you should do is click the “Admin…” button for Apache. This will launch your default web browser and send you to the Welcome page. If it gives you the option, click your language (in this case, English) and you will see your administration area.

xampp welcome   How To Install A Windows Web Server On Your PC With XAMPP

One of the first things to explore are the sample programs. Under the PHP list they include several programs which demonstrate the sorts of things PHP can do.

The “Status” page will show you which services are currently activated. They should all be green except for FTP, SMTP and Tomcat.

xampp status   How To Install A Windows Web Server On Your PC With XAMPP

Next up is ensuring the security of your server. By default there is no password for your MySQL’s administrator account, also known as “root“. If you are on a small local network and you do not care who has access to the data stored in your machine then it is fine to leave this as is; however if you plan on opening your server up to the internet or you have roomates who you may not fully trust it is good to add a password to this account. You can follow the links to set up security of your system. The first option sets a root MySQL password and the second puts a password on your entire web directory.

Finally, if you plan on accessing your server outside of your home, you will need to log into your router and forward port 80 to your local machine. This is much easier to do if you are set up on a static IP address.

Installing Programs On Your Server

The main thing you need to know about where your server stores data is that it is in a subdirectory of your installation directory named htdocs. In my situation the web directory is:

C:\xampp\htdocs\

This includes the administration program. The default page your web server loads when you visit http://localhost/ is index.php. You can open that file to replace it with your own text or remove it altogether, it is really up to you.

xampp local   How To Install A Windows Web Server On Your PC With XAMPP

Now that you have a web server set up, what can you do with it? Well one popular thing you can do is to set up wordpress locally. You can set up your own mixtape or even a proxy server, the possibilities are endless.

Really what you get out of it is the ability to learn something new and provide an environment that allows you to create and modify code in a very easy way. Although this server is not meant for production use, it does give you a very reliable development environment and sandbox to learn the ropes, so to speak.

What’s Next?

After you have your server up and running, the world is your oyster. Install and run that software you’ve always wanted to test out. The Apache Friends FAQ page has a lot of information on XAMPP and extended options, check there to take your install further. If you have any problems or questions about your setup, ask below and we’ll be sure to help you out!

Ads by Google

The comments were closed because the article is more than 180 days old.

If you have any questions related to what's mentioned in the article or need help with any computer issue, ask it on MakeUseOf Answers—We and our community will be more than happy to help.

14 Comments -

jasray

I’ve been using XAMPP for years; it’s always getting better. Personally, the portable version makes life much easier. May want to show how to enable SSL and other goodies. And one shouldn’t have any error messages. I installed the regular version on Windows 7 Ultimate without any problem.

The great thing about the portable version is the ability to copy the entire server to a different computer, etc.

Josh Fox

XAMPP is also a pretty good testing web server for Linux if you don’t want to go through installing all of the components manually and configuring. I use it for working on my test site under Ubuntu. It’s also nice to have a server that’s not ALWAYS running. A lot of people would flame me for using XAMPP on Linux, but I’d rather spend more time working on the site than configuring the server.

Dave Drager

Haven’t used XAMPP on Linux but I understand why you use it to set things up. Although you can do roughly the same thing by running ‘sudo apt-get install apache2 php5 mysql-server’ Everything is configured for you and will serve content out of the /var/www directory.

Josh Fox

That’s true, and I’ve setup servers like that several times, and FTP is easier to work with. However, if I’m not working on a test site, I don’t need the server running. With XAMPP, I just don’t install it as a service and only start the server when I intend to use it. This is my main computer after all, so I don’t really need a web server running all the time. If and when I use a computer dedicated to being a server, I will do a full install of Apache.

jasray

I’ve been using XAMPP for years; it’s always getting better. Personally, the portable version makes life much easier. May want to show how to enable SSL and other goodies. And one shouldn’t have any error messages. I installed the regular version on Windows 7 Ultimate without any problem.

The great thing about the portable version is the ability to copy the entire server to a different computer, etc.

Dave Drager

Do you use 32-bit or 64-bit Windows 7? From what I read on their support forums, it was only a problem with 64-bit versions (which is what I have).

Mike

I want to add a link to the BitNami Stacks http://bitnami.org/
They offer all kinds of out of the box web servers (including WAMP and LAMP) also with pre-installed web applications and systems like WordPress, Drupal, MediaWiki etc. for Windows, Mac, Linux, virtual machines for VMware and some Cloud hosters

Mike

I want to add a link to the BitNami Stacks http://bitnami.org/
They offer all kinds of out of the box web servers (including WAMP and LAMP) also with pre-installed web applications and systems like WordPress, Drupal, MediaWiki etc. for Windows, Mac, Linux, virtual machines for VMware and some Cloud hosters

triclops200

I’ve been using xampp for about a month now and it is working like a charm, I even got me a dynamic dns server for it and have port forwarding, forgive the downtime, I turnoff my PC at night :P. I have also done some mods to get asp .net with apache because my main language is C#. triclops200.dyndns-free.com

triclops200

I’ve been using xampp for about a month now and it is working like a charm, I even got me a dynamic dns server for it and have port forwarding, forgive the downtime, I turnoff my PC at night :P. I have also done some mods to get asp .net with apache because my main language is C#. triclops200.dyndns-free.com

Terryanderson24

Would it be possible to use the server as a backup. So that data from my other laptops can be backed up automatically?

Guest

Well, technically yes you could. Install it on both laptops and make sure that there is enough free space on your hard drive because that is where everything is stored as this no ‘real’ server, while both laptops have to be up and running and connected to the internet of course. About the automated part I don’t know but I’m sure that there are some task managers you could tweak a little. However, for the lazy user, I think that something like Dropbox, ZumoDrive, Syncplicity, Windows LiveMesh, or Box.net would be much easier to use.

chris19thws

been using XAMPP on every wordpress design I made! this is really a great app!

Guest

Well, technically yes you could. Install it on both laptops and make sure that there is enough free space on your hard drive because that is where everything is stored as this no ‘real’ server, while both laptops have to be up and running and connected to the internet of course. About the automated part I don’t know but I’m sure that there are some task managers you could tweak a little. However, for the lazy user, I think that something like Dropbox, ZumoDrive, Syncplicity, Windows LiveMesh, or Box.net would be much easier to use.