Migrating a WordPress website manually may sound intimidating, but it is a powerful skill for any website administrator or developer. Whether you are moving to a new hosting provider, upgrading your VPS, or simply reorganizing your infrastructure, understanding the manual migration process ensures you retain complete control. Unlike automated plugins, manual migration reduces dependency on third-party tools and gives you flexibility when handling large websites or custom configurations.
This article will walk you step by step through the full manual migration process: backing up your files, exporting the database, transferring everything to the new server, and reconfiguring WordPress to run smoothly.
Step 1: Back Up Your Files
Your WordPress site consists of two main parts: the files and the database. The files include WordPress core, themes, plugins, and uploaded media. To back them up:
-
Log into your VPS using SSH or FTP.
-
Navigate to the WordPress installation directory (commonly
public_html
or/var/www/html
). -
Compress the entire folder into a
.zip
or.tar.gz
archive for easier transfer: -
Download the archive to your local computer or transfer it directly to your new server.
Step 2: Export the Database
WordPress stores all content (posts, pages, comments, settings) in a MySQL or MariaDB database.
-
Log into phpMyAdmin on your old host, or use the command line:
-
This creates a
.sql
file containing all your data. -
Download the SQL file to your local machine for safe keeping.
Step 3: Upload Files to the New Server
Once you have your backup archive, upload it to your new VPS:
-
Use SCP, SFTP, or rsync to transfer files. For example:
-
On the new server, extract the archive into the desired directory:
-
Verify that the folder structure remains intact, especially
/wp-content/
which contains your themes, plugins, and uploads.
Step 4: Import the Database
-
Create a new database and user on your new VPS. For example:
-
Import your SQL file into this new database:
Step 5: Update wp-config.php
Open the wp-config.php
file in the root WordPress directory and update the database connection details:
This ensures WordPress communicates with your new database.
Step 6: Update URLs (If Domain Changes)
If you are also moving to a new domain name, you need to update URLs inside the database. Run this SQL command:
For more comprehensive changes (like links inside posts), use a search-and-replace tool on the SQL dump before importing.
Step 7: Test and Troubleshoot
-
Point your domain’s DNS records to the new server’s IP.
-
Clear browser and server caches.
-
Test your site thoroughly: pages, posts, media, plugins, and admin login.
-
Check file permissions (WordPress typically requires
755
for directories and644
for files).
Benefits of Manual Migration
-
Full Control – You decide exactly what is transferred and how.
-
Reliability – No plugin dependencies that may break on large sites.
-
Learning Opportunity – You gain deeper knowledge of WordPress and server management.
Conclusion
Manually migrating a WordPress website may take more effort than using a plugin, but it is a reliable and flexible method. By carefully backing up your files, exporting and importing the database, reconfiguring wp-config.php
, and testing the new setup, you can confidently move your site to a new VPS or hosting environment. With practice, manual migration becomes a routine task that empowers you to handle complex setups and ensure smooth transitions for your websites.