Today we’ll learn how to install and configure WordPress in a cloud hosting service called DigitalOcean. This is the first of three ways to install WordPress in the cloud.
The 411 on DigitalOcean
DigitalOcean is the coolest kid on the cloud-computing block. Opening its doors in 2011, it soon became one of the largest cloud hosting providers with over a million users. The key factor to DigitalOcean’s stupendous success is its simplicity.
Keep it simple, bub!
The basic unit of computing power is called a server. DigitalOcean prefers to call its servers as “droplets”. Like you know… drops of an ocean?
It’s actually a clever name, really. Think about it – the smallest unit (figuratively speaking), is a droplet. Add or remove as many droplets as you require – that’s entirely dependent on your thirst.
Awesome Features of DigitalOcean
In addition to being a clean and simple option, there is lots more to love DigitalOcean for your WordPress site. Here are six main reasons why we find DigitalOcean to be awesome:
Reason #1 – Highly Affordable
Three characteristics make DigitalOcean highly affordable.
- Pay-per-hour usage
- No minimum period of hiring
- No setup fee (even for large setups)
- Plans start at $0.0007 cents an hour
Plans start at less than a penny per hour
The minimum size of a droplet has:
- 512 MB of RAM
- 5GB of SSD storage space (SSDs are about 10x faster than traditional hard disks)
- 1TB of bandwidth (that’s really generous)
- 1 unit of CPU power
- Price: $0.007/hour which is roughly $5 a month – 60 bucks a year!
Reason #2 – Dynamic Resizing
With DigitalOcean, you can dynamically scale or resize your droplet – remember we talked about it in Introduction to Cloud Computing with WordPress? Whenever you need some extra juice, resizing a droplet as easy as twisting a knob to increase the volume!
Reason #3 – Epic Community and Knowledgebase
DigitalOcean has a plethora of tutorials on virtually any OS, any software and any (hosting related) topic! The best part – it’s meticulously tested on their droplets in order to ensure it works on your droplet as well!
Reason #4 – Trusted by the Best Developers
Reason #5 – Automatic 1-Click Installer for WordPress
DigitalOcean has a sweet ready-made image for WordPress and a plethora of other open-source software, which makes it an invaluable asset. With a few clicks (you’ll see how) we’ll be able to create steady working installation of WordPress in no time.
Awesome UI Screenshots:
Seeing is believing. Here’s some screenshots of DigitalOcean’s brilliant user interface.
- The Login Screen – Clean and simple
- The Control Panel – A Bird’s Eye View of your Droplets
- The Snapshots Panel (Advanced) – All your Backups in One Place
- Support Panel – Minimal yet Brilliantly Effective
How to Configure a DigitalOcean Droplet for WordPress
Prerequisite: Once you’ve signed up for DigitalOcean, you need update your contact information and transfer some money to your DigitalOcean account. Think of it as a prepaid phone. You can use PayPal or credit card to recharge your account. Now we are ready to create our WordPress droplet.
#1 – Creating the Droplet
Select Create Droplet
The Droplet Hostname can be an alphanumeric sequence of character. I’ve tried to avoid spaces and substituted them with dashes for simplicity.
Under Select Size, select the $5/mo plan is sufficient for starters. If you’re upgrading from a shared hosting environment, go for the $20/mo plan. Of course, you won’t have to worry about switching, thanks DigitalOcean’s dynamic resizing capability.
The region determines the physical location of your VPS. Primarily, the choice of region should be determined by the geographic location of your target audience. In other words, pick the location nearest to your target audience’s home.
For example, if our target audience is in India, I’d go for DigitalOcean’s datacentre in Singapore, since it’s the closest to India from all the options we have. A small distance equals lower latency, which gives your audience a faster website.
Scroll down to the Select Image section where you’ll find the choice of Operating System. Select Ubuntu 14.04 x64. If you’re comfortable with another OS, you’re most welcome to try it. Since Ubuntu is one of the most user-friendly distributions of Linux, we’ll stick to that!
Next, we select the Applications tab, followed by WordPress on 14.04. This is the one-click WordPress auto-installer we were talking about. So far, we’ve configured our droplet. Now let’s move on to installing it.
Installation is just a click of a button. Scroll to the bottom of the page and click that big green Create Droplet button.
DigitalOcean will not create the droplet, which approximately takes about 30-40 seconds. After the droplet is created, copy the IP address. This concludes the first part of the tutorial.
#2 – Add a Hostname to Droplet (Optional)
Once the droplet is created, an email will be sent to your registered email address with the login information. The default username is root and the password will be the one in your email.
You might want to configure a domain name to your new droplet. In order to do this, you’ll need to login to your domain provider’s control panel and configure an A Record. An A Record simply maps an IP to a hostname.
Say we buy a domain called copyroll.com.
- Now, we can open our site using copyroll.com or simply copyroll.com. The important point is, in both this cases, we’re using the root domain.
- A subdomain would be something like copyroll.com. In order to map a DigitalOcean droplet to a subdomain, we’ll need to create an A record for the subdomain.
In our example, we’ve decided to use a subdomain. Both of the above topics can be done from any standard domain provider.
- In case you’re adding an A record for the root domain, simply add the IP address. In our example, that’s 126.96.36.199. This IP will be different for the droplet you’ll create.
- In case you want to configure the A record for a subdomain, you’ll have to add both the subdomain name and the corresponding IP address. Subdomain names contain alphanumeric characters and dashes ‘-’.
If you’re having trouble setting this up, you can always contact your domain name provider. Next up, we’ll have to add the name of the subdomain to our newly created droplet.
- To do this, head over to the DNS
- In the leftmost textbox (which now contains com), enter the name of your domain or subdomain.
- From the Select a Droplet dropdown menu, select the newly created droplet. (We have to identify the droplet using the hostname we picked earlier).
- Click Create a Domain
That’s it – you’ve mapped your newly created droplet to your domain.
Troubleshooting: If the domain doesn’t work, wait for a maximum of 6-7 hours. Host providers say that it takes 24-48 hours for DNS propagation. But if it’s done correctly, it usually takes a few hours.
#3 – Logging in to SSH
Now, we will have to login to the server via SSH (Secure Shell Access). In simple terms, SSH is a secure way of gaining remote access to your server. Any text you type in the SSH terminal will be reflected in the remote computer. Text can be plaintext or commands. But hey – we don’t want to get involved in SSH too much now, do we? 😉
Check your email and get the root password.
You will need to change the root password the very first time you login to SSH. We’ll use a free open-source software called Putty to connect to our server via SSH.
Enter the IP address (or the domain name) of your droplet under Host Name
Make sure the Connection Type is set to SSH
Click Open to establish the connection.
You’ll be prompted with a security alert. Don’t worry – it’s basic SSH procedure. Select Yes.
Enter your login details and change the password as directed.
This step is very important. DigitalOcean protects the WordPress admin directory (wp-admin) using .htaccess protection. The username and password is displayed in the SSH terminal every time you log in.
Refer the above screenshot for example. You’ll need to copy the username and password as shown. (Use Ctrl+Shift+C to copy text from the terminal). This marks the end of the third part.
#4 – Installing WordPress in Droplet – The Homerun
Once the droplet is created with WordPress pre-installed, we’ll still have to configure the first installation steps – the famous five minute install! (Well, it only takes about a minute if you’ve done it before).
Enter the IP address or the hostname in your browser and you’ll be greeted with the following password prompt:
Copy-paste the login details from Step #15 and click the Log In button.
We’ve now entered the familiar WordPress installer. Select your desired language and click Continue.
In this step, enter the necessary information. We’ve disabled search engine ranking since this is an experimental setup. Also, remember not to use Admin as a username. Click Install WordPress.
Boom! Installation complete. Click on Log In to proceed.
Enter the details in the login form and… kablam!
Say hello to your beautiful WordPress intallation!
DigitalOcean For Beginners (Another Cloud Option)
Remember when we did our Cloudways hosting review a while back? Well one of the cool features that Cloudways offers is the option to choose your cloud, and one of the choices is DigitalOcean! Since Cloudways does all the heavy lifting for you, you can just point click and get started hosting your website so you can had all the awesome benefits of cloud hosting with DigitalOcean minus the setup. This a great option for newbies or for people who don’t want to dig into the technical aspect of setting up cloud hosting.
DigitalOcean is one of the pioneers in affordable cloud hosting technology for the masses. For 0.7 cents an hour, anyone can experience the power of the cloud. Powered by intuitive design, user-centric guides and robust features, DigitalOcean is changing the face of cloud hosting – one droplet at a time.
Have you tried DigitalOcean yet? We’d love to hear the story of your droplet!