Free Tool

WordPress Domain Migration SQL Generator

Generate all the SQL queries you need to migrate your WordPress website from one domain to another. Just fill in the details and run the queries in your database.

How to Use This Tool

Enter your domains

Enter the old domain (where your WordPress is currently hosted) and the new domain (where you’re migrating to). Include the full URL with protocol (http:// or https://).

Set your database prefix

The default WordPress prefix is wp_. If you changed it during installation, enter your custom prefix. You can find it in your wp-config.php file.

Generate & run queries

Click “Generate Queries” and then run the SQL queries in your database using phpMyAdmin, MySQL CLI, or any database management tool. Always back up your database before running these queries.

⚠   Important Notes

  • Always backup your database before running any migration queries.
  • These queries handle standard WordPress tables. Some plugins may store URLs in custom tables not covered here.
  • Serialized data (used by many plugins/themes) may not be correctly updated by simple SQL REPLACE. Consider using WP-CLI search-replace for serialized data.
  • After running the queries, clear all caches (plugin caches, CDN, browser cache).
  • Update your wp-config.php if it contains hardcoded URLs.

WordPress Multisite

For multisite networks, you’ll need to run the queries for each subsite separately using their specific prefix (e.g., wp_2_, wp_3_). Additionally, you’ll need to manually update the wp_blogs, wp_site, and wp_sitemeta tables.

×

Get In Touch

Have a project in mind? I'd love to hear about it. Let's discuss how I can help bring your vision to life.