How to Migrate Wordpress Website

How to Migrate WordPress Website Migrating a WordPress website is a critical task that every web administrator, developer, or business owner may encounter at some point. Whether you’re moving from shared hosting to a VPS, switching to a new domain, upgrading to a faster server, or consolidating multiple sites into one, the process of migrating WordPress requires precision, planning, and attention

Nov 10, 2025 - 12:32
Nov 10, 2025 - 12:32
 2

How to Migrate WordPress Website

Migrating a WordPress website is a critical task that every web administrator, developer, or business owner may encounter at some point. Whether youre moving from shared hosting to a VPS, switching to a new domain, upgrading to a faster server, or consolidating multiple sites into one, the process of migrating WordPress requires precision, planning, and attention to detail. A poorly executed migration can result in broken links, lost SEO rankings, downtime, data corruption, or even complete site failure. Conversely, a well-executed migration ensures seamless continuity, preserves your search engine authority, and enhances performance. This comprehensive guide walks you through every phase of migrating a WordPress websitefrom preparation to post-migration validationequipping you with the knowledge to execute the process confidently and correctly.

Step-by-Step Guide

1. Prepare for Migration

Before you begin the actual migration, thorough preparation is essential. Rushing into the process without a plan increases the risk of errors and data loss. Start by taking a full backup of your current WordPress site. This includes both your files and your database. You can do this manually via FTP or cPanel, or use a reliable backup plugin like UpdraftPlus, Duplicator, or All-in-One WP Migration. Ensure the backup is stored in a secure, off-server location such as Google Drive, Dropbox, or an external hard drive.

Next, document your current site configuration. Note down your WordPress version, active plugins, theme name and version, custom code snippets, and any third-party integrations (e.g., payment gateways, CRM tools, email marketing services). Record your permalinks structure, as changing this during migration can break existing URLs and hurt SEO. Also, make a list of any custom DNS settings, SSL certificates, or CDN configurations youre currently using.

Verify that your new hosting environment meets WordPress requirements. Most modern hosts support PHP 8.0 or higher, MySQL 5.6 or MariaDB 10.0+, and at least 256MB of memory. Confirm that the new server has SSL enabled and that mod_rewrite is active for clean URLs. If youre moving to a new domain, ensure the domain is registered and DNS is pointing to the new hosts nameservers.

2. Choose Your Migration Method

There are three primary methods to migrate a WordPress site: manual migration, using a migration plugin, or leveraging your hosting providers migration tools. Each has pros and cons.

Manual migration gives you full control over every step but requires technical knowledge. It involves exporting the database via phpMyAdmin, downloading all files via FTP or SFTP, uploading them to the new server, importing the database, and updating configuration files. This method is ideal for developers or advanced users who want to understand the inner workings of WordPress.

Migration plugins automate much of the process. Plugins like Duplicator, All-in-One WP Migration, and BlogVault offer one-click or guided migration workflows. They package your entire site into a single archive file, which you can upload to the new server and install with minimal input. These tools are excellent for non-technical users and small to medium-sized sites.

Hosting provider tools are often the easiest option. Many managed WordPress hosts like Kinsta, WP Engine, and SiteGround offer free site migration services. These services typically handle everything from backup to DNS propagation, requiring only your login credentials. This is ideal if youre switching to a premium host and want a hands-off experience.

For this guide, well focus on the manual method and the plugin method, as they offer the most flexibility and learning value.

3. Export Your WordPress Database

If youre migrating manually, log in to your current hosting account and access phpMyAdmin, usually found in your cPanel dashboard. Select your WordPress database from the left-hand menu. Click Export at the top, ensure Quick export method is selected, and choose SQL as the format. Under Format-specific options, check Add DROP TABLE / VIEW / PROCEDURE / FUNCTION / EVENT to ensure clean imports. Click Go to download the .sql file.

Alternatively, if youre using a plugin like Duplicator, this step is automated. The plugin creates a package (.zip and .installer.php files) that includes your database and files. You dont need to manually export the database.

Important: Always verify the exported database file is not corrupted. Open it in a text editor and confirm it contains recognizable WordPress table prefixes like wp_posts, wp_users, and wp_options. If the file is empty or under 10KB, something went wrongrepeat the export.

4. Download Your WordPress Files

Connect to your current server via FTP, SFTP, or your hosting providers file manager. Navigate to the root directory of your WordPress installationtypically public_html, www, or a subfolder like /wordpress. Download all files and folders, including wp-config.php, .htaccess, wp-content, and any custom folders youve created.

Pay special attention to the wp-content folder. It contains your themes, plugins, uploads (images, media), and sometimes custom code. Ensure you download the entire folder, not just subdirectories. Missing even one image or plugin file can break functionality.

