How To Set Up Your Own WampServer

There once was a great cat, named the WAMPUS cat. However, this article is not about that cat. This article is about a server. A great majority of websites are run by a trio of services – Apache, MySQL and PHP. Apache is the web server, which handles browser requests and sends the information across the internet to your browser. PHP is the programming language that many sites are written in – this creates dynamic content which in turn is sent to Apache, which sends the data to your browser. And finally, MySQL is the database which stores the information for programs. PHP is used to access this database.

wamp2   How To Set Up Your Own WampServer

It is a tried and tested trio which works phenomenally well. Usually to gain access to this trifecta, you need to purchase hosting, and this hosting is usually run in a far away datacenter running on a Linux server. However, not many people know that it is available locally, and for Windows as well. You can use these services for running your own applications, and also for locally testing software you are writing, before uploading code to a production server.

WAMP stands for Windows Apache, MySQL and PHP. Compare this to LAMP, which is Apache, MySQL and PHP on Linux.

There are several ways to get these services running locally. Each service, by itself, has Windows installers. That being said – once the programs are installed, you need to know how to configure the services. That may not be simple unless you happen to be a system administrator.

We are going to focus on WampServer. In my experience, using WampServer is the fastest way to get up and running. Wikipedia has a nice list of all Wamp servers.

wamp4   How To Set Up Your Own WampServer

Step 1

Download the latest WampServer. As of the writing of this article, it includes Apache 2.2, PHP 5.2 and MySQL 5.0.

Step 2

Run the installer. It will warn you to uninstall WAMP5 1.x if you have installed that already. You can use the defaults and it should install without problem.

Step 3

Start the services. You will see a small icon in your taskbar. Left click on it (right clicking does not display the right menu) and select “go online”. The icon will then make a little animation, and your services will be online. You can view your homepage by going to http://localhost/.

Thats it! Wamp is now running. You are ready to install your application, or start learning some PHP! The public website directory is ‘c:\wamp\www\‘.

Any directory you create in this directory, shows up as a ‘project’ on the main index page.

Advanced Settings

PHP Customization
wamp3   How To Set Up Your Own WampServer

Depending on which type of program you want to install onto your server, you may require additional extensions that are not loaded by default. There are a whole variety of PHP extensions you can load that come built in, but disabled. Left-click on the Wamp menu, go to PHP->PHP Extensions and click off the extension you would like to reload.

You can also edit the configuration file, php.ini through the menu. Edit anything you need, and save this file. The most common edit is the memory_size, but there are many options you can tweak to your liking.

After making any changes to php, make sure you reload apache. I’ve learned the hard way that changes aren’t automatically pushed to the server, until it is reloaded.

Apache Customization

For you advanced tinkerers out there, you can tweak the apache configuration files to your heart’s content. Make sure after making any changes, to reload apache.

MySQL Customization

Depending on your project, you may need to create a database in MySQL. This can be done through phpMyAdmin, which is handily included within the WAMPServer install. By default they include no password on the root MySQL user, which is not the best thing for security reasons. I would recommend changing this password. phpMyAdmin can be reached via the Wamp Menu, or via the url http://localhost/phpmyadmin/

In Summary:

Don’t let the fun stop there. Install a blog and start experimenting with PHP and templates. Run your own Wiki. Run your own music server. The howtos on how to install some neat programs are coming in some future articles.

One of the greatest things about running a home apache server, is that you can use it in combination with a VPN (Hamachi) to access your server anywhere in the world, securely. You can even change your setup to host pages to the outside world, if you so desire.

There is no limit to what you can do! OK, maybe it won’t cook you breakfast in the morning – not yet anyway!

Please let me know if you have any questions, comments, or need help with the install!

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.

16 Comments -

0 votes

g

i was a wampus cat in high school – Atoka Oklahoma Wampus Cat.

Go Wampus Cat’s!!

0 votes

Ved Antani

Great Article, I have been looking to host a personal wordpress blog from my home server. My question is
1. I have purchased a domain for the blog say ; the-best-blog.com
2. Now I want to make sure that whenever a request is submitted to “the-best-blog.com”, its is redirected to the
the server running on my home server.
How to go about doing this ?

0 votes

godius

Great article, keep it up. I found you guys via the new website indexing service over at http://www.dignova.com
Grtz,
Michael

0 votes

Dave Drager

Great question – this probably deserves an article on it’s own.

You need to set up a Dynamic DNS Service to manage the DNS for this domain, or use a CNAME record to point to your dynamic hostname.

There are several free services out there that do this some of my favorite are:
EveryDNS
No-IP
DynDNS

But, also consider the fact that many ISPs will block port 80 on consumer accounts. This means you cannot run the web server on the normal port, port 80. You can, depending on your technical know-how, run it on another port, for example, 8080, and redirect people to that port from an external site. There are downsides to that too, namely that some networks block web access to ports other than 80.

0 votes

Ved Antani

Thanks Dave, this will help. I was concerned about port 80 or similar port redirection blocking by ISPs. But I guess we dont have much choice.

0 votes

Jeff

Hey great article, I’ll use this to keep a copy of my website on my PC. Awesome

0 votes

Nick

Good Article, Reminds of the days I was in (last year) my website/database class. Very cool. Its handy that is for sure.

0 votes

lunesok

Very nice article, thanks a lot.
Say, for example, that I had a Hamachi IP 5.55.55.55
How do I configure WampServer to use it in combination with Hamachi ?

0 votes

Tom

Hi
I have got a question for you.
After you have finished your website on Wamp Server, can you upload it to the normal server so that other people can see it as well?

0 votes

thief

well im trying to instal a css for a game server and the only way u can see it is with hamachi do u know how to fix that?

0 votes

luis

Hi, i want to start learning programming. I downloaded wampserver but then what where do you go from here. I know this is probably crazy but i have never been exposed to programming and I would like to teach myself programming but this is difficult any help would be greatly appreciated

0 votes

venkatesh

hello sir
i have instaled wamp in my computer and i tried to acess my site(in www file) from my fried’s computer giving my computer ip adress.i have made sure that all the servieces wer running properly in my computer.also iam able to get the my site when i brouse by giving “localhost” in the address bar.! but iam not able to see it on other computer connected to the internet.no ip address mistakes at all!!
what to do now?
is there any conditions like port addres that are to be mentioned?

0 votes

eman

that is good description i understood it greatly thank u so much ….. but i have a problem my local-host server refuse any code from direction neither index.php i don’t know the reason for that i can’t do another php file on my server .

thank u again … how can i solve that problem

0 votes

ugg

Thanks for your post, this really help me a lot!

0 votes

Bhavesh Patel

I know how to install wamp server. I install wamp server in pc and successfully install. wnen i start the ‘phpmyadmin’ in pc the browser open and open message the ‘The page cannot be found’ and also i start the localhost to run php programe that time ask me localhost ‘username and ‘password’ what i do to solve my problem.
And how to run first php programe in wamp server step by step.
pls reply me very fast step by step.

0 votes

Dave Drager

Tom,

After a site is completed on Wampserver, you can upload it to web hosting server. Usually the change is smooth, but in certain circumstances you may need to change the code slightly so that it works on the new server.

Each server is set up a little differently so thats something to keep in mind while you are coding.

Hope that helps!