Hosting a website sounds like something only a tech expert could do. Believe it or not, it’s not that difficult. As you can choose between simple template websites to hand-programming each line of code on your site, so too do you have a wide range of hosting options.
Be aware, there are some serious performance and security differences between self-hosting and using a reliable hosting provider. But, if you want to run something simple like a blog and not an eCommerce empire, then self-hosting your site might be the best option for you. And you can use your old computer for it.
Follow these steps to set up your server in no time.
Table of Contents
The Basics: Setting Up a WAMP Server
WAMP stands for Windows, Apache, MySQL, and PHP. These are different applications useful in setting up your server. With them, you can download and install all the packages needed for hosting a variety of different content types.
- Windows: Uses the compatible AMP application with Windows devices. Linux platforms will have LAMP.
- Apache: Core software for performing hosting. Apache hosts HTML files and other static web documents needed for your home server.
- MySQL: The database that contains your web content. Web pages will need to store different types of data, like usernames and passwords, periodically.
- PHP: The most widely used language for programming web pages. Sites like Facebook and WordPress use PHP code.
Don’t worry if some of this sounds like a foreign language to you. You don’t need a perfect grasp of all these things to set up your site. But a little familiarity will go a long way to make the setup process smoother.
Step 1: Installing WAMP Software
Download the latest version of WampServer choosing either 32 or 64-bit depending on what version of Windows you have. The file will come packaged with Apache, MySQL, and PHP.
Follow the installation prompts and click “next” to maintain default settings. Then select your browser so your web server will use it by default.
During the installation process, Windows Firewall may reject some changes. You’ll need to allow these if you receive any security alert pop-ups. Hit “Start WampServer Now” before clicking finish.
Step 2: Using the WAMP Server
During installation, the software will create a directory for your site that you can find at (c:\\wamp\\www). From here, you may also want to create subdirectories (projects) for other pages on your site.
These are good places to store PHP and HTML files. For example, if you use WordPress, you can save files in these directories. Make sure you update all changes as you go to track progress.
Step 3: Create a Web Page Using HTML or PHP
Now you’re ready to create a page. You can use Notepad or another web development program to create simple pages. When you’re done, save as “name” with the extension “name.php” (e.g., blog1.php).
Select WAMP as the save destination of the file. Once you return to the Web Server, click update, and you’ll see the changes in the directory. You can also test it by using your web browser to visit:
http://localhost/name.php
Step 4: MySQL Database
At the same time, you can start using the MySQL database into WAMP menu options. If you use CMS software like WordPress, it will provide this information by default.
For now, leave the password field empty in your MySQL database until you are ready to launch the site.
Step 5: Making Your Site Visible
Right now, your site is only accessible to you. It is an excellent time to test it out and get things organized. Once you’re ready to show your website off to the world, hit the “Put Online” button, which you can find when you click the WampServer icon.
Note some Space settings may deny outside connections. People who click these URLs or links will receive a “403 Forbidden” message. To fix this, you’ll need to change two lines of code:
- In the WampServer menu, find the httpd.conf file.
- Scroll down until you see this text:
Order Deny, Allow
Deny from all
- Delete and replace with:
Order Allow, Deny
Allow from all
- Restart all web server services. Change PC firewall settings to allow web requests and forward Port 80 on your PC to your router.
Final Remarks
Before you go live, it’s best to test your site extensively. You may also want to do a soft-launch with friends to see how well your server can handle requests.
Even if you don’t plan on having too many users, website security will be a significant challenge for you. It’s best to use a VPN at all times, not only while running your server but other connected devices on your network. What is a VPN (https://nordvpn.com/what-is-a-vpn/)? A VPN stands for a virtual private network. It works by encrypting your internet connection to keep hackers and other bad guys out. Using a VPN is the easiest way to secure your connection to your home server.
Don’t wait any longer. Use these tips to start building your site now.