How to Move from Shared Hosting to DigitalOcean VPS
Shared hosting is a fine starting point. It's cheap, setup is simple, and someone else handles the server. But at some point, many sites outgrow it — and when they do, the experience gets frustrating fast.
This guide explains how to recognize when you've hit that wall, what you actually gain by moving to a DigitalOcean VPS, and how to do the migration step by step.
Signs You've Outgrown Shared Hosting
Your site is slow for no obvious reason. Shared hosting puts dozens or hundreds of websites on the same server. When a neighbor's site gets a traffic spike, yours suffers. You have no control over this.
You're hitting resource limits. Most shared plans cap your CPU usage, database connections, or PHP workers. Hit the cap and your site returns errors or goes offline — often without a clear explanation.
Your host keeps emailing about "high resource usage." This is a polite way of saying "you're using more than we planned for." The next step is usually an upsell to a more expensive plan.
You can't install what you need. Shared hosting locks down the server. You can't change the PHP version across the board, install custom software, or open specific ports. If your app needs something the host doesn't offer, you're stuck.
You're running a business. If your site earns money or people depend on it, the reliability ceiling of shared hosting becomes a real risk. VPS plans come with dedicated resources — you're not sharing with anyone.
What Changes on a VPS
On shared hosting, you rent space on someone else's fully managed server. Everything from the operating system to the PHP version is the provider's responsibility.
On a DigitalOcean Droplet (their term for a VPS), you get a virtual server that's entirely yours:
- The RAM and CPU are dedicated to you — no noisy neighbors
- You choose the operating system
- You install exactly what you want — any version of PHP, Node, Python, Ruby, whatever
- You control the firewall
- You can host multiple sites on the same Droplet
The tradeoff: you manage the server yourself. There's no cPanel that handles things behind the scenes. You'll be comfortable with a few terminal commands by the time this is over — but less than you might expect.
If you want managed VPS hosting where someone else handles server administration, that's a separate category. DigitalOcean is self-managed.
What You'll Need Before You Start
- A DigitalOcean account
- Access to your current hosting account (to export your site files and database)
- Access to your domain registrar (to update DNS at the end)
If you're migrating a WordPress site, you'll also want a plugin like All-in-One WP Migration or Duplicator — both make exporting your site a simple download.
Step 1: Create a DigitalOcean Droplet
Sign into DigitalOcean and create a new Droplet. For most site migrations, the Basic plan at $12/month (2 GB RAM) is a good starting point — it handles WordPress comfortably with room to grow.
Choose Ubuntu 24.04 as the operating system. Choose the data center region closest to your visitors.
See our full Droplet creation guide if you need step-by-step help.
Step 2: Set Up Your Web Server
Once your Droplet is running, log in via SSH and install the software stack your site needs.
For a static HTML site or simple PHP site:
1sudo apt update
2sudo apt install nginx php-fpm -y
For WordPress:
1sudo apt update
2sudo apt install nginx mysql-server php-fpm php-mysql php-curl php-gd php-mbstring php-xml php-zip -y
Then secure MySQL:
1sudo mysql_secure_installation
Follow the prompts. Set a strong root password and answer yes to all the security questions.
Step 3: Export Your Current Site
Files: Log in to your current host's file manager or use FTP to download all your site files. For WordPress, that's the entire public_html folder (or wherever your site lives). This includes your themes, plugins, uploads, and the wp-config.php file.
Database: In cPanel, go to phpMyAdmin, select your site's database, and click Export. Download the .sql file. That's your entire database — posts, pages, settings, users.
If you're using a migration plugin like All-in-One WP Migration, it bundles both your files and database into one download.
Step 4: Import Your Site to the VPS
Upload your files to /var/www/html (or to a subdirectory if you're hosting multiple sites):
1scp -r /path/to/your/files/* yourname@YOUR_DROPLET_IP:/var/www/html/
Import your database. First create a database on the new server:
1sudo mysql -u root -p
Inside MySQL:
1CREATE DATABASE yoursite;
2CREATE USER 'siteuser'@'localhost' IDENTIFIED BY 'strongpassword';
3GRANT ALL PRIVILEGES ON yoursite.* TO 'siteuser'@'localhost';
4FLUSH PRIVILEGES;
5EXIT;
Then import the .sql file you exported:
1mysql -u siteuser -p yoursite < /path/to/your-database.sql
Update wp-config.php (WordPress only): Open the file and update the database name, username, and password to match what you just created.
Step 5: Configure Nginx and Test with a Temporary URL
Set up an Nginx config file for your site (see the full instructions in our hosting a website on DigitalOcean guide). Point the root to wherever your files are.
Before changing your DNS, test that everything works by editing your local hosts file to point your domain at the new Droplet IP. This lets you check the site in a browser without affecting anyone else.
On Mac/Linux, open /etc/hosts as admin and add:
1YOUR_DROPLET_IP yourdomain.com www.yourdomain.com
Open your browser and visit your domain. If the site loads correctly, the migration is ready.
Remove that line from your hosts file when you're done testing.
Step 6: Enable HTTPS
Install Certbot and get a free SSL certificate from Let's Encrypt:
1sudo apt install certbot python3-certbot-nginx -y
2sudo certbot --nginx -d yourdomain.com -d www.yourdomain.com
This takes about 30 seconds. Certbot updates your Nginx config automatically and sets up auto-renewal.
Step 7: Update Your DNS
Log in to your domain registrar and update the A records to point to your DigitalOcean Droplet's IP address:
| Type | Name | Value |
|---|---|---|
| A | @ | Your Droplet IP |
| A | www | Your Droplet IP |
DNS changes typically take 1–4 hours to fully propagate worldwide. During that time, some visitors will still reach your old host and some will reach the new one — which is fine, since both are running the same site.
Once you're confident DNS has switched over fully (check with a tool like whatsmydns.net), you can cancel your old hosting plan.
What You've Done
You've moved your site off shared infrastructure onto a dedicated VPS with:
- Predictable, reserved RAM and CPU
- Full control over the software stack
- Free HTTPS that renews automatically
- The ability to add more sites, install anything you need, or scale up with a click
A 2 GB DigitalOcean Droplet at $12/month handles most WordPress sites up to 50,000 monthly visitors without breaking a sweat. When you need more, you resize in the control panel and the server reboots with more resources.