How to Install & Configure WordPress in DigitalOcean

Post Series: Installing WordPress in the Cloud
  1. 1.Introduction to Cloud Computing with WordPress
  2. 2.How to Install & Configure WordPress in DigitalOcean
  3. 3.How to Install WordPress in Microsoft Azure
  4. 4.How To Install WordPress on Google Cloud
  5. 5.How To Install WordPress in AWS – Amazon Web Services
  6. 6.How to Install WordPress Manually On Any Web Host

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-review-hero

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

digitalocean-review-pricing

Three characteristics make DigitalOcean highly affordable.

  1. Pay-per-hour usage
  2. No minimum period of hiring
  3. No setup fee (even for large setups)
  4. 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-review-tutorials

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

digitalocean-review-customer-base

John Resig, creator of jQuery (one of the best JavaScript frameworks), Salvatore Sanfilippo, creator of Redis, and the co-founder of StackExchange, Jeff Atwood – all use DigitalOcean for their projects.

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.

  1. The Login Screen – Clean and simple

ui-digitalocean-review-01-login

  1. The Control Panel – A Bird’s Eye View of your Droplets

ui-digitalocean-review-05-droplet

  1. The Snapshots Panel (Advanced) – All your Backups in One Place

ui-digitalocean-review-03-images-snapshots-backup

  1. Support Panel – Minimal yet Brilliantly Effective

ui-digitalocean-review-04-support-panel

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

ui-digitalocean-review-02-create-droplet

Step #1
Select Create Droplet

Step #2
The Droplet Hostname can be an alphanumeric sequence of character. I’ve tried to avoid spaces and substituted them with dashes for simplicity.

install-wordpress-digitalocean-1-choose-size

Step #3
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.

install-wordpress-digitalocean-2-select-region

Step #4
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.

install-wordpress-digitalocean-4-select-apps-tab

Step #5
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!

install-wordpress-digitalocean-4-select-wp

Step #6
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.

install-wordpress-digitalocean-4-create-droplet

Step #7
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.

install-wordpress-digitalocean-6-droplet-created

#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.

  1. In case you’re adding an A record for the root domain, simply add the IP address. In our example, that’s 43.55.232.153. This IP will be different for the droplet you’ll create.
  2. 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? 😉

Step #8
Check your email and get the root password.

Step #9
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.

Download Putty

install-wordpress-digitalocean-8-login-ssh-1

Step #10
Enter the IP address (or the domain name) of your droplet under Host Name

Step #11
Make sure the Connection Type is set to SSH

Step #12
Click Open to establish the connection.

install-wordpress-digitalocean-8-login-ssh-2

Step #13
You’ll be prompted with a security alert. Don’t worry – it’s basic SSH procedure. Select Yes.

install-wordpress-digitalocean-8-login-ssh-3

Step #14
Enter your login details and change the password as directed.

Step #15
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.

install-wordpress-digitalocean-8-login-ssh-4

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).

Step #16
Enter the IP address or the hostname in your browser and you’ll be greeted with the following password prompt:

install-wordpress-digitalocean-9-0-enter-auth-info

Copy-paste the login details from Step #15 and click the Log In button.

install-wordpress-digitalocean-9-1

Step #17
We’ve now entered the familiar WordPress installer. Select your desired language and click Continue.

install-wordpress-digitalocean-9-2

Step #18
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.

install-wordpress-digitalocean-9-3

Step #19
Boom! Installation complete. Click on Log In to proceed.

install-wordpress-digitalocean-9-4

Step #20
Enter the details in the login form and… kablam!

install-wordpress-digitalocean-9-5-success

Say hello to your beautiful WordPress intallation!

install-wordpress-digitalocean-9-6-frontend

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.

Learn More About Cloudways & DigitalOcean

Conclusion

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.

Experience the Cloud Now!

Have you tried DigitalOcean yet? We’d love to hear the story of your droplet!

