Today, in this article, we show how to Host a website from PC/Laptop. With the help of web hosting, companies and individuals can make their websites available on the Internet. A web host offers the facilities and services necessary for a website to work online.
You must spend money on your own domain name and web hosting if you want to launch a website. Have a website hosted on your computer or laptop it can be fascinating. Choose this only if you want a local development server, it is advisable. The main requirement for hosting a website on your Windows OS is a WAMP server.
The abbreviation WAMP stands for Windows, Apache, MySQL and PHP. Therefore, a WAMP server simultaneously installs three separate applications. As they allow you to download and install all the essential software to host any web content, these servers are considered highly convenient. We have mentioned below the steps to host a website from PC/Laptop.
Steps to Host a PC/WebsiteLaptop
Step 1: Update and update packages
sudo apt update && sudo apt upgrade –y
Step 2: install apache
sudo apt install apache2
systemctl status apache2
Step 3: Install MySQL server
sudo apt install MariaDB-server MariaDB-client
sudo mysql_secure_installation
Step 4: install PHP
sudo apt install PHP PHP-MySQL
sudo nano /var/www/html/test.php
Step 5: Create a MySQL Database and User
sudo MySQL -u root -p
CREATE DATABASE mysite;CREATE USER ‘ravi’@’localhost’ IDENTIFIED BY ‘YourPassword’;GRANT EVERYTHING ON mysite.* TO ‘ravi’@’localhost’ IDENTIFIED BY ‘YourPassword’;RELEASE PRIVILEGES;EXIT;
Step 6: Download and configure WordPress
cd /var/www/html/sudo wget “
sudo tar xf latest.tar.gz
sudo chown -R www-data:www-data /var/www/html/wordpress
Step 7: Download and install the Cloudflared service
sudo wget
sudo dpkg –I cloudflared-linux-amd64.deb
Step 8: I create Cloudflared Tunnel and Enable HTTPS
Cloudflared Tunnel Login
Cloudflared tunnel create mysite
sudo nano ~/.cloudflared/config.yml
tunnel: a2efc6dg1-2c75-45f8-b529d3eecredentials-file:/home/pi/.cloudflared/ a2efc6dg1-2c75-45f8-b529d3ee.jsoningress:– hostname: YourDomain.comservice: service: http_status:404
cloudflared DNS tunnel route
Cloudflared tunnel run mysite
Final Words
We hope you like our article about how to Host a website for free from your PC and Laptop. Making decisions is a big part of starting a new website, including hosting. Figuring out how to Hosting a website can easily become difficult and daunting if you are new to website ownership. Fortunately, if you’re aware of your alternatives, figuring out what kind of hosting your site requires is a pretty straightforward process. Knowing the fundamentals should allow you to choose the type of hosting that will work best for you and your audience and make wise judgments.