Use Xampp To Host A Website

XAMPP is not meant for production use but only for development environments. XAMPP is configured to be open as possible to allow the developer anything he/she wants. For development environments, this is great but in a production environment, it could be fatal. Jan 13, 2021 How to Install XAMPP and WordPress Locally on Windows PC. Want to install XAMPP and WordPress – aka. Install WordPress locally? This is a great idea if you want a development site that can be used for testing or other purposes. XAMPP lets you run a website from your very own computer.

  1. Can I Use Xampp To Host A Website
  2. How To Download Xampp Server
  3. How To Host A Website
  4. Xampp Website Templates

If you would like your computer to be a local web server for website development, then this tutorial is for you. This is easily accomplished by installing the cross-platform, free XAMPP Lite software package.

This tutorial provides clear, step-by-step instructions on how to install, setup, and use XAMPP Lite on a Windows PC. It also discusses some other considerations when using XAMPP.

○ This tutorial contains affiliate links. Read our disclosure policy to learn more. ○

What is XAMPP?

XAMPP, a free, open source software package produced by the non-profit organization Apache Friends, is the most popular web server software package used for website development. XAMPP is (X) cross-platform, and, at minimum, contains the (A) Apache HTTP server, and supports the (M) MySQL database, (P) PHP scripts, and (P) Perl scripts. XAMPP distribution packages are available for Windows, Linux, and OS X system operating environments.

Website Server Overview


New webmasters coding primarily in HTML should choose a UNIX-based website hosting plan. The host company provides disk space on a server which holds your website documents, images, and scripts. The root directory is the top-most folder of your allocated disk space and is typically named public_html, or www, or htdocs. Your website's homepage - usually index.html (or .shtml or .htm) - must be stored in the root directory. Usually the other webpages which link to the homepage are also stored in the root.

