Step-by-Step WordPress Migration Without Downtime
Overview
Moving a WordPress site without downtime requires careful planning and execution. The key is to set up the new host while keeping the original site running, then switching DNS only when everything is ready.
Prerequisites
- Access to both current and new hosting control panels
- FTP/SFTP credentials
- Database access
- DNS management access
- Backup solution
Recommended Tools
-
Duplicator Pro (duplicator.com)
- Creates full site packages
- Handles large sites efficiently
- Database search/replace included
-
All-in-One WP Migration (servmask.com)
- Simple interface
- Good for smaller sites
- Direct server-to-server transfer
Migration Process
1. Preparation
- Perform full backup
- Document current configuration
- Lower TTL values (24 hours before migration)
- Clean up unnecessary files/plugins
2. Initial Setup
- Set up new hosting environment
- Install fresh WordPress
- Configure PHP version and limits
- Set up SSL certificates
3. Content Transfer
Using Duplicator Pro:
// Add to wp-config.php on source site to enable archive creation
define('WP_MEMORY_LIMIT', '512M');
define('MAX_EXECUTION_TIME', 300);
4. Database Migration
- Export current database
- Import to new host
- Update URLs
Database search/replace snippet:
// Run this in phpMyAdmin or similar tool
UPDATE wp_options SET option_value = replace(option_value, 'http://oldsite.com', 'http://newsite.com');
UPDATE wp_posts SET guid = replace(guid, 'http://oldsite.com', 'http://newsite.com');
UPDATE wp_posts SET post_content = replace(post_content, 'http://oldsite.com', 'http://newsite.com');
5. Testing
- Check new site functionality
- Test forms and integrations
- Verify SSL configuration
- Check email functionality
6. DNS Switch
- Update nameservers/DNS records
- Keep old hosting active for 48 hours
- Monitor propagation
Security Considerations
- Use SFTP instead of FTP
- Create unique database credentials
- Update all passwords after migration
- Implement SSL immediately
- Remove migration tools after completion
Common Pitfalls
- Not accounting for email configuration
- Forgetting to update internal links
- Insufficient permission settings
- Mixed content issues with SSL
- Not testing thoroughly before DNS switch
Post-Migration Tasks
- Update DNS TTL values
- Clear cache (server and plugins)
- Test functionality again
- Update backup configurations
- Document new setup
To handle large uploads during migration:
// Add to wp-config.php on new site
define('WP_MEMORY_LIMIT', '256M');
define('WP_MAX_MEMORY_LIMIT', '512M');
define('MAX_EXECUTION_TIME', 300);
Additional Tips
- Perform migration during low-traffic hours
- Create checklist for your specific setup
- Keep old hosting active as backup
- Monitor site performance after migration
- Update any external services pointing to your site
Troubleshooting
If issues occur after migration:
- Check error logs
- Verify database connection
- Review file permissions
- Clear all caches
- Test with default theme
Monitoring
- Use tools like UptimeRobot for availability
- Monitor DNS propagation
- Check server logs for errors
- Verify backup system functionality
This approach ensures minimal to zero downtime while maintaining site functionality throughout the migration process.