Skip to main content
WordPress made easy with the drag & drop Total WordPress Theme!Learn More

How to Install WordPress in DigitalOcean

Last updated on:
How to Install WordPress in DigitalOcean
  1. 1. Introduction to Cloud Computing with WordPress
  2. 2. Currently Reading: How to Install WordPress in DigitalOcean
  3. 3. How to Install WordPress in Microsoft Azure
  4. 4. How to Install WordPress on the Google Cloud
  5. 5. Install WordPress in AWS – Amazon Web Services

DigitalOcean is one of the fastest growing cloud hosting companies in the globe that focuses on simplicity and scale. Today we’re going to learn how to install and configure WordPress on DigitalOcean.

Why We Love DigitalOcean

Opening its doors in 2011, it soon became one of the largest cloud hosting providers with over a million users. DigitalOcean servers are known as Droplets – the smallest unit of a cloud server that you can buy starting at $5/month.

The key factor to DigitalOcean’s stupendous success is its simplicity. In addition to being a clean and simple option, there is lots more to love DigitalOcean for your WordPress site. Here are five reasons why we find DigitalOcean to be awesome.

Note: This is an optional section, you can skip it and jump right into the next section to install WordPress in DigitalOcean.

Competitive, Affordable Pricing

digitalocean pricing $5 vps droplets

DigitalOcean Pricing (September 2018)

DigitalOcean has one of the lowest pricing points in the cloud hosting industry. You can get started with your own server for as little as $5/month.

Three characteristics make DigitalOcean highly affordable.

  1. Pay-per-hour usage
  2. No minimum period of renting
  3. No setup fee (even for large setups)
  4. Plans start at $0.0007/hour
DigitalOcean's droplets start as low as $5/month!

The $5/month droplet comes with:

  • 1GB of RAM
  • 25GB of SSD storage space (SSDs are about 10x faster than traditional hard disks)
  • 1TB of bandwidth (that’s really generous)
  • 1 unit of vCPU (virtual CPU) power
  • Price: $0.007/hour which is roughly $60/year!

Automatic 1-Click Installer for WordPress

one-press wordpress install from digitalocean

1-Click WordPress Install offered by DigitalOcean

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.

Epic Community and Knowledgebase

digitalocean's community focused approach

DigitalOcean’s community-focused approach to winning customers

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!

Apart from tutorials, you also have active Q&A forums and interesting community projects.

Dynamic Resizing

With DigitalOcean, you can dynamically 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!

Trusted by the Best Developers


Developers love DigitalOcean

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.

Installing WordPress on DigitalOcean

Prerequisite: Once you’ve signed up for DigitalOcean, you need update your contact information and transfer some money (around $5) to your DigitalOcean account to create your first droplet. 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.

DigitalOcean User Account Organization: What are Projects?

creating a project in digitalocean

Projects are a basic unit of organization in your DigitalOcean account. Each project can have multiple droplets and other features (such as load balancers and object storage) that DigitalOcean has to offer. A single DigitalOcean account can have multiple projects.

We start by creating our first DigitalOcean project. Select a project name, description, project purpose and environment. An environment can be either Development, Staging or Production. For our tutorial, we’ve chosen the options as shown in the screenshot above.

Since DigitalOcean is a developer focused cloud hosting platform, they have these additional options that go a long way in helping developers organize their projects.

How to Create WordPress Droplet in DigitalOcean

Once you’ve created a project, you can now create a droplet.

create a new droplet in digitalocean in wordpress

Step 1: We start off by creating a droplet inside the WPExplorer project.

droplet os

Step 2: Select Ubuntu as your droplet’s OS and then select the One-click apps tab.

wordpress one-click image droplet in digitalocean

Step 3: Select WordPress on 18.04. This means that DigitalOcean is going to automatically install WordPress on Ubuntu 18.04.

backup and block storage options

Note – You can additionally add backups to your Droplet. However, this is not important to us since this is a tutorial. Also, this should not be confused with WordPress backups. A droplet backup are automatic system-level backups, which mean they copy everything in the OS (and not just WordPress).

