Skip to content
WampServer logo WampServer
  • Home
  • What is
  • Features
  • Install
  • Compare
  • FAQs
  • Guide
Get WampServer

How to Migrate a WordPress Site From WampServer to a Live Server

migrate WordPress from WampServer to live server

WampServer makes building a WordPress site locally fast, private, and free — but the site only creates value once it is live on your domain. Migrating it is not difficult, yet it must be done in the right order: files, database, configuration, and URL replacement. Skip a step or rush the URL change and you end up with a site that loads without images, redirects back to localhost, or shows a database connection error. This guide takes you through a clean, manual migration you fully control, with a backup in place before anything goes live.

Good preparation makes the move far safer. If your local site is not finished yet, review how to install WordPress on WampServer so the local copy is complete and working first. Just as importantly, make a full local backup before you start, following the process to back up and restore WampServer projects — your www folder copy and database export are your safety net if anything goes wrong on the live server.

What You Need Before Migrating WordPress to a Live Server

You need three things ready on the receiving side: a hosting account with enough storage, a domain pointed to that hosting, and an empty MySQL database created in the hosting control panel with its name, username, and password noted down. You also need an FTP account or a file manager in the hosting panel for uploading files, and access to phpMyAdmin on the live server for importing the database.

Most migrations target the domain root, usually the public_html folder. Clear out default placeholder files there first.

Pre-Migration Checklist

  • Local site works fully on WampServer with no errors
  • Full backup saved: project files plus .sql database export
  • Live hosting, domain, and empty database are ready
  • Live database name, username, and password are noted
  • FTP or file manager access to the live server works
  • You have time to test the live site before announcing it

Exporting the WordPress Database From WampServer

The database holds your posts, pages, settings, users, and menus. Export it from phpMyAdmin while WampServer is running.

Step 1: Export the Local Database

Open phpMyAdmin, select your WordPress database, and open the Export tab. Use the Quick method with SQL format and download the .sql file. Keep this original export untouched as part of your backup.

Step 2: Create the Database on the Live Server

In your hosting control panel, create a MySQL database and user, and assign the user to the database with all privileges. Panels prefix names with your account name, so copy the full names exactly — a missing prefix causes frequent connection failures.

Step 3: Import the Database With phpMyAdmin

Open phpMyAdmin on the live server, select the new database, and use Import to upload the .sql file. If it times out on a large file, ask the host about raising limits — and if you retry, drop the partial tables and import cleanly.

Uploading WordPress Files to the Live Server

Step 1: Copy the WordPress Files

Connect by FTP or file manager and upload the contents of your local WordPress folder — containing wp-admin, wp-content, and wp-includes — into public_html. Upload the contents, not the parent folder. This takes a while; let it finish and re-queue failed transfers.

Step 2: Update wp-config.php for the Live Server

Edit wp-config.php in the live copy and replace the local values with the live ones: DB_NAME, DB_USER, DB_PASSWORD, and DB_HOST if your host requires a specific address. Keep live credentials separate from your local copy.

Replacing Localhost URLs in the WordPress Database

Your database still contains localhost/yoursite addresses in post content, image paths, and settings. Simply editing two fields is not enough, because WordPress stores some URLs in serialized data that breaks if you edit it with a plain search-and-replace in a text editor.

Step 1: Update the Site Address

In live phpMyAdmin, open the wp_options table and update the siteurl and home rows to your live address, for example https://yourdomain.com. This alone usually makes the live admin reachable at yourdomain.com/wp-admin.

Step 2: Replace URLs Safely Across the Database

Log in to the live WordPress dashboard and install a dedicated search-and-replace or migration plugin to replace the old local address with the live domain across all tables. These tools handle serialized data correctly. Run a dry run first if the tool offers one, check the number of replacements, then run the real replacement. Afterwards, go to Settings > Permalinks and click Save Changes without changing anything, which rebuilds the rewrite rules and clears most 404 errors on inner pages.

ItemLocal valueLive value
Site URLlocalhost/yoursiteyourdomain.com
Database host127.0.0.1 or localhosthost's MySQL address
Database userroothosting database user
File locationWampServer www folderpublic_html

Testing the Migrated WordPress Site Live

Open the homepage, several posts and pages, and your key conversion page. Check images load from the live domain, menus point to live addresses, and links do not bounce to localhost. Submit a test form, log in and out, and upload a test image.

A mixed content warning usually means old addresses remain — another URL replacement pass and HTTPS normally fix it. "Error establishing a database connection" is almost always a wp-config.php credentials mismatch. Keep your local copy untouched for a few weeks as a fallback.

WordPress powers a large share of the modern web as an open-source content management system, as outlined in the WordPress article on Wikipedia.

Frequently Asked Questions

Can I migrate WordPress from WampServer without a plugin?

Yes. The manual method in this guide — export the database, upload the files, update wp-config.php, and replace URLs — needs a plugin only for the URL replacement step, because that step must handle serialized data safely. Everything else uses phpMyAdmin and FTP or a file manager.

Why does my live site still redirect to localhost?

The siteurl and home values in the wp_options table still hold the local address, or an old redirect is cached. Update those two rows in live phpMyAdmin, clear any caching, and then run a full URL replacement from the live dashboard.

What should I do if images are missing after migration?

First confirm the wp-content/uploads folder uploaded completely, because interrupted uploads are the usual cause. Then check that image addresses in the content were replaced with the live domain during the URL replacement step.

Should I delete the local site after migrating?

No, not immediately. Keep the complete local copy and its database export as a backup for several weeks. Delete it only once the live site has run reliably and you have separate live backups in place.

Conclusion

A successful WordPress migration from WampServer to a live server follows a fixed order: back up locally, export the database, create and import into the live database, upload all files, update wp-config.php, and replace localhost URLs safely before testing. Work through each stage without skipping, keep your local copy as a fallback, and verify pages, images, forms, and logins on the live domain. Done this way, your locally built site goes live cleanly, with no broken links and no surprises.

WampServer

WampServer simplifies local web development on Windows with essential resources for downloading, installation, configuration, server management, and troubleshooting to ensure a smooth development experience.

Navigation

  • About Us
  • Contact Us
  • Disclaimer
  • Privacy Policy
  • Terms & Conditions
  • Sitemap

© 2026 | WampServer | All Right Reserved

Disclaimer: Not affiliated with WampServer or any other third-party platforms