If your site uses a CDN (like Cloudflare or Amazon S3), youll need to manually download media files stored there. Most CDN services dont sync with your server, so your local wp-content/uploads folder may not contain all media. Use a plugin like Media Sync or manually download from the CDNs dashboard.

5. Set Up the New Hosting Environment

Log in to your new hosting account. If youre using a new domain, ensure DNS propagation is complete (this can take up to 48 hours, though usually less). Create a new database through your hosting control panel. Note down the database name, username, password, and host (usually localhost).

Upload your downloaded WordPress files to the new servers root directory. If youre using a new domain, upload to the primary document root (e.g., public_html). If youre migrating to a subdirectory or staging environment, upload accordingly.

Set correct file permissions. WordPress files should be owned by the web server user. Typically, folders should be 755 and files 644. The wp-config.php file should be 600 for security. Most hosting panels allow you to adjust permissions via a file manager.

6. Import the Database to the New Server

Access phpMyAdmin on your new server. Create a new database with the same name you noted earlier. Select it, then click Import. Upload your .sql file. Wait for the import to complete. If the file is large (over 100MB), you may need to split it into smaller chunks or use command-line tools like MySQL via SSH.

After importing, locate the wp_options table. Click Browse and find the rows with siteurl and home. Update both values to reflect your new domain. For example, change https://olddomain.com to https://newdomain.com. This is criticalwithout this step, your site will redirect to the old URL or display a white screen.

If you used a migration plugin, this step is handled automatically. The plugin scans the database for old URLs and replaces them with the new ones during installation.

7. Update wp-config.php

Open the wp-config.php file you uploaded to the new server in a text editor. Update the database connection details:

  • DB_NAME the name of your new database
  • DB_USER the username for the new database
  • DB_PASSWORD the password for the new database
  • DB_HOST usually localhost, but check your hosts documentation

Save the file and upload it back to the server. Incorrect credentials here will result in a Error Establishing a Database Connection message.

8. Test Your Site Locally

Before pointing your domain to the new server, test your migrated site locally. You can do this by editing your computers hosts file to map the new domain to the new servers IP address. This allows you to access the site as if the DNS has propagated, without affecting live traffic.

Open your hosts file (on Windows: C:\Windows\System32\drivers\etc\hosts; on macOS/Linux: /etc/hosts). Add a line:

123.45.67.89 newdomain.com

Replace the IP with your new servers actual IP. Save the file. Now visit https://newdomain.com in your browser. If the site loads correctly, your migration is successful. Check all pages, forms, media, plugins, and user logins. Test critical functions like WooCommerce checkout, contact forms, and login/logout.

9. Update DNS and Point Domain

Once testing is complete, update your domains DNS settings to point to the new server. Log in to your domain registrar (e.g., GoDaddy, Namecheap) and change the A record to the new servers IP address. If youre using nameservers from your new host, update those instead.

Clear your browser cache and any CDN caches (Cloudflare, StackPath). Use tools like DNSChecker.org to monitor propagation. DNS changes can take minutes to 48 hours, depending on your TTL settings.

10. Redirect Old Domain to New Domain (If Applicable)

If youre changing domains, set up a 301 redirect from the old domain to the new one. This preserves SEO value and ensures visitors and search engines are directed correctly. Add this code to the .htaccess file on your old server:

RewriteEngine On

RewriteCond %{HTTP_HOST} ^olddomain\.com$ [OR]

RewriteCond %{HTTP_HOST} ^www\.olddomain\.com$

RewriteRule (.*)$ https://newdomain.com/$1 [R=301,L]

Replace olddomain.com and newdomain.com with your actual domains. Test the redirect by visiting the old URL in an incognito window. It should automatically forward to the new site with a 301 status code.

Best Practices

Always Backup First

No matter how simple the migration seems, never skip the backup step. Even experienced developers have lost sites due to overlooked files or corrupted exports. Use a combination of local and cloud backups. Store at least three copies: one on your computer, one in the cloud, and one on an external drive. Verify the backup can be restored before proceeding.

Use a Staging Environment

Many hosting providers offer staging environmentsduplicate copies of your live site used for testing changes. Use this feature to test your migration before applying it to the live server. If youre on shared hosting without staging, create a subdomain like staging.yoursite.com and replicate the migration there.

Disable Caching During Migration

Temporarily disable all caching plugins (W3 Total Cache, WP Super Cache, LiteSpeed Cache) and CDN services (Cloudflare, BunnyCDN) before migration. Cached files can interfere with URL replacements and cause mixed content errors. Re-enable them after migration and clear all caches.

Update URLs Correctly

Simply changing the site URL in wp_options is not enough. WordPress stores full URLs in post content, metadata, and plugin settings. Use a plugin like Better Search Replace or WP Migrate DB to find and replace all instances of the old domain with the new one across the entire database. Always perform a dry run first to preview changes.

