WordPress Server Migration – A Complete Step-by-Step Guide

Published: March 20, 2026 · Author: Marcin Szewczyk-Wilgan

Changing servers is one of the most stressful operations for a WordPress site owner. Risk of data loss, downtime, database issues, and search ranking drops – these are fears that prevent many businesses from migrating, even when the current hosting is clearly inadequate. Yet a properly executed migration is a safe, repeatable operation – and with proper preparation, downtime-free. In this guide, we describe the entire process step by step: from planning and preparation, through file and database transfer, to testing, DNS switching, and post-migration verification.

Preparing for Migration

Most migration problems stem from inadequate preparation. Solid planning eliminates risk and minimizes downtime.

Full backupBefore any operation – a complete backup: all WordPress files (wp-content, wp-config.php, .htaccess, core) and a full MySQL database dump (mysqldump). Copy stored in a separate location – not on the server you are migrating from.
Configuration documentationDocument the current configuration: PHP version, MySQL/MariaDB version, memory limits (memory_limit, max_execution_time), PHP modules, cache configuration (Redis, Memcached, OPcache), .htaccess rules or Nginx configuration, SSL settings, WordPress cron jobs.
New server verificationEnsure the new server meets requirements: appropriate PHP version (minimum 8.1, recommended 8.2+), MySQL 8.0+ or MariaDB 10.6+, sufficient RAM, mod_rewrite support (Apache) or proper Nginx configuration, SSL certificate.
Updates and cleanupBefore migration, update WordPress, plugins, and themes to their latest versions. Remove unused plugins and themes. Clean the database of revisions, transients, and junk. Disable cache and CDN plugins – they will be configured on the new server.

Transferring Files and Database

This is the technical heart of the migration. Two components must be transferred and synchronized: WordPress files (wp-content, core, configuration) and the MySQL database.

File transferTransfer files via SFTP, SCP, or rsync. Rsync is fastest for large sites – it transfers only differences. The key items are the wp-content directory (themes, plugins, media) and wp-config.php. Check file permissions after transfer (typically 644 for files, 755 for directories).
Database exportExport the database via mysqldump with --single-transaction (for InnoDB – ensures consistency without locking tables) and --routines parameters. For large databases (1 GB+), consider compression (gzip) and direct server-to-server transfer.
Import on the new serverImport the database on the new server (mysql < dump.sql). Update wp-config.php with new access credentials: DB_NAME, DB_USER, DB_PASSWORD, DB_HOST. If the domain changes – URL replacement in the database is required (WP-CLI search-replace or Search Replace DB tool).
URL replacement (if domain changes)WordPress stores full URLs in the database (in posts, options, meta fields). Simple text replacement is not enough – data is often serialized. WP-CLI tool: wp search-replace 'old-domain.com' 'new-domain.com' – safely handles serialization.

DNS and Traffic Switching

The DNS switch is the moment when the domain starts pointing to the new server. Proper management of this stage determines whether the migration is downtime-free or not.

Lower TTL24–48 hours before the planned migration, lower the DNS record TTL (Time to Live) to a minimum (60–300 seconds). This way, after changing the A record, propagation takes minutes, not hours. After migration is complete, restore TTL to its normal value.
Pre-switch testingBefore changing DNS, test the site on the new server: edit your local hosts file (point the domain to the new server IP) or use a temporary address. Check: homepage, subpages, forms, login, cart (WooCommerce), SSL certificate, redirects.
Final synchronizationJust before the DNS switch, perform a final rsync of files and a fresh database dump/import – to capture content added since the first transfer. This eliminates the data gap between the old and new server.
DNS record changeChange the domain’s A record to the new server’s IP. Monitor propagation (tools: whatsmydns.net, dig). Keep the old server active for a minimum of 48 hours after the change – some users may still be hitting the old IP address.

Post-Migration Verification

Migration does not end with the DNS switch. Systematic post-migration verification prevents problems that may only surface days later.

Functionality

Site testing

Check every key function: contact forms, login, registration, cart and payments (WooCommerce), search, maps, external integrations. Test on mobile and desktop. Verify that all images and media load correctly.

SSL and security

Certificate and configuration

Verify SSL certificate validity on the new server. Check HTTP → HTTPS redirect. Ensure wp-config.php contains correct data and file permissions are correct. Reconfigure the firewall and server security.

SEO

Indexing and rankings

Check Google Search Console – whether Googlebot correctly indexes the site from the new server. Verify sitemap.xml, robots.txt, and 301 redirects. Monitor search rankings for the following weeks. If changing domains – submit a change of address in Search Console.

Performance

Cache and optimization

Configure caching on the new server (page cache, object cache, OPcache). Set up CDN. Run a Core Web Vitals test (PageSpeed Insights) – ensure results are equal to or better than before migration. Configure daily backups.

Summary

WordPress server migration is an operation that, with a professional approach, runs smoothly and without downtime. The key is thorough preparation, systematic transfer of both components (files + database), pre-switch testing, and comprehensive post-migration verification. The greatest risk comes not from the transfer itself, but from skipping one of the verification steps.

At WebOptimo, we perform zero-downtime WordPress migrations – from small business sites to complex WooCommerce stores and Multisite installations. We handle the entire process: planning, transfer, new server configuration, testing, and verification. If you are planning a hosting change – contact us or check our WordPress hosting offer.

Frequently Asked Questions About WordPress Migration

It depends on site size. Small site (up to 1 GB) – a few hours. Large WooCommerce store – up to several hours. The longest stage is usually DNS propagation (up to 48 hours), though in practice it is visible much sooner.

With a properly executed migration, downtime is zero or minimal. Key: keep the old server active until full DNS propagation and do a final data sync before switching.

No – if migrating servers without changing the domain, all URLs stay identical. If the domain also changes, database URL rewriting and 301 redirects are needed.

Technically yes, but it requires MySQL, server configuration, file permission, and DNS experience. Errors can cause data loss, downtime, or SEO issues. For business sites and WooCommerce, we recommend professional help.

Full backup (files + database), document configuration, verify new server requirements, update WordPress and plugins, disable cache and CDN, inform the team about the migration window.

Planning a WordPress Migration? We Can Help

We will handle the entire migration process – from planning to post-migration verification. Zero downtime guaranteed. No commitments – a concrete proposal after analysis.

Phone

+48 608 271 665

Mon–Fri, 8:00–16:00 CET

E-mail

contact@weboptimo.pl

We respond within 24h

Company

WebOptimo

VAT ID: PL6391758393