Migrate Like You Mean It: A Step-by-Step Escape Plan From Any Free Tier
Photo: developer moving servers data center cables laptop, via as2.ftcdn.net
We've written plenty about what happens when a free tier buckles under your app — the cold starts, the bandwidth caps, the 2 AM outage emails. This time, we're flipping the script. Instead of a postmortem, this is the plan you make before anything goes wrong. Think of it as a fire escape map you draw while the building is still standing.
Whether you're on a free Heroku-style dyno, a sleepy Render instance, or a shared host that's been limping along since your sophomore year, the migration steps are basically the same. Here's how we'd do it, start to finish.
Step 1: Know Your Exit Before You Need It
The single biggest mistake developers make with free hosting is treating it like it's permanent. It's not. Free tiers change their limits, shrink their quotas, or vanish entirely — we've covered more than one eulogy for plans that died this year.
So before you migrate anything, answer three questions:
- What's my hard limit? Bandwidth, RAM, sleep timers, database row counts. Check the actual numbers, not the marketing page.
- How close am I to those limits? Most hosts have a dashboard. Screenshot it monthly. If you're at 80% of anything, start planning.
- What's my data? Apps are replaceable. Data usually isn't.
Write these down. Seriously — a note file titled exit-plan.md in your repo takes five minutes and saves you hours later.
Step 2: Pick a Landing Spot (and Actually Test It)
Don't wait until your free host throttles you to discover your new provider's quirks. Spin up your app on the new host first, even if it's just a staging copy. Deploy it, poke at it, run your test suite, hit an endpoint from your phone on cellular data.
A few things we always check on the new host before committing:
- Runtime support. Does it run your stack natively, or are you fighting a custom buildpack?
- Environment variables and secrets. How do they get injected? Anything in a config file you'll need to rebuild?
- Background jobs and cron. Free tiers handle scheduled tasks wildly differently. Test it.
- Cold starts. If your new host sleeps idle instances, your users will feel it.
Step 3: Export Your Database Without Losing Your Weekend
This is where migrations go sideways. The safe pattern:
- Take a full backup first.
pg_dump,mysqldump, or your host's snapshot tool — whatever applies. Download it somewhere that isn't either host. - Do a trial import into the new database. Don't assume the dump will import cleanly. Character encodings, extensions, and version mismatches bite everyone eventually.
- Plan the final cutover window. For a hobby app with light traffic, you can often just export-and-import during a quiet period and accept a few minutes of staleness. For anything with real writes, read the next section.
One tip we learned the hard way: some free database tiers (especially the ones that auto-expire) block outbound connections or throttle dump sizes. Test your export weeks before you need it, not the night of.
Step 4: Cut Over DNS With (Near) Zero Downtime
DNS is the scariest-sounding part and honestly the easiest, if you respect one thing: TTL.
About 24–48 hours before cutover, drop your domain's DNS TTL to something short — 300 seconds (5 minutes) is a common choice. That means when you flip the record, most of the world picks up the change within minutes instead of hours. US-based users on big residential ISPs like Comcast or Spectrum tend to respect short TTLs well; some corporate networks cache longer, so expect a straggler or two.
The cutover sequence:
- Deploy your app to the new host and verify it works on the host's temporary URL.
- Update your DNS records (A record, CNAME, or ALIAS depending on the provider).
- Watch traffic shift. Keep the old host running and reachable for at least a few days — cached DNS will still send some visitors there.
- Only after traffic fully drains, shut the old instance down.
If your app has writes and you can't afford any staleness, the fancier move is dual-write: have the app write to both databases during the transition, then flip reads over. It's overkill for most side projects, but it's the real zero-downtime answer.
Step 5: Don't Forget the Stuff That Isn't Your App
Checklists exist because everyone forgets something. Ours:
- SSL certificates — does the new host provision them automatically, or do you need to wire up Let's Encrypt?
- Email sending — many free hosts block outbound SMTP entirely.
- Object storage / uploaded files — migrate these separately; they rarely live in your database dump.
- Webhooks and third-party integrations — Stripe, GitHub, Discord bots. Update the callback URLs.
- Cron jobs — re-create them on the new host and watch them fire once.
Step 6: Run Both Stacks in Parallel (Briefly)
The golden rule of migrations: never tear down the old thing until the new thing has proven itself in production. We keep the old free tier alive for a week or two after cutover, watching error rates and logs on the new host. Free tiers make this cheap — that's one genuinely great thing about them.
The Takeaway
Free hosting is a fantastic way to ship something for nothing, but the smartest developers treat every free tier as a rental, not a home. Know your limits, keep an export of your data, and keep your exit plan updated. When the bill sneaks up — or the tier disappears — you'll be done migrating before your users even notice.
Got a migration war story or a host you'd warn people to leave? Drop it in the comments — we read every one.