Check for Mixed Content Warnings

After migration, use your browsers developer tools (F12) to check the Console and Network tabs. Look for Mixed Content errorsthese occur when a page loads over HTTPS but includes resources (images, scripts, stylesheets) loaded over HTTP. Fix them by updating URLs in your database or using a plugin like SSL Insecure Content Fixer.

Test on Multiple Devices and Browsers

Dont assume your site works because it looks fine on your desktop. Test on mobile devices (iOS and Android), tablets, and different browsers (Chrome, Firefox, Safari, Edge). Check forms, menus, buttons, and media playback. Use tools like BrowserStack for cross-browser testing if needed.

Monitor Performance Post-Migration

Use tools like Google PageSpeed Insights, GTmetrix, or WebPageTest to compare your sites performance before and after migration. A new server may be faster, but misconfigured caching or unoptimized images can negate gains. Optimize images with ShortPixel or Imagify, enable GZIP compression, and defer JavaScript loading.

Update Internal Links

Use a plugin like Broken Link Checker to scan for broken internal links after migration. Even if youve updated URLs correctly, custom links in widgets, menus, or hardcoded HTML may still point to the old domain. Fix them manually or use a bulk editor.

Revalidate SEO Settings

After migration, re-submit your sitemap to Google Search Console and Bing Webmaster Tools. Verify ownership of the new site. Check that robots.txt is intact and not blocking crawlers. Monitor crawl errors and indexing status for at least two weeks. Ensure your canonical tags and hreflang attributes (if multilingual) are still accurate.

Notify Users and Stakeholders

If your site has a user baseespecially a membership or e-commerce sitenotify them in advance of scheduled downtime. Use banners, email newsletters, or social media to inform visitors. Set up a maintenance mode page using a plugin like SeedProd to display a professional message during the transition.

Tools and Resources

Migration Plugins

  • Duplicator Free and widely used. Creates a package with installer for easy transfer. Ideal for beginners.
  • All-in-One WP Migration Simple drag-and-drop interface. Supports large sites with premium add-ons.
  • BlogVault Offers real-time backups and one-click migration. Excellent for e-commerce sites.
  • WP Migrate DB Focused on database migration. Great for developers who want fine control over URL replacements.
  • UpdraftPlus Primarily a backup tool, but allows restoring to a new location. Reliable and secure.

Database Management

  • phpMyAdmin Built into most hosting panels. Free and powerful for manual database edits.
  • Adminer Lightweight alternative to phpMyAdmin. Easier to use and faster.
  • MySQL Workbench Desktop application for advanced users. Useful for large database exports/imports.

File Transfer

  • FileZilla Free, open-source FTP/SFTP client. Cross-platform and reliable.
  • WinSCP Windows-only, but excellent for secure file transfers with scripting support.
  • cPanel File Manager Built-in tool for basic uploads and downloads. Limited for large sites.

URL Replacement

  • Better Search Replace WordPress plugin that safely replaces strings in the database.
  • Search & Replace DB PHP script that runs directly on your server. Avoids memory limits of plugins.

Performance and SEO Tools

  • Google Search Console Monitor indexing, crawl errors, and performance.
  • Google Analytics Track traffic patterns before and after migration.
  • GTmetrix Analyze page speed and provide optimization recommendations.
  • Redirect Checker Verify 301 redirects are working correctly.
  • SSL Labs (SSL Test) Check your SSL certificate configuration and security rating.

Documentation and Learning

  • WordPress Codex Official documentation for core functions and migration procedures.
  • WPBeginner Beginner-friendly tutorials with step-by-step visuals.
  • Stack Overflow Community-driven Q&A for troubleshooting migration errors.
  • Reddit r/WordPress Active community sharing real-world migration experiences.

Real Examples

Example 1: Small Business Blog Moving to Managed WordPress Hosting

A local bakery with a WordPress blog on shared hosting experienced slow load times and frequent downtime. They migrated to Kinsta using the free migration service. The process took less than 24 hours. Kinstas team handled the backup, database transfer, domain update, and SSL setup. The bakerys site load time dropped from 4.2 seconds to 0.9 seconds. Organic traffic increased by 37% over the next month due to improved Core Web Vitals. No SEO rankings were lost because 301 redirects were properly implemented.

Example 2: E-Commerce Store Changing Domains

An online clothing store changed its domain from trendywear.com to stylehub.com to better reflect its brand identity. The owner attempted a manual migration but forgot to update URLs in WooCommerce product variations and email templates. As a result, order confirmation emails contained broken links, and customers reported missing images. The fix required using Better Search Replace to update 12,000+ database entries. After correcting the URLs and re-submitting the sitemap, rankings recovered fully within six weeks. The lesson: always test transactional emails and product pages after domain changes.