Datacenter location (and additional) options in a DigitalOcean droplet

Step 4: DigitalOcean droplets can be deployed across 8 different datacenters. Since I’m located in India, I’ve selected Bangalore. It is optional to select the additional options (such as private network, IPv6, etc.) and an SSH key. Since we’re here to only install WordPress, these features won’t be necessary. However feel free to try them out in your DigitalOcean account!

creating a digitalocean droplet

Step 5: As you can see, the default project, i.e. WPExplorer is automatically selected. Enter a hostname (this is for you to remember internally) and click on Create to start creating your droplet.

digitalocean droplet ready

DigitalOcean droplet is ready!

Step 6: Once the droplet is created, you’ll see message similar to the screenshot above.

digitalocean droplet email

You should also receive a similar email in your registered DigitalOcean email account.

Logging into DigitalOcean droplet via SSH Console

It’s almost time for the famous 5 minute WordPress install. Only this time we’re going to be done within 2 minutes. We already have the IP address that we can use to login to the WordPress server. However, we need to login to our DigitalOcean droplet via SSH for a first-time configuration.

An un-configured WordPress droplet in DigitalOcean

Unless we do that, we’re going to see a message like this when we enter the IP address in our browser. You can login to your DigitalOcean droplet via SSH using Putty in Windows or Terminal in Mac. However, DigitalOcean has an even simpler way to do this, as shown below:

ssh access droplet via console

First, from you DigitalOcean dashboard, select your droplet, and then select the Access tab from the left menu. Click on Launch Console to access your droplet via SSH using your web browser.

droplet ssh access

Next, enter your username (root) and password that was emailed to you earlier. You’ll be immediately asked to create a new password for the root user account. Once you’ve reset the root password, you should see a message similar to the one above.

That’s it. We’re now ready for the famous 2-minute WordPress install!

Configuring WordPress installation on DigitalOcean

So far we’ve:

  • Created a new DigitalOcean droplet with Ubuntu and WordPress pre-installed; and
  • Logged into the droplet via SSH (using DigitalOcean’s built-in console access).

Now we need to do the final steps to get our WordPress site ready.

installing wordpress in digitalocean 1/2

Enter the IP address in your browser, and you should be greeted with the famous install screen.

installing wordpress in digitalocean 2/2

Now select a username, password and email address. The database configuration has been pre-configured by DigitalOcean. You might also want to turn off search engine visibility, if you’re testing a site. Only thing is, you should enable it once your site is ready.

Click on Install WordPress and let the magic happen.

installing wordpress in digitalocean

And there you have it – WordPress is ready.

installing wordpress in digitalocean successful

This marks the end of our basic tutorial.

Bonus: 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 makes Cloudways a great option for newbies or for people who don’t want to dig into the technical aspect of setting up cloud hosting.

Advanced WordPress configuration in DigitalOcean

Having a WordPress site in DigitalOcean is great. However, it won’t do much good if your WordPress site’s URL is an IP address. We need to link it to a domain name. Also, encrypted websites are the norm today, so we’re going to learn how to install an HTTPS certificate in our WordPress droplet.

Here’s a round-up of what we’ll be covering in our advanced WordPress configuration section:

  • Configure a domain name to your WordPress site
  • Install HTTPS for WordPress in your DigitalOcean droplet.

Configuring a domain name to your DigitalOcean WordPress droplet

In order to configure your WordPress URL, you need to:

  • Add an “A record” pointing to your droplet’s IP address and
  • Change the site URL from the WordPress admin dashboard.

It’s a two part process that needs to be done sequentially.

Part 1: Adding an A record to your domain:

This part mostly depends on your hosting provider. You should refer your hosts documentation on adding A records to your DNS. Or simply Google “how to add a record in <your domain provider>” You should get specific instructions.

If your host comes with cPanel (most shared web hosts do), we’ve got a tutorial for you right here:

