I build almost everything in LocalWP first — it’s fast, free, and keeps client experiments off the live server. But there’s one moment that always makes people sweat: the go-live. Here’s exactly how to move a LocalWP site to a live server without the usual panic, using the same checklist I’ve run dozens of times. About 90% of “help, my site is broken” moments come down to three predictable culprits, and I’ll flag each one as we hit it.
Before You Move a LocalWP Site
Get your live hosting ready first: SFTP or cPanel access, an empty database created (note the name, user, and password), and a PHP version that matches or beats your local one. Write down two URLs — your local address (something like yoursite.local) and your real live domain. You’ll need both for the URL swap later.
Step 1: Export from LocalWP
LocalWP has a one-click export: right-click your site and choose Export, and it zips the files and database together. Honestly, though, for beginners I’d reach for a migration plugin like Duplicator or All-in-One WP Migration instead — they bundle everything and handle the tricky URL replacement for you, which removes the single most common way to break the move.
Step 2: Upload the Files
Push your WordPress files up to the live server’s public_html folder over SFTP. A solid client like FileZilla or WinSCP makes this painless — it’s just slow, so start it and go make coffee. Everything in wp-content (themes, plugins, uploads) has to make the trip.
Step 3: Import the Database
In your live host’s phpMyAdmin, select the empty database you created and import the .sql file from your export. This is the half people forget — your content, settings, and menus all live in the database, not the files.
Step 4: Fix wp-config.php
Edit wp-config.php on the live server and update DB_NAME, DB_USER, DB_PASSWORD, and DB_HOST to the live database details. Gotcha #1: wrong credentials here give you the dreaded “Error establishing a database connection.” Double-check them character by character.
Step 5: Search-Replace the URLs (the #1 Site-Breaker)
This is where most migrations die. Your database is stuffed with your local URL, some of it inside serialized data. You cannot just find-and-replace it in a text editor — that corrupts the serialized fields and breaks widgets and settings. Use WP-CLI:
wp search-replace 'yoursite.local' 'yoursite.com' --all-tables
No terminal? The Better Search Replace plugin does the same job safely from wp-admin, and Duplicator handles it automatically during install. Gotcha #2 lives here — skip the safe method and you’ll spend hours chasing ghosts.
Step 6: Flush Permalinks
Log into wp-admin on the live site, go to Settings → Permalinks, and just click Save without changing anything. That regenerates the rewrite rules. Gotcha #3: skip this and every page except your homepage throws a 404 — it’s the classic “only the homepage works” symptom.
Step 7: Sort Out SSL and Mixed Content
Your live site should be served over HTTPS. If some images or scripts still point to http://, browsers throw mixed-content warnings and that little “not secure” flag. Replacing http://yoursite.local with https://yoursite.com in Step 5 fixes most of it; a plugin like Really Simple SSL cleans up whatever’s left.
Final Checks
- Click through your key pages, submit the contact form, and confirm images actually load.
- Re-test speed — a live server behaves differently than your laptop.
- Set up automated backups now, before you forget the site exists.
FAQ
What’s the easiest way to move a LocalWP site live?
A migration plugin like Duplicator or All-in-One WP Migration. It bundles files and database and does the URL swap for you — the fewest ways to break something.
Why does my site break after moving?
Almost always one of three things: URLs not replaced safely (serialized data), permalinks not flushed, or wrong database credentials in wp-config.
Can I just copy the files across?
No — files alone won’t work. You need the database too, with the URLs updated safely inside it.
Do I need WP-CLI to do the search-replace?
No, but it makes it bulletproof. The Better Search Replace plugin is the no-terminal alternative and handles serialization correctly.
Once you’re live, the next job is making it fast — see how to speed up a WordPress site. And if you’d rather hand the whole migration off, get in touch.