Sourav
Post Author: Sourav

Sourav is a WordPress enthusiast, an avid gamer and a sitcom collector. His playlists include heavy metal, electronic, and new-age tracks. When he's not online, he's spending quality time with his friends and family. You can follow him on Twitter.

Disclosure: This page contains external affiliate links that may result in us receiving a comission if you choose to purchase said product. The opinions on this page are our own. We do not receive payment for positive reviews.
Got something to say? Join the discussion.
  1. Tony Kaspin says:
    Thanks for the article! I've always wanted to try using Digital Ocean but never got the time to. One question, how do you remove the password that's protecting the website? Is it as simple as going into the .htaccess using the "sudo nano" command and removing it?
    • Sourav
      Hi Tony, Glad you like the article. You should definitely try out DO - just for the fun of it. I would strongly recommend you to not remove the added layer of .htaccess security. However, I think that's the right way to do it, although you should open a support ticket on this regard. Thanks Sourav
      Author
  2. djsylvester says:
    Very helpful for those not up on Digital Ocean. Thanks. You need to make one correction under Reason #1 - "Three characteristics make DigitalOcean highly affordable." Point 4 states "Plans start at 7 cents an hour" but 3 decimal places ($0.007) is 7/10ths of 1 cent. At 7 cents per hour you'd almost be at the most expensive choice of $80/month.
  3. Justin Samuel says:
    Hi Sourav, You might want to take a quick look at ServerPilot to see if it's something you'd recommend. We've recently added a WordPress installer, so you can now get the server management benefits of ServerPilot on your DigitalOcean servers while still having one-click WordPress hosting. Our goal is to make WordPress hosting on DigitalOcean even easier than using shared hosting. I think with our new installers we've finally achieved that. I'm curious to know what you think. Thanks, Justin
  4. A note: Digital Ocean required me to select the $10/month tier in order to select Wordpress under Applications. I'm not sure if this changed since this article, but I thought I'd point that out.
  5. After installing the wp, there is some folder/files permission related issue. If you are very new to wp and VPS i would suggest you to practice a little bit before lunch your site. It'll not cost you more than 5$ for one month in Digital Ocean.
  6. If you want to start from $5 for install WordPress (DigitalOcean Auto setup force to choose $10) Then can use ServerPilot instead. Them service auto setup the whole package for you and it just Free! Thank you very much for ServerPilot
  7. Sravan Kumar says:
    Wordpress customization is possible with One-Click Installs for WordPress? Like our own themes, access to theme files to modify the PHP files as per our needs etc.? and can we add our own custom plugins?
  8. I would like to say great effort you did by writing this article, It will help people those are not familiar with digitalocean to choose the best Cloud service provider.
  9. very nice and easy steps
  10. It is very clear but I believe that if you use serverpilot in the setting up the wordpress on digital ocean, it will much better for new guy who doesn't have any technical knowledge one like here
  11. I AM using vestacp or serverpilot for install wordpress in digitalocean. It is good to make cpanel. By this server management is become easy.
  12. WPWebHost says:
    DigitalOcean no doubts have been the most recommended providers for developers that looking to scale their resources when needed. But depending on your sysadmin skill, it may not always be the best options. Yes - if you know how to manage your Droplet (VPS) aside from the WordPress GUI. This include some of the server admin works. While ServerPilot would be the alternative solution for this, your total cost for a WordPress hosting would have been on the high side. No - if you have zero sysadmin skill as you will have problems to troubleshoot your web server when your WordPress website is down. That will cause you lots more to loose if your WordPress website is generating a tremendous traffic. What if your WordPress website is being hacked? Alternatively, you can look for a fully Managed WordPress hosting provider that cost you less than $10/mo and get most of the job done. We have posted an analysis on this at wpwebhost[dot]com/wordpress-resources/should-i-choose-digital-ocean-to-host-my-wordpress

Leave a Reply