Loading...

How to Install WordPress on a DigitalOcean Droplet

DigitalOcean does not install WordPress for you the way a shared host does. You get a blank Droplet, a private Linux server, and the WordPress install is yours to run. The fastest route is the one-click WordPress image in the DigitalOcean Marketplace, which sets up the web server, PHP, and the database before you ever touch the command line. This guide walks through that one-click install, covers the manual Ubuntu route for people who want more control, and flags the three steps that are easy to skip and painful to fix later.

What You Need Before You Start

Gather these before creating the Droplet so the setup runs without stops. This guide covers a fresh install; if you already have a WordPress site elsewhere, see how to migrate it to DigitalOcean instead.

  • A DigitalOcean account. New accounts get free trial credit to test with.
  • A registered domain name you can edit DNS records for.
  • An SSH key pair on your computer, which is safer than a root password and is the recommended way to log in.
  • About 20 minutes, and a note of the server region closest to your visitors.

Option 1: Install WordPress With the One-Click Droplet Image

This is the route most people should take. DigitalOcean's Marketplace image ships WordPress on top of a LAMP stack, so the software is in place the moment the Droplet boots.

Step 1: Create the Droplet

In the DigitalOcean dashboard, choose Create, then Droplets. Under the Marketplace tab, search for the WordPress image and select it. Pick a Basic plan, where a 2GB Droplet is enough for a small site, choose the region nearest your audience, add your SSH key, and click Create. The Droplet is ready in about a minute.

Step 2: Run the one-time setup script

Log in to the Droplet over SSH using the IP address shown in the dashboard. The image runs a short setup wizard on first login that asks for your domain, an administrator email, and whether to install a free Let's Encrypt SSL certificate. Answer yes to SSL. The script configures the web server and hands you the WordPress database details.

Step 3: Point your domain and finish in the browser

At your domain registrar, add an A record pointing your domain to the Droplet's IP address. Once it resolves, open your domain in a browser and complete the WordPress install screen: site title, admin username, and a strong password. Your site is live. For the wider setup picture, including moving an existing site across, see our DigitalOcean setup and migration guide.

Step 4: Lock down the new server

Before you announce the site, add a basic firewall. DigitalOcean's Cloud Firewall lets you allow only web traffic on ports 80 and 443 and SSH on port 22, and block everything else in a few clicks. Keep the server software updated with regular system updates, and avoid logging in as root for day-to-day work once the site is running.

Option 2: Install WordPress Manually on Ubuntu

If you want to choose your own web server or run a leaner stack, you can start from a plain Ubuntu Droplet instead. The outline is: install Nginx or Apache, install PHP and the required extensions, install MySQL or MariaDB and create a database and user, download and extract WordPress into the web root, set the correct file permissions, and then complete the browser install. It is more work and more room for error, so take this path only if you are comfortable on the command line and have a reason to customise the stack. The broader trade-offs between the raw and managed routes are covered in the DigitalOcean hosting guide.

After Installation: Three Things People Forget

A working WordPress install is not a finished setup. These three are the ones that come back to bite a self-managed Droplet.

  • Email will not send until you fix it. DigitalOcean blocks the standard mail port on new accounts, so WordPress password resets and contact-form messages fail silently. Send mail through an authenticated SMTP service using a plugin such as WP Mail SMTP.
  • SSL expires in 90 days. Let's Encrypt certificates are short-lived by design. Confirm the auto-renewal job is active on day one, or your site will show security warnings a few months later.
  • Nothing is backed up by default. Turn on DigitalOcean's weekly backups or a daily backup plugin before you add real content, not after something breaks.

The No-Command-Line Alternative

If none of the above sounds appealing, you can run the same DigitalOcean infrastructure through a managed layer instead. Provisioning the Droplet through Cloudways installs WordPress, configures caching and SSL, and handles backups for you, with no SSH required. The steps mirror our Cloudways setup walkthrough, and the trade-off is a small markup over the raw Droplet price in return for skipping the server administration entirely.

Frequently Asked Questions

Yes. DigitalOcean's Marketplace offers a one-click WordPress image that installs the web server, PHP, the database, and WordPress when the Droplet boots. You still point your domain and finish the short browser setup, but you avoid configuring the stack by hand.
A 2GB Basic Droplet, around $10 to $12 a month, is enough for most small business and blog sites. Busier sites or WooCommerce stores are more comfortable on a 4GB Droplet, and you can resize up later in a few minutes.
The one-click image needs only basic comfort with logging in over SSH and editing a DNS record. The manual Ubuntu route needs real command-line skill. If you want none of that, running the Droplet through Cloudways removes the command line entirely.
The one-click WordPress image offers to install a free Let's Encrypt certificate during its first-login setup wizard, so answer yes when prompted. Make sure the auto-renewal job stays active, because Let's Encrypt certificates expire every 90 days.
With the one-click image, about 15 to 20 minutes end to end: a minute to create the Droplet, a few minutes for the setup script and SSL, and the rest waiting for your domain's DNS to point at the new server.
Some of the links on this blog are sponsored links
Newsletter
Stay Ahead in Hosting

Expert hosting tips, reviews, and exclusive deals — delivered straight to your inbox. Join thousands of smart webmasters.

You're in! Thanks for subscribing.
Something went wrong — please try again.
No spam, ever. Unsubscribe in one click.
Top