Do you know that you don’t actually need a Hosting provider to host your WordPress website? Yes, it’s possible.
Not just WordPress, you can create any type of website for Free, and host it manually from your own PC.
So, in this tutorial we’ll be creating a WordPress website and instead of choosing a Hosting Provider, we’ll host it on our own PC.
This method will work on Ubuntu, Debian, and Mac OS.
Step 1 – Getting a Static IP address (optional)
This step is not compulsory, but it is recommended if you want to make sure your website runs hassle free and without any downtime.
A IP address is where your Domain name will point to. Now, if you are hosting your website from your own PC, then every time you Turn off or Reset your Internet connection, your IP address will change and your website will show “502 Error“.
That’s why you need a Static IP address that doesn’t change when you turn off your Internet connection.
However, if you don’t want a Static IP address, then you’ll need to keep your Internet connection ON 24/7, to make sure your IP address doesn’t change. If you’re okay with this, then go ahead to Step 2 without a Static IP.
How to get a Static IP?
There are 2 ways to get a static IP address:
- Ask your ISP provider to issue you a Static IP address.
- Buy a VPN service – This is the easiest way to get a Static IP address, just buy any cheap VPN that has Static IP address feature (like: Nord, Cyberghost) and buy Static IP plan.
Step 2 – Getting a Domain Name
A domain name is required if you want your website accessible by the Public. You can either buy a Domain name from GoDaddy, Namecheap or you can grab a free Domain from Freenom.
Step 2.1 – Point your Domain to your IP address.
In this step, you have to point your Domain to your PC’s IP address.
For that, you will need to create an A record on your Domain registrar Account.
Below I am sharing links on how to set up an A record on different domain registrars:
Once, you have figured out how to create an A record with your Domain Registrar, go ahead and create an A record in the following format:
|@||<your IP address here>||auto|
Now, if you’re using Static IP issued by your VPN provider. Then you have to enter that IP address in the Host field. And Remember to keep your PC connected to the VPN at all times.
If you are using the normal (non-static) or Static IP address from your ISP provider, then you need to find your IPv4 address first. It’s pretty easy, just go to whatismyipaddress.com and copy your IPv4 address, and enter this IP address in the Host field.
Now, your domain is pointed to your PC, and we can continue with our WordPress deployment process.
Step 3 – Install EasyEngine
EasyEngine is an amazing tool that lets you install and host any application (WordPress, Joomla, Magento, etc.) on your PC.
On Linux (Ubuntu, Debian):
To install EasyEngine, open Terminal and type the below command, and hit Enter.
wget -qO ee https://rt.cx/ee4 && sudo bash ee
First install Brew by pasting the below command in terminal:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Once the process is finished, paste this 2nd command to install EasyEngine:
brew install easyengine
Now, EasyEngine will take some time to complete the installation.
Step 4 – Install WordPress
Once EasyEngine is installed, paste the below command to install WordPress and hit Enter again.
sudo ee site create yourdomain.com --wp --letsencrypt
Replace <yourdomain.com> with your actual Domain name.
Now, EasyEngine will start creating the WordPress website for you, once the website creation is complete, it will display your WP username and password.
That’s it, your WordPress website is created, you can now go to yourdomain.com/wp-admin and log in with your credentials.
Now, as you have your WordPress website set up, you can customize it in any way you want. EasyEngine offers automatic renewal of your Letsencrypt SSL certificate, so you don’t have to worry about that.
Your website will be live as long as you have an active Internet Connection (which is obvious).
To change the username and password, simply create a New User from WP Dashboard > Users > Add new, and delete the existing user.
EasyEngine also has a very helpful community to support you, if you face any problems.
Want to read another amazing tutorial? Read this tutorial on How to Host your website on your Android Phone.