To start up a website you don't need to have a lot of technical knowledge or pay a monthly fee. If it is nothing serious and all you need is a small website that won't be visited by hundreds of users daily, the only thing you need to do is to make your Windows PC work as a web server.
Is it okay to start up your site?
You have zero limitations – you can make your website and host it on your personal computer without any worries because the whole thing is easy and fun. Keep in mind that if you want your site to be visible in the entire world, you might have to buy a hosting plan with a hosting company by your choice. Some companies will give you monthly host subscription for just under 4-5 dollars which are not that bad, especially if you want to host a small website with a couple of thousand visits per month. The whole hosting installation is easy enough – you can make it with just a few mouse clicks and then install a WordPress system for the base of your new site.
If you don’t like the idea of paying for hosting services and you still want to stick to the home hosting idea, to make your local site open for real visitors, you have to open the firewall on your computer, which means that you make your computer vulnerable to potential threats. You need to think over is worth it to get a cheap hosting plan like the one mentioned previously.
But if your intention is only to make a local server, then this article will show you how.
What is “WAMP”?
WAMP is an acronym that stands for “Windows, Apache, MySQL, and PHP.” Once you downloaded the WAMP, the package comes with a program that will install three different applications. WAMPs are preferred by many, as you set up the whole package at once and don't do each of them separately.
The "W" in WAMP stands for Windows, to notify that the program works with all the Windows operating systems.
The "A" stands for Apache, as this is the program you need to set your site. Apache is a web server that you can use to host all kind of static web content such as HTML files.
The "M" is the program MySQL that will provide the needed database for your web content. The program will store all the required data such as usernames and password for the accounts, your dynamic content or any CMS like WordPress that requires a database.
The last is PHP, which for now is the most popular language for writing dynamic web content. In fact, the biggest content management systems and websites such as Joomla, Drupal, and Wordpress use PHP. If your plans for the site is to have more than static web pages, then PHP is obligatory.
If you don't want to install any third party software, you can easily host your website using IIS on Windows. It is recommended for you to stick on the safe side and use WAMP, as IIS needs a lot of work to be settled process to support dynamic web content. IIS is a last resort that you can use if you can't install WAMP or you need it specifically for your project.
An important reminder – making a website on your personal computer and using a consumer type of internet connection that you normally use for everyday simple online tasks is not a good idea for hosting website. But if you only want to test some things or keep it up for only a few visitors, it will make the job done. Don’t take this home-hosted website seriously though, because it is not and it can be gone with a reinstall of the operating system on your computer and will go down with every restart or shut down.
You can find many WAMP programs out there, but to make things easier, use WampServer. You can download the application with its latest version from their official website. After you do this, continue with the installation.
Installing the server is easy enough, you just have to click Next and keep doing that, letting everything to its default value.
Make sure to add an exception to the security in the Windows Firewall for the Apache service – this is another essential thing.
When the whole installation process is over, before you hit the Finish button, check with the mouse a box that says “Start the server now.”
If everything is good, you will see in the notification area that the Wamp server is up and running.
To see your newly hosted website, perform click with the left mouse button on the program’s icon and choose “Localhost” which you can find at the top of the menu.
When you click on it, it will open the default web page that will give you brief information that will inform you that everything is working good. When you see this screen, you will be sure that the installation went okay and it is complete.
Some Quick Troubleshooting
After research, it is found that there are few packages from Microsoft that make the working process of WampServer complete game changer. If somehow, you found it difficult to this point, then check out you own the following updates installed, as after that you uninstall WampServer, restart your PC, and reinstall WampServer.
Further WAMP Configuration
Your job is not finished yet; you will have to configure the server by yourself. To make a change on your website, go to the www directory in your installation folder or if you don’t want to search it, just click the left button on the icon of the WAMP service and select it.
When you have prepared the files that you want to put on your website, the only thing you have to do is to bring them in the ‘www’ directory. You can place almost all kind of files, including HTML pages and even WordPress installation.
When you do that, just click refresh to see the changes take effect.
The next given an example will show you how to place certain content in the folder, to be served on your site. All you need to do is to create a basic PHP page using a web development program or something simple such as Notepad++, as after you do it, you can easily put it on your website.
A great start can be the following code:
<?php echo '<p>Hello World</p>'; ?>
Copy this code, as you paste it into Notepad. Save the file inside of C:\wamp\www, as you name it index.php.
If you want to see the newly created page, just refresh the website, as you hit [F5] while you are there.
By now, you have created your website, which is only accessible by your computer that has installed the WampServer.
People who have installed WAMP server on their computers also have access to the website. If you want to share your brand new website with everyone around the globe, you need to click on the WampServer icon and click “Put Online.”
Beware that if you expect some visitors to your website, which means that you don’t use the WAMP only for test purposes, you will have to configure the Apache service.
By default, it is on ‘Deny mode,' so it won’t accept any outside connections. You will be the only one that can see the website. To remove the ‘Deny mode’ you will have to change some code, or everybody will see error ‘403 Forbidden’ when try to reach the website. To make the changes open Apache configuration file – it is named ‘httpd.conf.' Scroll around it to find the following text code:
Order Deny, Allow
Deny from all
Once you spot it, delete it and replace it with, or directly rewrite it that way:
Order Allow, Deny
Allow from all
When you do the job, don’t forget to save the newly made changes and then restart the services so that the changes can take immediate effect.
And there you go, that was the last step in creating your host and website on your personal computer. The best thing is that if you are running your server, the site will be accessible from the whole world via the web. And if you have a router, don’t forget to check the forwarding on the 80 port.