How to Host a WordPress Website on DigitalOcean: Step-by-Step Guide
Shared hosting is cheap, but you share a server with hundreds of other sites. When one of them gets a traffic spike, everyone slows down. A DigitalOcean Droplet gives you your own virtual server, with dedicated resources, root access and predictable monthly pricing from just a few dollars.
You might expect running WordPress on your own server to be complicated, but it isn’t. DigitalOcean’s WordPress 1-Click image does most of the heavy lifting. It installs the full software stack, sets up HTTPS automatically and walks you through a short setup wizard. If you can copy and paste a command into a terminal, you can have a live site in about 15 minutes.
This guide covers what it costs, how to launch the server, how to connect your domain, and what to do once your site is live.
How Much Does WordPress on DigitalOcean Cost?
You pay for the Droplet (your server), and that’s it. The WordPress image itself is free. Here are DigitalOcean’s current Basic Droplet prices:
<<<<<< TRY DIGITALOCEAN NOW >>>>>>
| RAM | vCPU | SSD | Transfer | Monthly price | Good for |
| 512 MiB | 1 | 10 GiB | 500 GiB | $4 | Too small for WordPress |
| 1 GiB | 1 | 25 GiB | 1,000 GiB | $6 | Personal blogs, test sites |
| 2 GiB | 1 | 50 GiB | 2,000 GiB | $12 | Small business sites |
| 2 GiB | 2 | 60 GiB | 3,000 GiB | $18 | Growing sites, light WooCommerce |
| 4 GiB | 2 | 80 GiB | 4,000 GiB | $24 | Busy sites and online stores |
DigitalOcean says WordPress needs at least 1 GB of RAM. For a production site, it recommends 2+ CPU cores, 2+ GB of RAM and 50+ GB of storage. A good rule of thumb is to start with the $6 plan for a blog or the $12 plan for a business site, then resize later if you need more power.
Extra costs to plan for:
- Backups: add 20% of your Droplet price for weekly backups, or 30% for daily backups. For example, weekly backups on a $12 Droplet cost $2.40 a month.
- Domain name: this is bought separately from a registrar, usually 10–20 a year.
- Managed database (optional): you only need this if you want your database on a separate, managed server.
New accounts usually get $200 in free credit for 60 days, which is more than enough to build and test your site before you pay anything.
Step-by-Step: Launch WordPress on DigitalOcean
Step 1: Create your account
Sign up at DigitalOcean and add a payment method (a card is required, even for the free credit).
Step 2: Create a WordPress Droplet
- Open the Marketplace, search for WordPress and click Create WordPress Droplet.
- Pick a region close to your visitors. For example, choose Bangalore for an Indian audience or Frankfurt for a European one.
- Choose a Basic Droplet with at least 1 GB of RAM.
- Under authentication, choose SSH key rather than a password. It’s much harder to break into.
- Give the Droplet a name and click Create Droplet.
After about a minute, you’ll see your server’s IP address. If you visit it in a browser now, you’ll see a “setup pending” page. That’s normal.
Step 3: Run the setup wizard
Open a terminal and connect to your server:
ssh root@your-droplet-ip
The setup wizard starts automatically. It asks for four things: your email address, an admin username, a password and a site title. Choose a username other than “admin”, and use a long, unique password.
The wizard takes about two or three minutes. During that time, it gets a free Let’s Encrypt certificate, sets up the Caddy web server with HTTPS and installs WP-Fail2Ban to block brute-force logins. When it’s done, log in at https://your-droplet-ip/wp-admin.
Tip: If the wizard doesn’t start, run /root/wp_setup.sh to start it manually.
Step 4: Point your domain to the Droplet
In your domain registrar’s DNS settings (or in DigitalOcean’s free DNS), create an A record:
| Type | Host | Value |
| A | @ | Your Droplet IP |
| A | www | Your Droplet IP |
The change usually takes 5 to 60 minutes to spread. Wait until your domain loads the Droplet before you move on to the next step.
Step 5: Switch WordPress to your domain
SSH back in and run:
/root/wp_setup_domain.sh
The script gets a proper SSL certificate for your domain, updates your WordPress URLs and redirects all HTTP traffic to HTTPS. Caddy renews the certificate automatically, so you won’t need to set up Certbot or a renewal job.
After Launch: Keep Your Site Safe and Fast
The 1-Click image gives you a solid starting point, but you’re now in charge of the server. A few habits will save you a lot of trouble.
Turn on backups
Enable Droplet backups in the control panel. It’s the cheapest insurance you’ll ever buy.
Keep everything updated
- Update WordPress core, themes and plugins every week from the dashboard.
- Update the server itself every month or so with apt update && apt upgrade.
- Delete any plugins and themes you don’t use.
Check the firewall
The image sets up the UFW firewall to allow only three ports: 22 (SSH), 80 (HTTP) and 443 (HTTPS). Run ufw status to confirm, and avoid opening anything else unless you have a clear reason to.
Speed things up
Install a caching plugin, compress your images and consider a free CDN like Cloudflare. If pages still feel slow after that, resize the Droplet to a bigger plan. It only takes a few clicks and about a minute of downtime.
Common Problems and Quick Fixes
| Problem | Likely cause | Fix |
| Still seeing the “setup pending” page | The wizard hasn’t run yet | SSH in, or run /root/wp_setup.sh |
| Domain script fails to get a certificate | DNS isn’t pointing to the Droplet yet | Wait for DNS to update, then run the script again |
| “Error establishing a database connection” | MySQL stopped or ran out of memory | Restart MySQL, or move up to a 2 GB plan |
| Site is slow under traffic | Not enough RAM | Add caching or resize the Droplet |
| Can’t log in over SSH | Wrong key or IP address | Use the Droplet Console in the control panel |
If you ever need your database password, it’s saved on the server in /root/.digitalocean_password.
Final Thoughts
DigitalOcean is a great middle ground between cheap shared hosting and expensive managed WordPress plans. For $6 to $12 a month, you get your own server, automatic HTTPS and full control. And the 1-Click image takes care of the hard parts.
The trade-off is that you look after the server yourself. As long as you turn on backups, keep things updated and keep an eye on resources as you grow, your site will run fast and reliably for years.