Blog

Migrating WordPress to New Domain: A Step-by-Step Tutorial

So, you’re ready to move your WordPress website to a new domain? Maybe you’ve rebranded, picked a catchier name, or just want a fresh online presence. No worries, we’ve got you covered!

TL;DR: Migrating your WordPress site to a new domain may sound scary, but it’s totally doable. You’ll need to copy your files, move your database, update URLs, and tweak some settings. Don’t forget to test everything on the new domain before going live. And always create a backup. Seriously. Always.

Step 1: Backup Everything (Yes, EVERYTHING)

This is step one for a reason. Backups are your safety net. If anything goes wrong, you can roll back and breathe easy.

  • Export your database using phpMyAdmin or a plugin like UpdraftPlus.
  • Download all your files (themes, uploads, plugins) via FTP or hosting control panel.
  • Keep these backups safe on your local drive or cloud storage.

Think of it like packing up before moving houses. Don’t leave your socks behind!

Step 2: Set Up the New Domain

You’ll need to get your new domain all cozy and ready for your website to move in. Here’s how:

  • Register your new domain, if you haven’t already.
  • Point your DNS to your hosting provider.
  • Install WordPress on the new domain.

Now you have an empty set of walls and rooms — time to decorate.

Step 3: Upload Website Files to New Domain

Once WordPress is installed on your new domain, it’s time to bring your stuff over. Here’s what to do:

  • Use an FTP tool like FileZilla to upload your files to the public_html directory (or wherever your site lives).
  • Include the wp-content folder and your custom wp-config.php file.

The skeleton is there — now let’s add the content with your database.

Step 4: Export the Old Database

This is like lifting your brain out of the old website (we promise, it’s not as creepy as it sounds).

  • Log into cPanel or phpMyAdmin on your old host.
  • Select your WordPress database and click “Export”.
  • Use the “Quick” export method and download the .sql file.

Now you’ve got your website’s brain in a nice little package.

Step 5: Import the Database to New Hosting

Time to plug that brain into the new site.

  • Open phpMyAdmin for your new domain.
  • Select your clean, new database (created during the WordPress install).
  • Click on “Import” and upload the .sql file you exported.

Once you hit Go — voilá! Your content is now on the new domain. But wait! Your old URLs are still stuck in there.

Step 6: Update URLs in the Database

This part is magic. Or technical wizardry with a plugin.

The issue? Your database still points to the old domain. You need to change all those links before visitors start getting thrown around like popcorn.

  • Install a plugin like Better Search Replace or Velvet Blues Update URLs.
  • Search for http://yourolddomain.com and replace it with http://yournewdomain.com.
  • Run it on all tables.

Prefer some command line action? Use WP-CLI or a serialized database tool. Hardcore mode enabled.

Step 7: Update wp-config.php

If you copied the old wp-config.php, you may need to tweak a few lines:

  • Update the DB_NAME, DB_USER, and DB_PASSWORD to match your new host’s database settings.
  • Make sure there are no hardcoded references to the old domain.

Think of it as telling your site’s brain where the body parts are located now.

Step 8: Update Site Address in WordPress

Log into your dashboard — yes, it’s back now!

  • Go to Settings > General.
  • Update the “WordPress Address (URL)” and “Site Address (URL)” fields.

Click Save — and your site officially declares, “I live here now!”

Step 9: Set Up Redirects (So NO Traffic Gets Lost)

You’ve got loyal visitors, and search engines think you’re still living at the old place. Be polite and leave a forwarding address.

  • Edit or create a .htaccess file in the root of your old site.
  • Add this redirect:

    Redirect 301 / http://yournewdomain.com/

This ensures that everyone goes to the new domain automatically, including Google.

Step 10: Tell Google You Moved

Let Google know you’ve changed homes using Google Search Console:

  • Add and verify the new domain in Search Console.
  • Use the Change of Address tool under your old domain’s settings.

This helps keep your search rankings secure and cozy.

Step 11: Test Everything

You’ve come a long way! Now it’s time to test:

  • Click every menu item and link you can find.
  • Check blog posts and images.
  • Make sure contact forms and newsletters work.

Think of it like welcoming guests to your new house. You don’t want a leaky faucet or broken light switch.

Bonus Tips

  • Update your SSL certificate for the new domain — don’t scare users with security warnings.
  • Update your social media and emails with your new URL.
  • Watch for broken images or plugins that aren’t behaving post-move.

Conclusion

Migrating a WordPress site might take a few steps, but it’s a lot easier when you break it down. Just like moving to a new house, it’s all about packing, transferring, and settling in.

And remember — backups are your best friends. Even better than pizza.

You did it. High five! 👋

To top