Example 3: Developer Migrating a Multisite Network

A developer managing a WordPress Multisite network with 15 sub-sites migrated from a legacy server to a new VPS. The challenge was preserving network-wide settings, user roles, and plugin configurations across all sites. They used WP Migrate DB Pro to export each sites database individually, then imported them into the new multisite structure. Custom themes and plugins were manually copied. After migration, they ran a bulk link checker and updated all network-wide settings in the Network Admin dashboard. The entire process took three days but resulted in a 50% reduction in server costs and improved uptime.

Example 4: Nonprofit Migrating from HTTP to HTTPS

A nonprofit organizations site was still using HTTP. They wanted to switch to HTTPS for security and SEO benefits. The migration involved installing an SSL certificate, updating all internal links, and fixing mixed content. They used the Really Simple SSL plugin, which auto-configured redirects and fixed most issues. However, some hardcoded image URLs in old blog posts remained broken. They used the Search & Replace DB script to find and replace all http:// instances with https:// in the database. After testing, they saw a 15% increase in form submissions and improved trust signals from visitors.

FAQs

Can I migrate a WordPress site without downtime?

Yes, but it requires careful planning. Use a staging environment to test the migration. Once ready, schedule the DNS switch during low-traffic hours. Use a maintenance mode plugin to show a friendly message while the switch occurs. DNS propagation typically takes minutes to a few hours, so downtime is minimal if done correctly.

Will I lose SEO rankings during migration?

Noif you follow best practices. Implement 301 redirects from old URLs to new ones, preserve your permalink structure, submit updated sitemaps, and monitor Search Console for crawl errors. If you change your domain or URL structure without redirects, you risk losing rankings.

How long does a WordPress migration take?

It depends on site size and method. A small site (under 1GB) can be migrated in under an hour using a plugin. A large site with 10,000+ posts and media files may take 412 hours manually. Hosting provider migrations typically take 2448 hours due to queue times.

What if my site breaks after migration?

Restore from your backup immediately. Common issues include incorrect database credentials, missing files, or unupdated URLs. Check the error log in your hosting panel. Disable plugins one by one to identify conflicts. If youre stuck, consult your hosting providers support or a WordPress developer.

Do I need to update plugins and themes after migration?

Not necessarily, but its recommended. Migration doesnt change your installed versions, but new servers may run different PHP versions. Check if your plugins and themes are compatible with the new environment. Update them after confirming the site works properly.

Can I migrate a WordPress site to a different platform like Shopify or Webflow?

Yes, but its not a WordPress-to-WordPress migration. Youll need to export content (posts, pages, media) and manually rebuild the site on the new platform. Use tools like WordPress Exporter to generate an XML file, then import it into the new system if supported. This is a redesign, not a simple migration.

Whats the difference between cloning and migrating a WordPress site?

Cloning creates an exact duplicate of your site on the same server or a subdomain for testing. Migrating moves your site from one server or domain to another. Cloning is for development; migrating is for production changes.

Is it safe to use free migration plugins?

Most reputable free plugins like Duplicator and UpdraftPlus are safe. Avoid unknown plugins with poor reviews or outdated support. Always check the plugins last update date, user ratings, and developer reputation. Premium plugins often offer better support and security.

Do I need to update my XML sitemap after migration?

Yes. Search engines need to know your sites structure has changed. Resubmit your sitemap in Google Search Console and Bing Webmaster Tools. If you use a plugin like Yoast SEO or Rank Math, regenerate the sitemap after migration.

What if my email stops working after migration?

Email is handled by your domains MX records, not your WordPress site. If emails stop working, check your domains DNS settings to ensure MX records still point to your email provider (e.g., Google Workspace, Microsoft 365). WordPress migration does not affect email routing unless you changed nameservers incorrectly.

Conclusion

Migrating a WordPress website is not a task to be taken lightly, but with the right preparation, tools, and methodology, it can be executed smoothly and successfully. Whether youre upgrading your hosting, changing domains, or optimizing performance, each migration is an opportunity to improve your sites reliability, speed, and security. The key lies in meticulous planning, comprehensive backups, thorough testing, and attention to SEO details like redirects and URL consistency.

By following the step-by-step guide outlined in this tutorial, implementing best practices, leveraging trusted tools, and learning from real-world examples, you gain not only the ability to migrate WordPress sites confidently but also a deeper understanding of how WordPress functions under the hood. Remember: the goal is not just to move files and databasesits to preserve your digital presence, maintain user trust, and enhance your sites long-term success.

As you complete your next migration, treat it as a learning experience. Document your process, note any challenges you faced, and refine your approach for future projects. With each migration, you become more proficient, more resilient, and better equipped to handle the evolving demands of modern web publishing.