ANTIGRAVITY LABJP
Articles/Agents & Manager
Agents & Manager/2026-09-07Intermediate

I count the posts three times before flipping a WordPress host migration

The copy-complete notice from a shared host is a snapshot taken when the copy started, not when it finished. Here is the full enumeration I run before the cutover, and where I stop delegating.

WordPressHost MigrationAgent Operations8DNSVerification

Premium Article

The migration panel said "data copy complete" some time after midnight. The instructions were short from there: press the switch button. I was putting my mug away when I decided to look at the new side first, just once.

That one look mattered. The article I had published earlier that evening was not on the new server.

The thing I want to say first is that "copy complete" did not mean "identical right now." The copy is a snapshot from the moment it started, and anything I wrote and published afterward was never part of it. Obvious in hindsight — but the notice does not say so.

Copy complete means the copy started, not that you are in sync

A shared host's migration feature copies the old server's files and database to the new one. Depending on the size of the site, that takes a while. The completion notice tells you the copying finished. It does not tell you that updates made during the copy were picked up.

For a while I assumed the notice meant both sides were equal. That did not work out well. Lining up the notice timestamp against my own last publish time would have shown it immediately — I had simply handed the judgment to the wording of a notification.

Looking back, it was less that I begrudged the check and more that I had not thought of a way to do it. I had decided the new server sat on the far side of DNS and could not be touched.

Now the notice does not make me press anything. It makes me go look at the new side.

Looking at the new server before you move DNS

This is where I got stuck at first. DNS still points at the old host, so how do I talk to WordPress on the new one?

The answer was curl's --resolve. You keep the hostname as the domain and swap only the address it connects to. SNI and certificate validation both proceed under the real domain name, so you never need --insecure.

# Talk to WordPress on the new server while keeping the real hostname.
# NEW_IP is the destination server's address.
curl -sS -o /dev/null -D - \
  --resolve "example.com:443:NEW_IP" \
  "https://example.com/wp-json/wp/v2/posts?per_page=1" \
  | tr -d '\r' | grep -i '^x-wp-total'

If you find yourself reaching for --insecure, I would rather you paused there. With validation off you cannot tell that you have landed somewhere other than the server you meant. If the destination certificate has not been issued yet, waiting for it is the cheaper option.

If the destination certificate has not been issued yet, wait for the migration tool to finish issuing it. In that case waiting turns out to be the faster path.

To confirm you really reached the new machine, drop a temporary file into the new server's document root before cutover and request it. The old server does not have that file, so a successful response means you are on the new side.

Thank you for reading this far.

Continue Reading

What follows includes implementation code, benchmarks, and practical content we hope you'll find useful. This site runs without ads — server and development costs are supported entirely by members like you. If it's been helpful, we'd be truly grateful for your support.

WHAT YOU'LL LEARN
You will be able to run a full old-versus-new post comparison on your own site before you touch the cutover button
You will catch posts whose bodies never made it across, even when the counts match, before a reader does
You will have a clear line between the parts of a migration you hand to an agent and the parts you press yourself
Secure payment via Stripe · Cancel anytime

Unlock This Article

Get full access to the rest of this article. Buy once, read anytime. This site is ad-free — your support goes directly toward keeping it running.

or
Unlock all articles with Membership →
Share

Thank You for Reading

Antigravity Lab is ad-free, supported entirely by members like you. We publish practical guides daily with implementation code, benchmarks, and production-ready patterns. If you've found it useful, we'd love to have you on board.

  • Copy-paste ready implementation code
  • New advanced guides published daily
  • $5/mo or $15 for lifetime access
View Membership →

Related Articles

Agents & Manager2026-08-07
I Asked the Agent to Pick Tests From My Diff and It Said "None" Nine Times Out of Ten
Change-based test selection returned zero tests for most edits. Measuring how far an import graph actually reaches across three repositories, and rebuilding the selection contract around it.
Agents & Manager2026-06-28
Prune an Antigravity plan before you approve it
Instead of approving a Planning-mode plan wholesale, cut the one risky step and keep the rest. A field-tested look at partial plan editing from a solo developer's desk.
Agents & Manager2026-09-06
With scheduled agents, I now look for runs that never happened before I look for failures
My run ledger showed a 100% success rate while the evening slot had not fired for two weeks. Here is the reconciliation I now run against an expected-fire table, with measured notes on cron expansion, exit codes, and how the ledger itself gets written.
📚RECOMMENDED BOOKS
Build a Large Language Model (From Scratch)
Sebastian Raschka
LLM Dev
Prompt Engineering for LLMs
Berryman & Ziegler
Prompting
AI Engineering
Chip Huyen
AI Eng
* Contains affiliate links