In short
Migrating WordPress means copying your site's files (including wp-content) and database to the new host, then updating wp-config.php with the new database details. For small sites a migration plugin is the fastest route; for large sites, archiving the files and moving the database with mysqldump is more reliable. If the domain changes, replace URLs with WP-CLI search-replace, which preserves serialized data, not plain SQL, and switch DNS last, after testing with your hosts file.
In this guide
Migrating WordPress means copying two parts of your site to the new server: the files (especially the wp-content folder that holds your themes, plugins and uploads) and the database that stores your posts, settings and users. For small and medium sites, a migration plugin finishes the job in minutes; for large sites, the manual method is more reliable. Whichever route you choose, the secret to a zero-downtime move is the same: test the site on the new server before you change DNS.
Preparing for the migration
- Take a full backup: Download a copy of the files and database from your old host to your own computer. If anything goes wrong during the move, this is your fallback.
- Lower your DNS TTL: At least one day before the migration, lower the TTL of your domain's A record to 300 seconds. That way visitors are routed to the new server faster at switchover time.
- Match the PHP version: Note the PHP version on your old host and choose the same version, or a newer one your plugins support, on the new host.
- Measure disk and database size: Make sure the new plan's disk space and database limit are big enough. The archive file temporarily takes up extra space during the move.
- Plan a content freeze: Any posts, comments or orders added between the migration and the DNS switch stay on the old server. For WooCommerce stores, schedule the switch for your lowest-traffic hour.
Choosing a method
| Method | Best for | Pros | Watch out for |
|---|---|---|---|
| Migration plugin (e.g. All-in-One WP Migration, Duplicator, Migrate Guru) | Users with limited technical skills and small or medium sites | Handles URL changes automatically and finishes in a few clicks | Free versions may have file size limits; timeouts on large sites |
| Manual (File Manager/FTP + phpMyAdmin) | Users without SSH access who want to stay in control | You see every step and do not depend on a plugin | phpMyAdmin upload limit for large databases |
| SSH + mysqldump + WP-CLI | Large sites, developers | The fastest and most reliable route | Requires SSH access on both sides |
Method 1: Migrating with a plugin
- Install the migration plugin on the old site, export the entire site and download the archive file to your computer.
- Do a clean WordPress install on the new host. On Sunucu Atlas WordPress hosting plans, this is a one-click step with WP Toolkit, and the database and user are created automatically.
- Install the same migration plugin on the new install and import the archive.
- When the import finishes, log in with the old site's username and password instead of the new install's admin credentials; the database has been replaced with the old site's.
- Open Settings > Permalinks and click Save without changing anything. This generates the rewrite rules for the new server.
If the import stops partway, the cause is usually the PHP upload limit or a timeout. In that case, switching to the manual method is faster than fighting the limits.
Method 2: Manual migration
1. Archive and download the files
In cPanel File Manager, select the contents of public_html and compress them, or create a single archive over SSH:
cd ~
tar -czf site-yedek.tar.gz -C ~/public_html .2. Export the database
In phpMyAdmin, select the database and download it in SQL format from the Export tab. If you have SSH, mysqldump is more reliable; when prompted for a password, enter the DB_PASSWORD value from wp-config:
mysqldump -u eski_kullanici -p eski_veritabani > veritabani.sql3. Create a database and user on the new host
Create a new database and user from the MySQL Databases screen in cPanel, and assign the user to the database with all privileges. You can find step-by-step instructions in our guide to creating a MySQL database and user in cPanel.
4. Upload the files and import the database
Upload the archive to the new account's public_html folder and extract it. Import the database with phpMyAdmin's Import tab or over SSH:
tar -xzf site-yedek.tar.gz -C ~/public_html
mysql -u yeni_kullanici -p yeni_veritabani < veritabani.sql5. Update wp-config.php
define( 'DB_NAME', 'yenihesap_wpdb' );
define( 'DB_USER', 'yenihesap_wpuser' );
define( 'DB_PASSWORD', 'YeniGucluSifre' );
define( 'DB_HOST', 'localhost' );A single typo in these details leads to the "Error establishing a database connection" message. Also make sure the $table_prefix value stays the same as on the old site.
Changing URLs: how to run search-replace correctly
If the domain stays the same, you can skip this step. If the domain is changing, you are publishing the site on a temporary address, or you are moving from http to https, you need to replace the old addresses in the database with the new one.
Do not do this with a plain SQL REPLACE query in phpMyAdmin. WordPress and plugins store some settings as serialized data, a format that also records the length of each string. When the address length changes, the data breaks and widgets, theme settings or page builder content disappear. WP-CLI's search-replace command understands serialized data and fixes the lengths. Run it in dry-run mode first:
cd ~/public_html
wp search-replace 'https://eskialan.com' 'https://yenialan.com' --all-tables --precise --dry-run
wp search-replace 'https://eskialan.com' 'https://yenialan.com' --all-tables --precise
wp cache flushIf the old site also has links saved with http://, repeat the command for that variation. If you do not have SSH access, you can do the same with a search-and-replace plugin that supports serialized data. All of the command's options are listed in the WP-CLI search-replace documentation.
Test before changing DNS
You can view the site on the new server from your own computer only, before switching your domain for everyone. To do that, add the new server's IP address to your hosts file:
- Windows:
C:\Windows\System32\drivers\etc\hosts(open Notepad as administrator) - macOS and Linux:
/etc/hosts
203.0.113.10 alanadiniz.com www.alanadiniz.comReplace the example IP with your new host's IP address. Clear your browser cache and browse the site; if everything looks right, delete that line and change your DNS. Nameserver or A record changes take time to propagate worldwide, and during that window some visitors see the old server and some see the new one. For details, see how long DNS propagation takes. Do not cancel your old hosting until propagation is complete and a few days have passed without issues.
Post-migration checklist
- Do the home page, inner pages, category pages and product pages load?
- Have you saved Settings > Permalinks once? Inner pages returning 404 are usually fixed by this.
- Is the SSL certificate installed on the new server, and does the browser show any mixed content warnings?
- Is the "Discourage search engines from indexing this site" box under Settings > Reading unchecked?
- Are contact forms and WooCommerce order emails being delivered? If needed, update your SMTP settings for the new server.
- Have the callback URLs and IP restrictions in your payment gateways been updated for the new server?
- Is your caching plugin right for the new server? If you moved to a LiteSpeed server, you can use the LiteSpeed Cache plugin; see our LiteSpeed Cache settings guide.
- Are WP-Cron and server cron jobs set up on the new account?
- Are all images and media files present, and are the
wp-content/uploadspermissions correct? - Have you set up an automatic backup schedule on the new server?
Tips for large sites
On sites larger than a few gigabytes, the wp-content/uploads folder usually determines how long the migration takes. Moving images as a separate archive saves you from redoing the whole job if something fails. Before archiving, exclude caching plugins' wp-content/cache folder and old backup files; these are regenerated on the new server. Databases that exceed phpMyAdmin's upload limit can be transferred compressed (.sql.gz), or you can use the mysql command over SSH. Finally, cleaning out transients and old revisions from the database before the move noticeably shrinks the file size.
Common mistakes
- Changing DNS before the migration is done, leaving the site half-broken for hours.
- Canceling the old hosting as soon as the move is done and losing your fallback.
- Forgetting business email accounts. If the domain's MX records point to the same host, you need to move the mailboxes too.
- Importing the database with a different character set, which corrupts special characters (such as Turkish letters). Use utf8mb4 for both export and import.
Next step: the right new home for your site
A migration is the best moment to upgrade your infrastructure. Sunucu Atlas WordPress hosting plans run in our Istanbul data center on the LiteSpeed web server and NVMe storage, with a free SSL certificate and one-click installs through WP Toolkit included. If you are moving a single business site or a mid-sized blog, the SA-WP-2 plan with 2 GB RAM, 2 CPU cores, 40 GB NVMe storage and 5 databases is a comfortable starting point; you can also move a second site to the same account as an addon domain. If you are moving a larger store or a high-traffic site, compare WordPress plans with more RAM and storage. If you get stuck at any step, you can open a support ticket with the Sunucu Atlas team (support is provided in Turkish).
Frequently asked questions
Will my site go down during a WordPress migration?
Not if you do it in the right order. You copy the site to the new server, test it with your hosts file and only then change DNS; because the old server stays up during propagation, visitors see no downtime.
Is a migration plugin or a manual migration better?
For small and medium sites, a plugin is faster. For sites larger than a few gigabytes, or when the plugin times out, a manual migration with a file archive and mysqldump is more reliable.
What happens to old links if the domain changes?
You need to update the addresses in the database with WP-CLI search-replace and set up a 301 redirect from the old domain to the new one. That way both users and search engines are sent to the new address.
Why do inner pages return 404 after the migration?
Usually the .htaccess rewrite rules are missing. Opening Settings > Permalinks and saving without making changes regenerates the rules.
Will my email accounts be migrated too?
A WordPress migration only moves the site. If the email accounts on your domain are with your old host, you need to create the mailboxes separately, transfer their contents and update your MX records.