Setting up your very own blog might sound a lot harder than it actually is. But with WordPress and DigitalOcean, I really can’t imagine how it could be much easier. In 10 short minutes you can be up and running with a fully operating WordPress blog or site.
Set up DigitalOcean
The first step is to get a DigitalOcean account if you don’t already have one. Sign up with this link and you’ll receive $10 of credit in your DigitalOcean account. That’s your first month of hosting for free!
Right, now that you’ve got your account and are logged in, navigate to the Droplets tab and find the big green Create button. Click that button and select Droplets (A droplet is basically just a server on DigitalOcean).
Now you should be on the Droplet creation page. Under Choose an image switch to the One-click apps tab.
And select the WordPress option.
Under Choose a size you can pick whichever you want from the available options. The $5/mo. tier isn’t available for WordPress apps unfortunately because it doesn’t have enough disk space for the WordPress software itself.
You can leave all the other options at their default setting and go head and click the big green Create button at the bottom of the page! It should take less than a minute for your droplet to finish being created. Once it’s done, your server is up and running with WordPress already installed!
If you navigate to your droplet’s provided IP address in your browser, you’ll get a web page asking that you “Please log into your droplet via SSH to enable your WordPress installation.” So let’s do that next.
Enabling your WordPress installation
If you have an SSH key setup on your DigitalOcean account and enabled on the droplet you just created, enabling WordPress is as simple as entering the following into a terminal on Linux or Mac (or use PuTTY on Windows).
Otherwise, there’s a little bit more you have to do.
If you’re on Linux/Mac open up a terminal and enter the command above (substituting in your droplet’s IP address). Your terminal may tell you that the authenticity of the host can’t be established, and you’ll be asked to verify that you want to connect. Just enter yes, it’s nothing to worry about.
Now you’ll be asked to supply a password. To find the password, check the email associated with your DigitalOcean account for an email from DigitalOcean containing the password. After you enter the password, it’ll take a few seconds and WordPress will be enabled! You can enter exit into the terminal or just close out of it.
If you’re on Windows, go to the Droplets tab on DigitalOcean and select More > Access console.
Inside the console enter root as the login. Next, check the email associated with your DigitalOcean account for an email from DigitalOcean containing the password to the root user on your droplet. Unfortunately, the browser console doesn’t allow pasting, so you’ll have to type out the password manually. Once you enter it, you be asked to enter it again—ugh—and then to supply a new password. Make sure you remember your new password.
After a few seconds, WordPress will be enabled and you can exit the console!
Alright, we’re almost there, I promise! Head back on over to your droplet’s IP address in your browser. You’ll now be greeted by the WordPress setup page. Just walk through the instructions provided and you should end up on the WordPress admin panel. (If not, just click the name of your site on the toolbar at the top of the page).
Customizing your site
The first thing you’ll probably want to do it pick out a theme for your site. To do this go to Appearance > Themes
And then click Add New near the top of the page. From here you can browse and search a bunch of free themes and pick whichever one you like. To use a theme you’ve found, just click Install and then Activate once it’s been installed.
From the New button at the top of the page you can create new media, posts, pages, and users. If you need help customizing your theme or installing and using plugins, there are plenty of resources online, but that’s beyond the scope of this article.
Hooking up a domain name
Currently you’re using an IP address to go to your site. Obviously, you’re going to want to use a domain name so others can access your site in an acceptable way. For this I’m going to assume that you have already purchased your own domain and have access to the DNS settings.
In order to point your domain name to your droplet’s IP address, you need to add an “A Record” to the domain’s DNS setting that specifies the IP the domain should point to. I’m going to be showing this process on namecheap, which is where I manage my domains, but if you use something else and are unable to follow these instructions, you can search online “How to add an A Record on [your domain provider]”
Navigate to DNS panel
From the namecheap dashboard, go to Domain List from the side menu and click manage next to the domain you want to set up.
Create A Record
Select the Advanced DNS tab and click on Add new record under the Host Records section. Make sure the record type is A Record, the host is @ (you may also want to create a second A Record with www as the host), and inside the Value field, insert the IP address of your DigitalOcean droplet. Click the green checkmark to save the record. You should now have something like this:
Congratulations! Once you’ve given the domain time to propagate (up to 24 hours, but a lot of the time less than 5 minutes or so) your WordPress site will be accessible from your domain!
That’s it for this post, folks. If you have any problems or questions, post them in the comments down below and I’ll see if I can help you out.