About 70% of the webpages on the Internet are handled by Apache HTTP servers in a UNIX (Linux) environment. When an Internet user requests a website via its URL (e.g., the Apache HTTP server looks for the 'index' file in the root directory for that website and sends this homepage to the user's browser to render (display).

Website Testing

A website should never be uploaded to the 'live' server until all of its webpages have been thoroughly tested on the most popular browsers. This testing can be done on a local PC using the Apache HTTP server component of the XAMPP package. Your PC can act as a web server even when it's not connected to the Internet!

Your website hosting company should provide cPanel (Control Panel) or another user interface for accessing disk space and performing administrative functions. Even though you can usually use this interface to upload website files, serious webmasters should upload files using a File Transfer Program. There are several good - and free - FTP programs available, such as FileZilla.

Downloading XAMPP Lite

To download XAMPP, go to the Apache Friends XAMPP webpage. Click on XAMPP for Windows. From the XAMPP for Windows page, find XAMPP Lite. Click on the EXE file and download it to your hard disk.

The developers of XAMPP Apache are no longer creating a 'Lite' version. The last version of XAMPP Lite, version Win 32 1.7.3, can be found on XAMPP's webpage on The executable file is 'xampplite-win32-1.7.3.' For the program list and release levels, click the 'i' by the file and then click 'Release Notes.'

We have successfully installed this version of XAMPP Lite on a Windows 7 PC. However, your Windows 7 computer is not our computer nor have we installed the software on newer releases of Windows. Since this software was built in 2009, you are using this software at your own risk. This tutorial has helped a lot of folks over the years and we keep it here for archive purposes, but see links in the last paragraph. Now to the tutorial.

Installing XAMPP Lite

Before installing any new software, create a System Restore point in Windows. If you need help, read our tutorials found on the Windows menu tab.

Close all programs. Locate and double-click the XAMPP Lite file that you just downloaded. Take the default install options. (Some problems have been reported if the product is installed in a different directory).

The program will quickly install. When completed, a XAMPP program shortcut is placed on the desktop.

If you are installing XAMPP Lite on Windows 7, you may receive the following message that we did recently when installing xampplite-win32-1.7.3.exe. A black box appeared on the desktop labeled 'C:Windowssystem32cmd.exe' and displayed a series of questions. The questions, and our responses in red (often taking the default and just pressing Enter), are shown below. Modify as necessary:

  • Should I add shortcuts to the startmenu/desktop? (y/n) y [Press Enter].
  • Should I locate the XAMPP paths correct? Should I proceed? (y/x=exit setup}: y [Press Enter ].
  • Should I make a portable XAMPP without drive letters? .. Your choice? (y/n): n [Press Enter].
  • XAMPP is ready to use .. Press (Return) to continue. [Press Enter].
  • The time zone has been set to EST .. Press {Return) to continue: [Press Enter].
  • The next message presents six options: #1 through #5, or x. We choose 'x' because we wanted to start XAMPP by clicking on the desktop shortcut. So type x (or your choice) and press Enter. The black box should disappear.

Customizing XAMPP Document Root (Where Website Files are Stored)

The default folder for storing your website documents is located inside the installation folder 'xampplite' or 'xampp.' Most folks prefer to change the location to a more convenient folder. Follow the directions below to change the default folder to one named 'Apache Sites' on the C-drive.

  1. Create a new folder on the C drive named 'Apache Sites.'
  2. Open Notepad. (Click Start All Programs Accessories Notepad)
  3. Click File Open. From the 'Look in:' box, click the C-drive and double-click the XAMPP installation folder.
  4. Double-click the 'Apache' folder and double-click the 'conf' folder. Then, at the bottom of the Open window, change the filetype to 'All Files.'
  5. Right-click on 'httpd.conf' and click Copy. Then click in a blank area of the small window and right-click Paste. (This is your backup if you mess up.)
  6. Now, double-click 'httpd.conf' to open it in Notepad.
  7. Click Edit Find, and move the little Find box to the right side of the window.
  8. Type in DocumentRoot and click Find Next TWICE. Your cursor should rest on a line that specifies the document root as follows: Document Root: 'C:xampphtdocs' - or - Document Root: 'C:xampplite htdocs'
  9. Carefully edit this line by typing Apache Sites after C:/ so that the entire line reads: DocumentRoot 'C:/Apache Sites' .. don't delete the ending quotation mark.
  10. Go back to the top of the file and click at the top of the page so the cursor is at the beginning of the file. Open the Find box if not still visible and type <Directory and click Find Next TWO TIMES. The line above where your cursor should now be located says 'This should be changed to whatever you set DocumentRoot to.'
  11. On the line where your cursor rests, type Apache Sites after C:/ so that the entire line reads <Directory 'C:/Apache Sites'> .. don't delete the ending quotation mark or greater-than mark. Cancel the Find box.
  12. Click File Save, and exit out of the Notepad document.

Starting and Stopping the Apache HTTP Server

To start the Apache server, double click the XAMPP program shortcut that was placed on the desktop. Then click Start for Apache.

Windows Firewall may display a window that says 'Windows Firewall has blocked some features of this program.' Check the box next to 'Private networks' and un-check the box next to 'Public Networks.' Then click Allow access.

Once the program says 'RUNNING' you can close the Apache window by clicking X in the upper right corner.

Using XAMPP as a local server

You do not have to be on the Internet to use the XAMPP server. The Apache HTTP Server component of XAMPP allows your PC to act as a web server. Open a browser window and type http://localhost in the URL box. With some browsers, such as Firefox, you can just type localhost. The contents of the Apache Sites directory (the folder you created above) will display. If you do not see the 'Index of /' at the top of the webpage and Apache is definitely running, try typing in the URL box. If this works, then 'localhost' is not defined in your Windows Host File. (Instructions for fixing this are available on the Internet.)

Individual HTML files may be placed in the Apache Sites folder, or a folder can be created inside of the Apache Sites folder for each unique website you will be working on.

⬇ Download stock pictures of Amazon jungle on Depositphotos Photo stock for commercial use - millions of high-quality, royalty-free photos & images. Download Amazon jungle stock photos. Affordable and search from millions of royalty free images, photos and vectors. Find amazon jungle stock images in HD and millions of other royalty-free stock photos, illustrations and vectors in the Shutterstock collection. Thousands of new, high-quality pictures added every day. Amazon Rainforest Sunset, Ecuador A magic sunset in the Amazon Rainforest inside Yasuni national park. The Amazon rainforest and its tributaries comprise the countries of Ecuador, Peru, Bolivia, Brazil, Colombia, Suriname, Venezuela, Guyana and French Guyana. Amazon jungle stock pictures, royalty-free photos & images. Amazon jungle images.

Can I Use Xampp To Host A Website

When you click on an HTML file in Apache Sites, the webpage should display in the browser window. If you click on a folder, Apache will display the index or homepage file inside of that folder.

Conflicts Apache May Have With Other Programs

The Apache server expects to use Port 80 on your computer. If another program is using Port 80, you may receive errors when first starting Apache. For instance, Skype uses Port 80. However, it is easy to change the port number for Skype to eliminate the conflict. Open the Skype application. Then click Tools Options Connections, and remove the check mark by PORT 80.

Microsoft IIS (Internet Information Services), a competing web server program, also uses Port 80. IIS is not installed on most Windows systems by default, so this won't affect most new webmasters.

Alternately, you can change the port that Apache listens to by modifying the httpd.conf file, locate the line that specifies 'Listen 80' and change it to 'Listen 8080.' However, instead of typing localhost (or http://localhost) in the URL bar as described below to access your websites, you will have to type localhost:8080. This shouldn't be a big problem if you create a bookmark for the page in your browser.

Security and Apache XAMPP

The product XAMPP is meant to be used in a development environment, not a production environment. As such, it does not have proper security if others can access your computer. Therefore, it is essential to ensure that the XAMPP machine is not accessible to others on the Internet or private network by using a Firewall and other security measures, if necessary.

Other Potential Problems

The Apache website has a special section on XAMPP for Windows FAQ. Some of the topics covered are: not enough system memory, XAMPP will not start, XAMPP using 99% of CPU resources, MySQL, and images and style sheets not displaying properly.

Occasionally an anti-virus program will find false positives that are really files in legitimate programs. The Apache website states that over the years some anti-virus software has had trouble will files such as 'kill.exe' .. 'pv.exe' .. or 'xampp-control.exe'. The providers of XAMPP claim it is free of viruses and spyware, and our experience has shown this to be true.

How To Download Xampp Server

If you are having problems or cannot find the information you are looking for in the documentation that comes with the software, check out the Apache Friends Support Forum.

How To Host A Website

We hope our tutorial on the install, setup, and use of XAMPP Lite has been helpful. Cheers!

Xampp Website Templates

↑ Return to the top