Migrating a WordPress site to a new host is usually straightforward when you follow the right order: back up the files and database, move them safely, update the configuration, and then test the site before switching DNS. The main goal is to avoid downtime, prevent broken links or missing media, and make sure email, SSL, and caching continue to work after the move.
If your new hosting environment uses cPanel, Plesk, or a managed WordPress platform, the exact tools may differ, but the migration process stays the same. In most cases, you can move a WordPress site manually or use a migration plugin, then verify the new server before making the domain point to it.
What you need before starting the migration
Before you begin, gather everything you need so you do not have to pause halfway through the transfer. A careful preparation step reduces the chance of data loss and makes troubleshooting much easier.
- Access to the old hosting account for files, database, and control panel.
- Access to the new host, including FTP/SFTP, database tools, or a migration feature in cPanel/Plesk.
- Your domain registrar login in case you need to update DNS records.
- WordPress administrator access to install plugins or change site settings.
- Enough storage space on the new hosting plan for all files, database backups, and email if you are migrating mailboxes too.
It is also useful to lower the DNS TTL a day before the move if you can edit DNS. This can help the domain switch faster once you are ready to go live.
Choose the migration method
There are two common ways to migrate a WordPress site: manual migration and plugin-based migration. The best option depends on the size of the site, your technical comfort, and whether the new host provides a migration service.
Manual migration
Manual migration gives you full control. It is a good option if the site is large, you want to understand each step, or the plugin method fails. You will copy the WordPress files, export the database, create a new database on the destination server, import the data, and update configuration details.
Migration plugin
A plugin can package your site and restore it on the new host with less effort. This is often the simplest route for small and medium WordPress sites. Common migration plugins can move the database, themes, plugins, uploads, and settings in one package. However, large sites, strict server limits, or custom server setups may still require manual steps.
Managed migration by the host
Some managed hosting providers will migrate the site for you. This is often the best choice if you want minimal disruption and your site includes email, multiple domains, or advanced server configuration. Even when the host handles the transfer, you should still test the site after migration and confirm that DNS, SSL, and email are working.
Back up your WordPress site completely
A full backup is essential before making any changes. You need a copy of both the website files and the database, because WordPress stores content in both places.
Files to back up
- wp-content directory, including themes, plugins, and uploads.
- wp-config.php, which contains database connection details.
- .htaccess if the site uses Apache rewrite rules or custom redirects.
- Any custom files in the root directory.
Database to back up
The database stores posts, pages, settings, user accounts, menus, and many plugin settings. Export it using phpMyAdmin, a database tool in cPanel or Plesk, or a backup plugin.
Always keep the backup in two places if possible, such as your local computer and a secure cloud folder. If something goes wrong during migration, this copy lets you restore the site quickly.
Move the WordPress files to the new host
Once your backup is ready, transfer the files to the new hosting account. If you are using cPanel, you can upload via File Manager or connect with SFTP. In Plesk, you can use File Manager or an FTP client. For larger sites, SFTP is usually more reliable than browser-based uploads.
Typical file transfer steps
- Download the WordPress files from the old host or create a full archive.
- Upload the archive to the new host or transfer the files directly.
- Extract the archive in the correct web root folder.
- Check that the main WordPress folders are present: wp-admin, wp-content, and wp-includes.
If the new host uses a different document root, make sure WordPress is placed in the correct directory. For example, some hosting accounts use public_html, while others use a domain-specific folder under a Plesk subscription.
Create a database on the new host
WordPress needs a MySQL or MariaDB database on the new server. You must create a new database, a database user, and assign the user the correct permissions.
What to create
- A new database name.
- A new database user.
- A strong password for the database user.
- All required privileges for that user on the database.
In cPanel, this is usually done in the MySQL Databases section. In Plesk, you can create the database from the Websites & Domains area. If the hosting platform offers a WordPress toolkit or migration assistant, it may create these automatically.
Import the database
After creating the database, import the SQL backup from the old host. Use phpMyAdmin, the database import tool in your control panel, or a command-line method if your environment supports it.
Database import checklist
- Make sure you are importing into the correct new database.
- Use the same database character set if possible.
- Watch for import size limits on shared hosting.
- Check for errors after the import finishes.
If the database is large, the import may time out in the browser. In that case, split the file, increase limits if your host allows it, or use a server-side import method. On managed hosting, support teams often can help with large imports.
Update wp-config.php with the new database details
WordPress connects to the database through wp-config.php. After migration, update this file so the site points to the new database name, username, and password.
Check these values carefully:
- DB_NAME — the new database name.
- DB_USER — the new database username.
- DB_PASSWORD — the password you created.
- DB_HOST — usually localhost, unless your hosting provider uses a different database server.
If you keep the same table prefix and the database import was successful, the site should connect normally. If you get a database connection error, recheck the credentials first.
Update URLs if the domain or path changed
If the site is moving to a new domain or a temporary URL on the new host, you may need to update WordPress URLs in the database. This is especially important if images, menus, or internal links still point to the old location.
When you need a search and replace
- The domain name changed.
- The site moved from a subdirectory to the root, or vice versa.
- You are testing on a temporary URL or staging address.
- Hardcoded links in content or plugins refer to the old host.
Use a tool that handles serialized data correctly. Some migration plugins and database tools can do this safely. Avoid manual global replace methods unless you are certain they are serialization-safe.
Test the site before changing DNS
Testing on the new host before switching the domain is one of the most important steps. It lets you catch problems without affecting live visitors.
Ways to test the new server
- Use the hosts file on your computer to point the domain to the new server.
- Use a temporary URL provided by the host.
- Preview the site through the hosting control panel if available.
What to check during testing
- Homepage and key pages load correctly.
- Images, CSS, and JavaScript files are working.
- Permalinks function without 404 errors.
- Forms submit correctly.
- Login and admin dashboard work.
- Plugins and themes are active and functional.
Also review server-side differences. A new PHP version, memory limit, or caching layer can affect behavior. If your previous host used Apache and the new one uses Nginx or a different Apache configuration, some rewrite rules may need adjustment.
Switch DNS to the new host
After the site is fully tested, update your DNS records so the domain points to the new hosting platform. This can be done at your domain registrar or through your DNS provider.
Common DNS updates
- A record for the main domain.
- AAAA record if you use IPv6.
- www CNAME or A record, depending on your setup.
- Any mail-related records if your email is moving too.
DNS changes may take time to propagate. During this period, some visitors may still see the old site while others see the new one. Keeping the old hosting account active for a few days helps prevent downtime while DNS updates across the internet.
Check SSL, caching, and email after the move
A WordPress migration is not complete until the surrounding services are verified. SSL certificates, cache plugins, and email routing can all be affected by a server move.
SSL certificate
Make sure the site loads over HTTPS after migration. If the new host provides free SSL, issue or reissue the certificate for the domain and www version if needed. Then confirm that mixed content warnings are gone and all pages redirect properly to HTTPS.
Caching
If you use a page caching plugin, object cache, or server-side cache, clear and rebuild the cache after migration. Old cache files can cause outdated content or broken styling.
If your email was hosted on the same server, verify mailbox settings, MX records, and mail routing. If email stays elsewhere, make sure DNS mail records remain unchanged. This is a common issue during hosting moves when the website changes but the mail setup is forgotten.
Common problems and how to fix them
Database connection error
This usually means the database credentials in wp-config.php are wrong, the database user is not assigned correctly, or the database server address is different. Recheck the database name, username, password, and host setting.
White screen or fatal error
This can happen if a plugin or theme is incompatible with the new PHP version, or if files were not transferred completely. Disable plugins temporarily by renaming the plugins folder, then reactivate them one by one.
Broken links or missing images
This usually means old URLs remain in the database or the uploads folder was not copied fully. Run a safe search and replace for the domain change and confirm that wp-content/uploads exists on the new server.
Permalinks return 404
Go to WordPress permalink settings and save them again to refresh rewrite rules. If needed, check the Apache .htaccess file or Nginx configuration on the new host.
Import fails on large databases
Use a larger import limit, split the database export, or ask the hosting provider to assist. Some shared hosting environments have strict limits, while managed hosting often handles larger imports more easily.
Migration checklist
Use this checklist to make sure nothing is missed:
- Back up all WordPress files.
- Back up the database.
- Create the new database and user.
- Upload or transfer the files.
- Import the database.
- Update wp-config.php.
- Adjust URLs if the domain or path changed.
- Test the site on the new host.
- Fix SSL, caching, and email settings.
- Update DNS when ready.
- Monitor the site after propagation.
WordPress migration tips for cPanel and Plesk users
If your hosting account uses cPanel, the standard tools you will likely use are File Manager, FTP/SFTP, MySQL Databases, phpMyAdmin, and the SSL section. Many providers also offer WordPress staging or migration plugins.
If your hosting account uses Plesk, look for the Websites & Domains area, File Manager, Databases, phpMyAdmin, SSL/TLS Certificates, and the WordPress Toolkit. Plesk is often helpful for cloning, staging, and migration because it centralizes WordPress management.
On either platform, check server limits before migration, including PHP memory limit, max execution time, upload size, and database import limits. Matching the old environment as closely as possible can reduce compatibility issues during the move.
FAQ
How long does it take to migrate a WordPress site?
A small site can often be moved in under an hour, while larger sites or sites with email, custom configurations, or many plugins may take longer. DNS propagation can add extra time before the move is fully visible worldwide.
Will my site go offline during migration?
Not necessarily. If you test the site on the new host before changing DNS and keep the old hosting active during propagation, downtime can be very small or avoided altogether.
Can I migrate WordPress without a plugin?
Yes. Manual migration is a standard method and works well when you can access files and the database directly. It also gives you more control over what is transferred.
What if the new host uses a different PHP version?
That is common. WordPress usually supports multiple PHP versions, but some plugins or themes may not. Test the site first and update any incompatible extensions if needed.
Do I need to move email accounts too?
Only if your email is hosted on the same server and you want it to move with the website. If email is separate, leave the mail DNS records unchanged.
Should I keep the old host after migration?
Yes, at least until DNS has fully propagated and you are confident the new host is working correctly. Keeping the old account briefly gives you a safety net if you need to compare files or restore data.
Conclusion
Migrating a WordPress site to a new host is a routine task when you follow a careful process: back up the site, move the files and database, update configuration settings, test thoroughly, and only then switch DNS. Whether you are working in cPanel, Plesk, or a managed hosting environment, the key is to verify each step before going live. That approach helps protect your content, reduces downtime, and makes the transition to the new hosting platform much smoother.