Comparisons & Alternatives

How to Deploy a Website on DigitalOcean: Practical Guide

Learn how to spin up your first DigitalOcean Droplet and get a website live in under an hour, even with no prior server experience.

Hands collaborate on a business plan with a laptop in a modern office setting.

DigitalOcean lets you have a live website on a private virtual server (VPS) in minutes. To create hosting on DigitalOcean step by step, you simply need an account, a Droplet plan, and an SSH connection to install your web server software.

This guide walks you through the entire process — from signing up to seeing your site in a browser.

Why Choose DigitalOcean to Host Your Website?

DigitalOcean is popular with developers for its predictable pricing, clean control panel, and extensive documentation. Its main advantages over shared hosting include:

  • Dedicated resources: your Droplet does not share CPU or RAM with dozens of neighbors.
  • Scalability: resize the server with one click as your traffic grows.
  • Full control: root access, choose your own OS and tech stack.
  • Entry price from $6 USD/month for the smallest plan (1 vCPU, 1 GB RAM).

If you prefer a managed solution — no terminal required — browse our hosting comparisons where we review options for different profiles and budgets.

Step 1: Create Your Account and First Droplet

Go to digitalocean.com and sign up. You will need a credit card or PayPal account to verify your identity (the minimum charge is $5 USD).

Once inside the control panel:

  1. Click Create → Droplets.
  2. Choose the region closest to your audience. For North American users, New York or San Francisco work well; Toronto is another option.
  3. Select an OS image. Ubuntu 22.04 LTS is the most documented and recommended choice.
  4. For the pricing plan, the Basic Shared CPU at $6/month is plenty for a small to mid-sized site.
  5. Under Authentication, choose SSH Key (more secure) or a password. A password is faster if this is your first time.
  6. Give the Droplet a clear name (e.g., my-website) and click Create Droplet.

Within 30–60 seconds you will have a public IP address. Write it down.

Step 2: Connect to Your Server via SSH

Open your terminal (macOS/Linux) or use PuTTY on Windows:

ssh root@YOUR_PUBLIC_IP

Accept the server fingerprint when prompted. You are now inside your VPS.

First, update the system packages:

apt update && apt upgrade -y

Step 3: Install a Web Stack (LAMP or LEMP)

For a PHP or WordPress site, the most common stack is LAMP (Linux, Apache, MySQL, PHP). Install it with:

apt install -y apache2 mysql-server php php-mysql libapache2-mod-php
systemctl enable apache2 mysql
systemctl start apache2 mysql

If you prefer Nginx over Apache, replace apache2 with nginx. The rest of the process is identical.

Verify Apache is running by opening http://YOUR_PUBLIC_IP in a browser. You should see the default Apache welcome page.

Upload Your Files to the Server

Copy your site files to the web root using SCP:

scp -r /local/path/my-site root@YOUR_PUBLIC_IP:/var/www/html/

Alternatively, use an FTP client like FileZilla configured with SFTP (port 22).

Step 4: Point Your Domain to the Droplet

In your domain registrar's control panel, create A records pointing your domain to the Droplet's public IP:

Type Name Value TTL
A @ YOUR_PUBLIC_IP 3600
A www YOUR_PUBLIC_IP 3600

DNS propagation can take anywhere from a few minutes to 48 hours, though it is usually much faster.

Enable HTTPS with Let's Encrypt

A free SSL certificate is essential. Install Certbot:

apt install -y certbot python3-certbot-apache
certbot --apache -d yourdomain.com -d www.yourdomain.com

Follow the wizard, accept the terms, and Certbot will configure the certificate and HTTPS redirect automatically. The certificate renews itself every 90 days.

Key Takeaways

  • DigitalOcean gets a VPS live in under an hour using Ubuntu and the LAMP stack.
  • The $6/month Basic plan is enough for small to mid-sized projects.
  • SSH is the standard, secure way to manage your server — learn the basic commands.
  • Point your domain with an A record and activate HTTPS via Certbot (free) before going public.
  • If server management is not your thing, managed hosting may be the better fit for your situation.

Would you rather focus on your business while someone else handles the infrastructure? The team at elenlace.com offers web development and site management services so you never have to worry about servers or configurations.

FAQ

How much does it cost to host a website on DigitalOcean?

The cheapest Droplet costs $6 USD per month (1 vCPU, 1 GB RAM, 25 GB SSD). Billing is hourly, so if you delete it mid-month you only pay for what you used. Your domain name is a separate cost purchased from a registrar.

Do I need to know how to code to use DigitalOcean?

You do not need to code, but you should be comfortable with a Linux terminal. DigitalOcean also offers App Platform, a more managed solution where you can deploy applications without touching the command line.

Does DigitalOcean have servers in Mexico?

There is no datacenter in Mexico, but Toronto and New York are the closest options. For Mexican audiences, either delivers acceptable latency (40–80 ms).

Can I install WordPress on a DigitalOcean Droplet?

Yes, and it is one of the most common use cases. DigitalOcean even offers a Marketplace with a one-click WordPress Droplet that eliminates the manual stack installation entirely.

Prefer it done for you? El Enlace handles hosting and professional web development.

Compare providers

Other providers and guides worth comparing:

← All