This guide explains how to migrate woocommerce to new site safely and with minimal customer disruption. Migrating a live store requires careful backups, consent-aware handling of customer data, structured testing, and a clear rollback path to avoid downtime, lost orders, or broken payments.
Pre-Migration Checklist
Before touching files or DNS, assemble an auditable checklist so every step is tracked. The checklist below helps reduce human error when you move WooCommerce to new domain or transfer WooCommerce store data between hosts.
- Full Backups: Take a filesystem snapshot and a complete database dump. Keep at least two copies: one on your provider and one offsite. Verify backups by restoring to a disposable environment.
- Staging Environment: Create a staging site on the destination host or a protected subdomain. Use HTTP auth, VPN, or IP allowlisting to prevent public access while testing.
- Permissions and Users: Audit administrator accounts and API keys. Remove unused accounts, grant least privilege, and plan to rotate keys and passwords after launch.
- Privacy And Consent: Catalog which customer fields and consents will be copied. Avoid moving marketing opt-ins unless consent records are preserved. Follow local laws and document transfer purpose and retention.
- Provider Limits: Confirm destination PHP memory_limit, upload_max_filesize, max_execution_time, MySQL import size, and any storage egress charges for large media transfers.
Decision Criteria: Plugin vs Manual Migration
Choose a migration approach based on scale and complexity.
- CSV / Plugin Export: Best for small catalogs and stores with fewer than a few thousand products/orders. Easier to map fields and avoid direct DB work.
- Database-Level Migration: Preferred for large stores (tens of thousands of orders/products), custom postmeta complexity, or when you need to preserve order IDs and relational integrity. Requires careful serialized-data handling.
- Hybrid: Use DB export for posts and meta, CSV for product pricing variations, and SFTP for media. Choose hybrid when some tables are enormous or vendor plugins provide CSV-friendly exports.
Exporting Products, Orders, And Customers
Pick tools that preserve relationships and metadata. For products use WooCommerce CSV tools; for orders and customers consider table exports if scale demands it.
- Products: Export via the WooCommerce Product CSV Importer or the database product post types (wp_posts and wp_postmeta). Validate SKUs and variation parent/child links after import (WooCommerce Product CSV Importer).
- Orders And Customers: Export orders and customers either with a plugin that understands WooCommerce order tables or by exporting relevant tables: wp_posts, wp_postmeta, wp_woocommerce_order_items, wp_woocommerce_order_itemmeta, wp_users, wp_usermeta. Never export raw payment card data — rely on payment provider tokens.
- Media Files: Transfer /wp-content/uploads via SFTP, rsync, or object storage. Preserve directory structure, timestamps, and file permissions to avoid broken thumbnails and regeneration issues.
Implementation Steps For The Transfer
- Create Destination Environment: Install matching WordPress and WooCommerce versions and align PHP and MySQL versions where feasible. Install themes and plugins in inactive state for initial validation.
- Import Database And Files: For SQL imports use serialized-aware search-and-replace tools such as WP-CLI’s search-replace (see WP-CLI search-replace). Avoid naive string replacements that corrupt serialized arrays.
- Reconfigure Permalinks And Rewrite Rules: Save permalinks to regenerate rewrite rules and inspect .htaccess or NGINX configs for custom redirects. Maintain SEO-friendly structure unless you have a redirect map.
- Update URLs Safely: Update siteurl and home values in wp_options and run a serialized-aware replacement for content links and meta. Confirm canonical and Open Graph tags reference the correct domain.
- Payment Gateways & Credentials: Re-enter API keys and webhook endpoints. Test in sandbox/test mode on staging. Limit access to keys on staging environments and rotate them post-launch.
- Security Hardening: Disable the file editor, ensure correct file permissions, enforce strong admin passwords, install a web application firewall if available, and enable HTTPS with valid certificates.
WooCommerce Site Migration Testing
Testing must mimic real customers and edge cases. Use a written test plan and sign off each test before proceeding.
- Order Flow: Place sandbox test orders across payment types. Validate order creation, emails, webhooks, stock adjustments, fulfillment notes, and refunds.
- Data Integrity: Verify counts of products, users, orders, coupons, and reviews match the source. Spot-check meta like SKUs, attributes, and tax status.
- Customer Accounts: Test login, password reset, address editing, and saved payment tokens where applicable.
- Shipping, Tax & Coupons: Simulate addresses across zones, confirm tax calculations, and validate coupon usage limits and restrictions.
- Performance & Caching: Test page load on category and product listing pages, and ensure caching plugins or CDNs are configured correctly for dynamic pages like checkout.
- Accessibility: Check image alt attributes, form labels, keyboard navigation, focus order, and screen-reader announcements on cart and checkout. Fix missing labels and ensure ARIA roles where necessary.
Troubleshooting Common Issues
- Serialized Data Corruption: If fields appear broken post-import, re-run a serialized-aware search-replace or restore the database and retry with WP-CLI.
- Broken Media Links: Reconfirm uploads path and permissions. If thumbnails are missing, regenerate thumbnails via a trusted plugin after verifying originals exist.
- Mixed Content: Force HTTPS at the server and replace http:// URLs in the database. Check external embeds and third-party scripts for HTTPS availability.
- Payment Failures: Verify webhook URLs, gateway credentials, TLS versions allowed by your host, and any IP allowlists required by the gateway.
- Large Imports Time Out: Use host-provided import tools, split SQL dumps, import via CLI, or request temporary increases in execution time from your provider.
Backups, Rollback, And Final Launch
Plan the launch to minimize risk and ensure an easy rollback if needed.
- Lower DNS TTL: Reduce TTL 48–72 hours before cutover to speed propagation and potential rollback.
- Final Incremental Backup: Take a snapshot and export recent orders immediately before cutover. If you cannot freeze orders, plan to export and import delta orders taken during DNS propagation.
- Maintenance Mode During Cutover: Consider briefly placing the source site in maintenance mode or a read-only state to prevent new orders during final sync.
- Monitor Post-Launch: Watch logs, payment success rates, error pages, performance metrics, and email deliverability for 24–72 hours.
- Rollback Criteria & Procedure: Define clear failure thresholds (e.g., payment gateway errors above X%, data corruption). If rollback is required, restore the source snapshot, switch DNS back, and reconcile any orders taken during the window with manual exports and customer communication.
Provider Caveats And Final Notes
- Hosts may impose import limits, block high-volume outbound connections, or charge egress for large media transfers—plan ahead and consult your host’s documentation.
- Email providers often throttle new IPs; verify transactional email deliverability and consider a dedicated provider or DNS authentication (SPF, DKIM, DMARC).
- Third-party gateways and integrations may require re-registration of webhook endpoints or allowlisting of IP ranges after a domain change.
- Keep official documentation handy: the WordPress moving guide (wordpress.org/support/article/moving-wordpress) and WP-CLI search-replace docs (developer.wordpress.org/cli/commands/search-replace/).
Conclusion
Migrating a live WooCommerce store is manageable when you combine careful backups, a staging environment, documented decision criteria for your migration method, thorough testing, and a clear rollback plan. Secure customer data, rotate credentials, validate accessibility, and verify provider limits before launch. With these steps you can move WooCommerce to a new domain with reduced risk and a smoother customer experience.







