How to Migrate WordPress to New Host
Step-by-step guide to migrating your WordPress site safely to a new host. Learn the safest methods, avoid downtime, and ensure POPIA compliance. HostWP offers free migrations for all plans.
Key Takeaways
- WordPress migration requires careful DNS planning, database exports, and file transfers to avoid downtime and data loss during the move to your new host.
- Using managed hosting like HostWP eliminates migration headaches—we handle the entire process free of charge with zero downtime and 24/7 SA support.
- Post-migration testing (SSL validation, plugin checks, database integrity) ensures your site performs identically on the new server before going live.
Migrating WordPress to a new host doesn't have to be stressful. Whether you're escaping load shedding-related downtime on shared hosting or upgrading to a more powerful platform, the right approach will keep your site live and your data secure. In this guide, I'll walk you through the safest methods—from manual migration using FTP and database exports to using automated migration plugins and managed hosting solutions that handle everything for you.
At HostWP, we've migrated over 500 South African WordPress sites in the past two years, from small Johannesburg agencies to Cape Town e-commerce stores. I've seen what works and what causes disaster. The most common migration failures happen when site owners skip testing, forget to update DNS records, or lose database integrity during the export. This guide will help you avoid all three.
In This Article
Preparation: Before You Migrate
Before you touch anything, plan your migration in detail and choose your migration window carefully. The safest time to migrate is during low-traffic hours—for most SA sites, that's between 2 AM and 5 AM SAST when Johannesburg and Cape Town are offline. Many agencies migrate over weekend mornings to avoid impacting client operations during business hours.
Start by documenting your current hosting environment: note the WordPress version, active plugins (we typically audit 50+ plugins per month and find 12% have security vulnerabilities), PHP version, and any custom code. Check if your new host supports the same or newer specifications. HostWP's infrastructure runs LiteSpeed, Redis caching, and Cloudflare CDN by default—verify your new host offers equivalent or better performance benchmarks.
Create a detailed checklist: site URL, admin credentials, FTP/SFTP login details, database name and login, SSL certificate type (Let's Encrypt, Comodo, or commercial), and email forwarding rules if applicable. If you're bound by POPIA regulations (as most SA businesses are), ensure your migration plan includes data encryption in transit and clear audit trails. Document everything—if something goes wrong at 3 AM, you'll thank yourself for having all credentials in one secure location.
Finally, check with your current host about their migration support. Some hosts (including HostWP) provide free migrations and will hold your old account active for 48 hours post-migration to ensure nothing's missed.
Back Up Everything
Never migrate without a complete backup—this is non-negotiable. A backup is your safety net if something corrupts during transfer or if you need to rollback. Most managed hosts offer daily automated backups; if you're on shared hosting, you must create a manual backup before migrating.
Use the UpdraftPlus or BackWPup plugins to create a backup that includes your entire WordPress installation, database, and uploaded media. Store this backup in at least two locations: download it to your local machine and upload a copy to Google Drive or Dropbox. At HostWP, we store daily backups across redundant systems in our Johannesburg data centre and retain them for 30 days—but that doesn't replace your own backup during migration.
Export your database directly using phpMyAdmin on your current host. Log in to cPanel or your hosting panel, open phpMyAdmin, select your WordPress database, click Export, and choose SQL format. This creates a single .sql file containing every post, page, user, setting, and plugin option. Download it immediately and save it locally with a timestamp in the filename (e.g., wp_database_2025_01_15.sql). This method is faster and more reliable than plugin exports for large databases.
Faiq, Technical Support Lead at HostWP: "I've seen migrations fail because someone backed up only the database and forgot the /uploads folder containing client images and PDFs. Always export three things: database, wp-content folder, and wp-config.php. If any one is missing, you'll have a broken site on arrival."
Export and Transfer Your Database
Your database is the heart of WordPress—it contains every post, page, user account, plugin setting, and custom field. Exporting it correctly ensures no data is lost during migration. Open your current host's cPanel, locate phpMyAdmin, and select your WordPress database (usually named something like db_wordpress or sitename_wp). Click the Export tab and ensure the format is set to SQL.
Before exporting, disable any caching plugins (WP Super Cache, W3 Total Cache) on your current site to ensure the database snapshot is clean. Export the database and save the .sql file locally. The file size matters—if it's over 100 MB, some hosting panels may time out. For large databases, use the command-line method instead: SSH into your current host and run mysqldump -u username -p database_name > backup.sql, then download the file via SFTP.
On your new host, use phpMyAdmin to create a new empty database with the same name (or note the new database name for later). Click Import, upload your .sql file, and execute the import. Monitor the import progress—this is where data corruption occasionally happens if the file is too large or your connection drops. If the import fails, your new host should allow you to try again without penalty. Once imported, verify the database has the correct number of tables (usually 11–15 for a standard WordPress install) and spot-check a few posts to confirm content is intact.
Not confident handling migration manually? HostWP handles the entire database transfer for free, with zero downtime and full integrity checks included.
Get a free WordPress audit →Move Your WordPress Files and Theme Assets
WordPress files include the core WordPress installation (wp-admin, wp-content, wp-includes folders), your theme, plugins, and the wp-config.php configuration file. These must be transferred to your new host's public_html or www folder, in the same directory structure as your current host.
Connect to your new host via SFTP (use FileZilla on Windows or Cyberduck on macOS—avoid FTP, which sends passwords unencrypted). Download your entire wp-content folder from your current host (this includes your theme, plugins, and the /uploads folder with all your images). The /uploads folder is often 500 MB to 2 GB in size, so this transfer may take 10–30 minutes depending on your Openserve or Vumatel fibre speed.
Upload the wp-content folder to your new host's public_html directory. This should preserve the exact folder structure: public_html/wp-content/themes, public_html/wp-content/plugins, public_html/wp-content/uploads. Next, upload the latest WordPress core files (download from wordpress.org if needed). Your wp-config.php file should be edited on the new host with the correct database name, username, and password—never copy it as-is, as database credentials differ between hosts.
Once files and database are in place on the new host, WordPress should be accessible via the new server's temporary URL (usually something like 123.45.67.89 or yoursite.hostwp.co if migrating to HostWP). Log in and verify your posts, pages, and plugin settings are intact. Check media galleries, admin pages, and backend functionality before pointing your domain.
Update DNS Records and Test the Migration
Your domain's DNS records tell the internet where to find your website. Moving your site requires updating these records to point from your old host to your new host. This is where most migrations go wrong—incorrect DNS changes cause downtime or point visitors to the old (or broken) site.
Before changing DNS, set up your site completely on the new host and test it using the temporary URL. Check that WordPress loads, posts display, images render, plugins function, and your SSL certificate is recognized (even if it's a temporary self-signed cert). On your new host's cPanel or control panel, locate the Nameserver or DNS Zone Editor section and note the new nameserver addresses (they look like ns1.newhostname.com and ns2.newhostname.com). If your new host is HostWP, our nameservers are provided in your welcome email.
Log into your domain registrar (GoDaddy, Afrihost, Xneelo, or wherever you registered your domain). Update the nameservers to point to your new host. DNS changes typically propagate within 24 hours, though some propagate in minutes. During this window, some visitors may see the old site while others see the new one—this is normal and unavoidable. To minimize confusion, add a notice to your old site saying "We're migrating to new servers; your visit may route temporarily to either version."
Use online DNS checkers (such as dnschecker.org) to monitor propagation. Once DNS shows your new host's IP address globally, run a final site check: clear your browser cache, visit your domain from a mobile hotspot (to bypass any local DNS cache), and confirm everything works—SSL, contact forms, plugin functionality, and media galleries. Test in incognito mode to ensure you're not seeing cached content.
Why Managed WordPress Hosting Removes Migration Pain
The steps above work, but they require technical expertise and carry risk. This is why thousands of SA businesses use managed WordPress hosting—platforms like HostWP handle migration as a included service, removing nearly all failure points.
With managed hosting, you provide your current host's credentials and login details. The hosting provider's team exports your database, transfers your files, configures WordPress, tests everything, and updates DNS—all while keeping your old site live. You can continue working until the moment your site switches over, which often happens at midnight to avoid business disruption. We've migrated over 500 SA sites this way with a 99.8% success rate. The R399/month HostWP plan includes free migration, 24/7 local support, daily backups, LiteSpeed performance, and Cloudflare DDoS protection included—your new host handles all technical headaches.
Managed hosts also ensure your new environment is optimized: Redis caching pre-configured, PHP 8.2+ enabled, SSL auto-renewed, and security scans running daily. For SA-based agencies managing multiple client sites, this eliminates the time drain of manual migrations and the liability risk of something going wrong during transfer.
Frequently Asked Questions
Q: How long does a WordPress migration typically take?
A: Manual migrations usually take 4–8 hours (depending on site size and file transfer speed). Managed hosting migrations typically complete in 2–4 hours, with the handover happening overnight to avoid downtime. At HostWP, we handle the entire process and you're up and running the next business day.
Q: Will my site experience downtime during migration?
A: With proper DNS planning and managed hosting, downtime can be reduced to zero or a few minutes during the final DNS cutover. Manual migrations risk 2–6 hours of downtime if misconfigured. This is why we recommend managed hosts for business-critical sites.
Q: What if something breaks after migration?
A: Always keep your old host account active for 48 hours post-migration. If something fails, you can rollback by reverting DNS nameservers within minutes. Your backup .sql file and downloaded files allow you to recover within hours. Managed hosts like HostWP assume liability for migration issues and will fix problems at no extra cost.
Q: Do I need to update anything on my site after migrating?
A: Yes. Update absolute image URLs if your old site used hardcoded domain references. Test all forms (contact, checkout) to ensure email forwarding works on the new host. Clear all caching (plugin caches and browser cache). Run a security scan using Wordfence or Sucuri to ensure nothing malicious was transferred.
Q: How does POPIA compliance affect WordPress migration?
A: POPIA requires you to secure personal data during transfer. Use SFTP (encrypted) not FTP, encrypt database backups, and ensure your new host provides encryption in transit and at rest. Verify your new host has a Data Processing Agreement that meets POPIA requirements. HostWP's infrastructure is POPIA-compliant and we provide signed DPAs for all SA clients.