Doing a WordPress migration by hand — moving the files with FTP and the database with phpMyAdmin yourself — is the method that teaches you what a migration really is. Plugins and host-assisted services are easier, but the manual route gives you complete control and, more valuably, a clear understanding of the two pieces every WordPress site is made of and exactly how they reconnect. If a plugin ever fails you, the manual method is the fallback that always works.
This guide walks through a manual WordPress migration step by step: downloading your files by FTP, exporting your database with phpMyAdmin, creating and importing into a new database on the new host, editing wp-config.php to reconnect them, running the crucial search-and-replace for URLs, and testing before going live. By the end you will be able to move a WordPress site entirely by hand, and understand every automated migration far better as a result.
Did you know?
The manual method — FTP for files, phpMyAdmin for the database — is the migration that teaches you what’s actually happening. Plugins automate these exact steps; knowing them by hand means you’re never stuck when a tool fails.
What manual migration involves
A manual WordPress migration means moving the two components of your site — the files and the database — yourself, using standard tools rather than an automating plugin. You download your WordPress files from the old host and upload them to the new host using FTP (or a file manager), and you export your database from the old host and import it into a new database on the new host using phpMyAdmin (or a similar database tool).
The manual method is more hands-on than using a plugin or a host-assisted service, but it has real advantages: complete control over every step, no dependency on a plugin that might fail or hit size limits, and — importantly — a genuine understanding of how a WordPress migration works. Every automated tool is really doing these same steps behind the scenes, so learning them by hand demystifies the whole process.
So manual migration is the fundamental method, the one all others automate. It suits people who want full control, are moving a site a plugin cannot handle, or simply want to understand what is happening. It requires a little comfort with FTP and phpMyAdmin, but none of the steps are difficult once laid out — and the payoff is a migration you fully understand and can always fall back on.
Step 1: download the files via FTP
Start by copying your WordPress files off the old host. Connect to the old host with an FTP client (using the FTP credentials from your hosting account) and navigate to your WordPress installation directory — usually the public web root. Download the entire contents to your computer: WordPress core files, the wp-content folder (containing your themes, plugins, and all uploaded media), and the wp-config.php file.
This download is a complete copy of your site’s file component. On a large site with lots of media, it can take a while and be the slowest part of the migration, since images and uploads add up. Make sure the download completes fully and includes everything, especially the wp-content folder, which holds all your customisations and media — the irreplaceable part of the files.
Alternatively, if your host offers a file manager or the ability to create a zip archive of your site, you can compress the files on the server and download a single archive, which is often faster and more reliable than downloading thousands of individual files over FTP. Either way, the goal of this step is the same: a complete, local copy of all your WordPress files, ready to upload to the new host.
Step 2: export the database with phpMyAdmin
Next, copy your database. Log into your old host’s control panel and open phpMyAdmin, the standard tool for managing MySQL databases. Select your WordPress database (if you are unsure which it is, the database name is listed in your wp-config.php file), and use the Export function to download it as a .sql file — a complete text dump of all your tables, containing every post, page, comment, setting, and option.
For a standard WordPress database, the default ‘Quick’ export in SQL format is usually fine. The result is a single .sql file on your computer that, together with the files you downloaded, represents your entire site. This database export is the content-and-settings half of your WordPress site, so handle it carefully — it is as important as the files.
With both the files and the .sql database export now on your computer, you have a complete copy of your WordPress site in hand. This is also, effectively, a full backup — so before you proceed, you already have the safety net that every migration requires. Now you move both components onto the new host, starting with recreating the database there.
Step 3: create and import the database on the new host
On the new host, you first create a home for your data, then import it. In the new host’s control panel, create a new, empty MySQL database and a database user with a password, and grant that user full privileges on the database. Note down the new database name, username, and password — you will need them shortly to reconnect WordPress. This is the fresh container your content will go into.
- Create the database: make a new empty MySQL database on the new host.
- Create a user: add a database user with a strong password and assign it to the database with full privileges.
- Import the .sql file: open phpMyAdmin on the new host, select the new empty database, and use Import to load your .sql file into it.
- Record the credentials: keep the new database name, username, and password handy for editing wp-config.php.
Once the import completes, your new database contains all your content and settings, recreated on the new host. Meanwhile, upload your downloaded files (via FTP or the file manager, extracting the archive if you zipped it) into the new host’s web root. Now both components — files and database — exist on the new host, exactly as they did on the old one, but WordPress does not yet know how to connect them. That is the next, pivotal step.
Step 4: edit wp-config.php to reconnect
The pivotal step that brings your migrated site to life is editing wp-config.php on the new host to point WordPress at its new database. Open the wp-config.php file you uploaded, and update three values with the new database’s credentials: the database name (DB_NAME), the database username (DB_USER), and the database password (DB_PASSWORD). If the new host uses a different database host address than ‘localhost’, update DB_HOST too, though localhost is usual.
This edit is the reconnection: it tells WordPress running on the new host’s files exactly where to find the database you just imported. Get these values right, and WordPress can read all your content and settings from the new database; get them wrong, and you will see the classic ‘Error establishing a database connection’ — which, if it appears, is almost always a wp-config.php credential mismatch to double-check.
So wp-config.php is the bridge between the two components, and updating it correctly is what assembles your copied files and imported database into a working site on the new host. After this edit, WordPress on the new server should be able to load — though there is often one more fix needed before everything displays correctly, especially links and images: the database search-and-replace.
Step 5: run the search-and-replace for URLs
WordPress stores many URLs inside the database — in settings, in content, in configuration — and some of these may reference the old location (an old domain, an old path, or hard-coded http/https or IP references). If those stale URLs remain, your migrated site can pull images from the old host, link back to the old location, or misbehave. The fix is a search-and-replace on the database, updating old references to the new ones.
Crucially, you should not do this with a naive find-and-replace in the raw .sql file, because WordPress stores some data in a serialised format where a blind replace corrupts the data. Instead, use a tool built for this — a safe search-and-replace script, or a migration/utility plugin that handles serialised data correctly — to change every instance of the old URL to the new one throughout the database safely.
For a pure host move keeping the exact same domain, this step may be minimal or unnecessary, but it is essential whenever the domain or URLs change, and it is good practice to check regardless. Once the search-and-replace is done, the URLs stored in your database all point to the correct new location, and your migrated site should display and link correctly. With wp-config.php reconnected and URLs fixed, the site is fully assembled — and ready to test.
Step 6: test, then go live
Before pointing your domain at the new host, test the manually migrated site there privately — because your domain still resolves to the old host, edit your computer’s hosts file to map your domain to the new server’s IP, so you see the new site while the public still sees the old. Then click through thoroughly: pages and posts, images, styling, internal links, forms, logins, and any dynamic features. This catches the common manual-migration issues — a database-connection error from a wp-config typo, missing images from an unfinished search-and-replace, or broken styling — while they are invisible to visitors.
Once the migrated site is confirmed working, go live by updating your domain’s DNS to point at the new host (changing nameservers or the A record), keeping the old host running through propagation so no visitor meets a gap. If you lowered your DNS TTL a day or two beforehand, the switch propagates quickly. Then re-verify on the live site, confirm email flows, and only after a few days of stable operation cancel the old host.
So the manual migration finishes exactly as any migration does: test privately, cut over via DNS, verify, and retire the old host last. Having done it by hand, you now understand precisely what every step accomplished — FTP moved the files, phpMyAdmin moved the database, wp-config.php reconnected them, and the search-and-replace fixed the URLs. That understanding is the manual method’s lasting reward, making you capable of handling any WordPress migration, tool or no tool.
FAQs
How do I migrate WordPress manually?
Move the two components yourself: download your WordPress files via FTP (or a file-manager archive), export your database with phpMyAdmin to a .sql file, create a new empty database on the new host and import the .sql into it, upload the files, edit wp-config.php with the new database name/user/password to reconnect, run a safe search-and-replace to fix stored URLs, test privately, then cut over DNS and verify.
What tools do I need for a manual WordPress migration?
An FTP client (or the host’s file manager) to move the files, and phpMyAdmin (or a similar database tool, available in most control panels) to export and import the database. You’ll also want a safe search-and-replace tool or utility plugin for fixing serialised URLs, and access to edit wp-config.php. No paid tools are required — the manual method uses standard, free hosting tools.
How do I move a WordPress database to a new host?
Export it from the old host with phpMyAdmin’s Export function to a .sql file. On the new host, create a new empty MySQL database and a user with full privileges, then use phpMyAdmin’s Import to load the .sql file into that database. Finally, update wp-config.php with the new database’s name, username, and password so WordPress connects to it.
Why do I get ‘Error establishing a database connection’ after migrating?
Almost always a wp-config.php credential mismatch — the database name, username, password, or host in wp-config.php doesn’t match the new database you created. Double-check all four values against the new host’s database details. It can also mean the database import didn’t complete or the user lacks privileges. It’s the most common manual-migration error and usually a quick fix.
Why do I need a search-and-replace after migrating WordPress?
Because WordPress stores URLs inside the database, and some may reference the old location — causing images to load from the old host or links to point back to it. A search-and-replace updates old URLs to new throughout the database. Use a tool that handles WordPress’s serialised data safely, not a naive find-and-replace in the .sql file, which corrupts serialised data.
Is manual migration better than using a plugin?
It’s not necessarily better, but it offers full control, no plugin size limits or failures, and a genuine understanding of the process — plugins simply automate these same steps. Manual suits those who want control, are moving a site a plugin can’t handle, or want to learn. For most people a plugin or free host-assisted migration is easier; manual is the reliable fallback that always works.
The bottom line
A manual WordPress migration — moving the files with FTP and the database with phpMyAdmin yourself — is the fundamental method that every plugin and host-assisted service merely automates, and doing it by hand gives you both complete control and a genuine understanding of what a migration really is. The steps follow directly from the two-component nature of a WordPress site: download all your files via FTP (or a server-side archive), export your database with phpMyAdmin to a .sql file, create a fresh empty database on the new host and import the .sql into it, upload the files, and then perform the pivotal reconnection by editing wp-config.php with the new database’s name, username, and password so WordPress can find its data. If you ever see ‘Error establishing a database connection,’ that edit is almost always where to look.
Two finishing steps complete the assembly: run a safe search-and-replace to update any URLs stored in the database that still point to the old location — using a tool that handles WordPress’s serialised data correctly, never a blind find-and-replace — and then test the migrated site privately via a hosts-file preview before touching your domain. Once verified, cut over by updating DNS, keep the old host alive through propagation (faster if you lowered your TTL beforehand), re-verify the live site, and retire the old host only after a few stable days. Having moved a site entirely by hand, you understand exactly what each step did — FTP for the files, phpMyAdmin for the database, wp-config.php to reconnect, search-and-replace to fix URLs — and that understanding makes you capable of handling any WordPress migration, with or without a tool.
When you are ready, you can start with Hostinger and use code PROTIPS for the reader discount. Manual WordPress migration: download files via FTP, export the database with phpMyAdmin to a .sql file, create a new empty database on the new host and import it, upload the files, edit wp-config.php with the new DB name/user/password to reconnect, run a safe search-and-replace for stored URLs (handles serialised data), test privately via hosts file, then cut over DNS and retire the old host last. It’s the method all tools automate.