cpanel dashboard in a shared host

Step 1: Login to your cPanel account and select Zone Editor. You can also use the search function in cPanel to quickly locate this tool.

adding a record in dns 1/2

Step 2: Click on + A Record to add a new A record.

 adding a record dns

Step 3: Let’s assume your domain name is and you want to point it to your new DigitalOcean droplet. In this case, you need to add two A records in your DNS Zone editor. The first one is for and the other is for Both these records will point your primary domain name to the droplet’s IP address. You should use the following configuration:

A Record #1: ‘’

Name: (yes a trailing '.' is included)
Address: In the address field, add you droplet's IP address.

A Record #2: ‘’

Name: (a trailing '.' will automatically appear. If it does not, ignore it!)
Address: Your droplet's IP address.

However, for our tutorial, we’re using a subdomain – Therefore we’ve entered a single A record for the subdomain to point to the droplet’s IP address.

Note – this setup is also useful for websites that have different subdomain for their blog. For instance “”.

A Record for our tutorial: ‘’

Address: Our droplet's IP address

Once the A records are configured to point to the droplet’s IP address, it should take some time for it to reflect. (It does not happen instantaneously). This waiting period is called the DNS propagation time, and lasts up to 24 hours. However, practically speaking, it should not take more than 5 minutes if it’s a new A record.

