Migrating a WordPress site sounds scary the first time. The truth is that a WordPress site is just two things: a pile of files and a database. Move both to the new server, point the configuration at the right place, and the site simply works. You do not need a paid migration plugin to do it well.
This guide walks through a clean, free manual migration. It takes a little patience, but it gives you total control — and it is exactly how professionals move sites without surprises.
Before you touch anything: back up
Take a full backup of both the files and the database first. If anything goes wrong, you can restore in minutes. Never migrate a site you cannot roll back.
What you’ll need
- Access to the current host (file access via the file manager or SFTP, plus phpMyAdmin).
- Access to the new host with an empty database created.
- A text editor for one small config edit.
- About 30–60 minutes, depending on site size.
Step 1 — Export the files
Old hostConnect to your current host and locate the WordPress root — usually public_html or a folder named after the domain. Compress the entire WordPress folder into a single .zip so you download one tidy archive instead of thousands of files.
If you have SSH access, this is the fastest way:
cd /home/user/public_html
zip -r site-files.zip . -x "wp-content/cache/*"
The -x flag skips the cache folder — you do not need it, and it can be large.
Step 2 — Export the database
Old hostOpen phpMyAdmin, select your site’s database, and choose Export. The default “Quick” export as SQL is perfect. You will get a single .sql file containing every post, page, setting, and user.
If you prefer the command line:
mysqldump -u DB_USER -p DB_NAME > database.sql
Step 3 — Upload files to the new host
New hostUpload site-files.zip to the WordPress root on the new server and extract it there. Using the host’s file manager to unzip on the server is far faster than uploading unzipped files over SFTP.
Step 4 — Import the database
New hostCreate a fresh, empty database on the new host and note the database name, username, and password. In phpMyAdmin, select the new database, choose Import, and upload your .sql file.
From the command line it looks like this:
mysql -u NEW_USER -p NEW_DB < database.sql
Step 5 — Reconnect wp-config.php
New hostWordPress finds its database through one file: wp-config.php. Open it on the new server and update the four credentials to match the database you just created.
define( 'DB_NAME', 'NEW_DB' );
define( 'DB_USER', 'NEW_USER' );
define( 'DB_PASSWORD', 'NEW_PASSWORD' );
define( 'DB_HOST', 'localhost' );
DB_HOST isn’t always “localhost”
Some hosts use a specific database server address. If the site cannot connect after migrating, check your new host’s docs for the correct DB_HOST value — it is the single most common migration snag.
Step 6 — Update the site URLs
New hostIf your domain name is staying the same, you can skip this. If you are testing on a temporary URL or changing domains, update the stored URLs so links and images do not break. The safe way is a proper search-and-replace that also handles serialized data:
wp search-replace 'https://oldsite.com' 'https://newsite.com' --all-tables
No WP-CLI? Run the equivalent free “Better Search Replace” plugin once, then remove it.
Step 7 — Test before you switch DNS
Zero downtimeThis is the trick that gives you zero downtime: test the new server before pointing your domain at it. Edit your computer’s local hosts file to preview the new server’s IP against your real domain — only you see it, the public site stays live.
# /etc/hosts (Mac/Linux) or C:\Windows\System32\drivers\etc\hosts
203.0.113.45 yoursite.com www.yoursite.com
Click through pages, submit a form, check images and the admin login. When everything looks right, remove the line.
Step 8 — Point the domain & go live
Final stepUpdate the domain’s A record (and any www CNAME) to the new host’s IP address. DNS can take anywhere from a few minutes to a few hours to propagate worldwide, so keep the old host active for at least 48 hours as a safety net.
A quick recap
- Back upFiles and database, before anything else.
- Move the filesZip, upload, extract on the new host.
- Move the databaseExport the SQL, import into a fresh database.
- Reconnect & testUpdate
wp-config.php, preview via hosts file, then switch DNS.
Would rather not touch the database?
Migrations are routine for us. If you would prefer a clean, zero-downtime move handled quietly under your brand, we will take it off your plate entirely.