Moving a WordPress site between hosts is mostly copying two things: the files and the database. Done in the right order, visitors never see an error and you can test the new copy before anyone else does. This guide shows the manual method, which works from any old host.
Before you start
- Access to the old host: cPanel, FTP or SFTP, and phpMyAdmin or a database export tool.
- An active MdmHost hosting account with the domain added (as the main domain or an addon domain).
- About twice the site's size in free disk space for the archive and the extracted files.
Tip: If your old host also uses cPanel, MdmHost support can often move a full cPanel backup for you. Open a ticket at Support → New ticket.
Export from the old host
- Pause changes: ask editors not to publish, and disable comments for the day if the site is busy.
- Compress the site folder (usually
public_html) into a ZIP using the old host's File Manager, or download it over SFTP. - Open phpMyAdmin, select the WordPress database, click Export, choose Quick and SQL, and download the file.
- Open the old
wp-config.phpand note the$table_prefixvalue.
Import into MdmHost
- In cPanel → Files → File Manager open the domain's document root, upload the ZIP and Extract it so
wp-config.phpsits directly in that folder. - In cPanel → Databases → Manage My Databases create a database and user and add the user with ALL PRIVILEGES.
- Open cPanel → Databases → phpMyAdmin, select the new database, click Import and upload the SQL file. For files above the upload limit, compress the SQL with gzip first.
- Edit
wp-config.phpand updateDB_NAME,DB_USERandDB_PASSWORD. KeepDB_HOSTaslocalhostand do not change the table prefix.
Test before switching DNS
Find your server IP in cPanel's General Information panel, then add a line to your computer's hosts file (C:\Windows\System32\drivers\etc\hosts on Windows, /etc/hosts on macOS and Linux):
203.0.113.10 yourdomain.com www.yourdomain.comBrowse the site, log in to /wp-admin, open a few posts and submit a form. Remove the line when you are done.
Switch DNS
- Lower the TTL at your current DNS provider a day in advance if you can.
- Change the nameservers to MdmHost's, or point the A records for the root and
wwwto the new IP. - Leave the old hosting active for at least 48 hours so visitors on cached DNS still reach a working site.
- Once traffic arrives on MdmHost, AutoSSL issues the certificate automatically. Run it manually from cPanel → Security → SSL/TLS Status if you do not want to wait.
Troubleshooting
- Database connection error: re-check the credentials in
wp-config.php; the cPanel prefix is part of both names. - Links point to a temporary URL: run a search and replace on the database (see the guide below).
- Pages return 404 except the home page: re-save Settings → Permalinks to rebuild
.htaccess.