Step 4: To verify that the A record is working, enter the URL (which in our case is in your browser, and you should see your WordPress site. That tells you that you’ve successfully linked your domain to your DigitalOcean droplet.

Part 2: Changing the WordPress Site URL in DigitalOcean

default wordpress install

When we’ve installed the WordPress site in DigitalOcean, the site URL is automatically configured to be the server’s IP address. We now have to change it to the new domain name we just configured.

Head over to the WordPress dashboard → Settings → General. We have to change two fields here:

  • WordPress Address (URL)
  • Site Address (URL)

Change it to the respective URL you’ve set in the A record in the previous section. It should be either ‘’ or ‘’. Note that both the WordPress Address and the Site Address need to have the same values.

wordpress site url configuration

In our tutorial, we’ve used Once done scroll down and hit Save to save the changes.

Your WordPress site is now ready!

Adding HTTPS to WordPress using DigitalOcean

Setting up an SSL certificate enables HTTPS on the web server, which secures the traffic between the server and the clients connecting to it. DigitalOcean pre-installs a tool called Certbot in the one-click WordPress install droplet. Certbot is a free and convenient way to set up SSL certificates on a server.

We’ll now look at how to configure Certbot in DigitalOcean to add HTTPS to your WordPress site.

According to DigitalOcean’s documentation, to use Certbot, you’ll need a registered domain name and two DNS records:

  • An A record from the domain (e.g., to the server’s IP address
  • An A record from the domain prefaced with www (e.g., to the server’s IP address.

This is very similar to the part 1 of the DNS configuration section. And guess what? We’ve already done it!

Once this step is done, we’ll need to login to the droplet’s console via SSH and run the following command:

certbot --apache -d -d

Only thing is is replaced with your domain name. In our tutorial, since we’re only using a subdomain, the command is going to be:

certbot --apache -d
  • There are going to be a couple of prompts when the command is running. Simply agree to them by entering ‘Y’ on the console.
  • You’ll also be asked if you want to redirect all HTTP traffic to the HTTPS version of the website. I would recommend selecting yes, since this ensures that all your visitors get the encrypted version of your website.
  • Once done, you’ll have to go back to the WordPress dashboard and change the site URL from http to https, as shown in the screenshot below.

wordpress site url change to https

Automating and Scheduling DigitalOcean Backups

As mentioned before you can add backups to your DigitalOcean droplet, but these are only offered once a week. A lot can happen in 7 days between backups. This is why we think it’s beneficial to either take your own site backups or use a trusted service like SnapShooter to help you better manage them.

SnapShooter DigitalOcean Backups

With SnapShooter you can schedule and create as many backups as you need. Whether that’s daily, hourly or on demand. Plus you can plan to take backups during non-peak times, maintain a complete archive (choose how many you want to keep), and store them securely. The option to connect multiple DigitalOcean accounts to SnapShooter allows you to streamline backups for all your sites. SnapShooter can even auto-detect and activate backups for all new droplets – keeping your sites covered.

Get SnapShooter

Of course you can take manual backups of your site, but a service like SnapShooter makes the process easier.

Wrapping Up

DigitalOcean is one of the finest examples of developer-friendly cloud hosting providers out there. They have extensive documentation including a dedicated page for WordPress and ticket-based support system. Powered by intuitive design, user-centric guides and robust features, DigitalOcean is changing the face of cloud hosting – one droplet at a time. And with a $5/month entry point, it’s an excellent place to learn how to get your hands dirty with WordPress.

Experience the Cloud Now!

What did you think of this tutorial? Is there something you’d like us to add? We love to hear your thoughts in the comments below.

Article by Sourav guest author
Subscribe to the Newsletter

Get our latest news, tutorials, guides, tips & deals delivered to your inbox.


  1. Tony Kaspin

    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.


  2. djsylvester

    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.

    • Kyla

      Thank you! All fixed 🙂

    • Sourav

      Thank you for pointing it out! Kyla’s done the needful!

  3. Justin Samuel

    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.


    • Emily

      You save me a lots!! Thank you very much. Love it.

      • Justin Samuel

        That’s great. You’re very welcome!

  4. A.Fruit

    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.

    • Kyla

      Thanks for letting us know!

    • L. Levi

      I’ve installed wordpress on a $5 a month droplet – no problem there..

  5. Odracir

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

    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

    • AJ Clarke

      Cool, thanks for sharing your tip Emily!

    • VH

      Just a quick note – ServerPilot no longer has a free package option. Otherwise it’s a great control panel especially for less advanced users.

  7. Sravan Kumar

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

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

    very nice and easy steps

  10. Rashmi

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

    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

    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

  13. Joe

    After creating my WordPress and trying to upload a theme, it gives me an error message asking if I’m sure I want to do this. Do you know how I can fix this?

    • AJ Clarke

      This is a common server error with larger themes usually it’s a memory limit related error and can be fixed by increasing your server memory’s limit to PHP. If you are using a premium theme, simply contact the developer of the theme so they can assist you. We have a troubleshooting guide for our Total theme here but it relates to a lot of themes and you may find it helpful.

  14. Jack M.

    Hi, just wondering whether you’d want to checkout the review of Digital Ocean, just seen in another post of dale anyway, you’ll see amazing digital ocean videos, analysis and great opinions too, it’s worth taking a look to my mind

  15. Michel

    Worked like a charm Sourav! Great easy explanation 🙂

  16. Robert Andrews

    You had me up until cPanel.
    Why would you have both a host AND Digital Ocean?
    I thought this was about installing WordPress ON Digital Ocean?

    • Kyla

      I think you’re at the section on adding an A Name Record and I can see how it’s confusing. I’m pretty sure Sourav simply uses a hosting company to purchase and manage his domain names – so even though the domain names are from a hosting company, WordPress is installed on Digital Ocean. I’ll make a note to consider updating that section to use a registrar like GoDaddy or NameCheap instead.

  17. Kunj Bihari

    Really, very useful article, I read almost 10 articles but i don’t understand his process but your article really help me to install wordpress on Digital Ocean thank you so much for sharing this article.

  18. jose

    Thanks a lot for your article, I found all I needed here.

  19. Techie

    I think Digital Ocean and WordPress is the best combo at affordable price.

    • Kyla

      Totally agree! While we do use WPEngine for our main sites, for smaller projects we use Digital Ocean x WordPress through Cloudways (since their admin panel just makes things so darn easy).

  20. Ante

    Great article, thanks!

Leave a Reply

Your email address will not be published. Required fields are marked *

Learn how your comment data is processed by viewing our privacy policy here.