WordPress is arguably one of the most popular Content Management System (CMS) available free of cost. You don’t need to be a professional coder to start your first blog.
In this particular post, will help you to host a blog using DigitalOcean. As you know, DigitalOcean is a cloud-based hosting provider and offers Infrastructure as a Service (IaaS) for software developers.
Before heading over to launch your WordPress blog. I assume that you already have bought a domain from domain name registrars such as Namecheap, GoDaddy, or any of them.
Now, let’s learn to deploy an application (especially WordPress) in DigitalOcean using the following 5 easy steps.
Sign Up in DigitalOcean and Setup DNS
The first step is to sign-up in DigitalOcean. For this tutorial, I am using Namecheap to buy the domain and later point it to DigitalOcean DNS.
Click the domain you would like to host. Under the Nameserver section, choose Custom DNS from the dropdown menu and enter the following nameservers:
Create a Droplet
Droplet is a Linux based virtual machines (VMs) that operate on top of virtual hardware. In simple words, think each droplet as a server where you will host your website.
Follow this steps to create a droplet:
- Choose a starter standard plan ($5 per month)
- Leave as it for volume storage
- Choose a datacenter region based on your nearest location
- Leave it to default for VPC network, additional options
- In authentication, you can simply choose to create a root a password and enter your DigitalOcean password (for security purposes, would recommend you to set up SSH)
- Deploy a single droplet and write a hostname (your blog name)
- Lastly, tap on create a droplet button
To get started, you can simply start with a standard option – $5 per month. It will be more than enough. In the next step, we will install WordPress in a droplet.
If you want to know more about Droplet in detail then Click Here.
Install OpenLiteSpeed WordPress Image in Droplet
After clicking the create option, you will need to head over to the search bar and type OpenLiteSpeed WordPress. The reason why I choose this image is that it helps to install OpenLiteSpeed, MariaDB, and WordPress with just one click.
On top of that, it has a built-in cache module which helps to load the site faster and boosts the overall web performance.
Connect to Droplet as Root
To connect a recently installed droplet, open your terminal on Mac or Linux.
- Type ssh root@your_droplet_ip (Droplet’s IP address after the @)
- Press Enter and type DigitalOcean password
- Enter a domain (your_domain.com) and verify it
- You will ask to issue a Let’s Encrypt SSL Certificate. Type y
- Enter your email address and verify it
- Next step it will ask to force HTTPS rewrite rule. Type y
You have successfully completed connecting a droplet using the terminal. For Windows users, follow the link to connect a droplet.
Open the Google Chrome browser and type your domain. You will now have to install WordPress. Select your preferred language and proceed to the next step.
- Type Site Title, it can be your blog name
- Enter username and password to login in your site
- Write your email address
- Since, you haven’t launched a website. Leave search engine visibility checkbox unchecked
- Install WordPress
After a few minutes of installation, you will see the WordPress login screen. Enter your username and password.
Congratulations, you have successfully hosted a WordPress site on DigitalOcean.
Start writing a post on your blog. Let me know if you face any issues while hosting a WordPress Blog.