Step-by-Step Guide to Manually Migrate Your WordPress Site (2024)
Are you looking to manually migrate your WordPress site? The process can seem daunting, particularly for first-time users, but with a structured approach and a bit of technical knowledge, you can successfully transfer your website. This guide walks you through the essential steps to ensure a smooth migration.
Table of Contents
- Export Your WordPress Database
- Download Your Site Files
- Upload Your Site Files to the New Server
- Create a New Database
- Edit the wp-config.php File
- Import Your Original Database
- Change DNS Settings
- Update URLs (Optional)
- Bonus: An Easier Way to Migrate Your WordPress Site
1. Export Your WordPress Database
The first step in migrating your WordPress site is to export its database, which contains all your data. You can typically access this through phpMyAdmin, a popular database management tool provided by your hosting service.
- Log in to phpMyAdmin and select the database associated with your WordPress site. It usually starts with “wp_”.
- Click on the Export tab in the top menu.
- Select Quick – display only the minimal options as your export method and ensure the format is set to SQL.
- Click the Go button to download the .sql file to your computer.
Once downloaded, compress this file into a zip format for safekeeping and ease of transfer.
2. Download Your Site Files
Next, you’ll need to download your WordPress files. This is commonly done using an FTP client, such as FileZilla.
- Install and open FileZilla.
- Enter your hostname, FTP username, password, and port number (available from your hosting provider) and click Quickconnect.
- Navigate to the public_html folder and select all files and folders. Right-click and choose Download.
Once the files are downloaded, compress them into a single zip archive to simplify the upload process to your new server.
3. Upload Your Site Files to the New Server
With your files prepared, it’s time to upload them to your new hosting server.
- Connect to your new server via FTP or use the file manager provided by your hosting service.
- Navigate to the public_html directory. If there’s existing content, consider deleting it to avoid conflicts.
- Upload the zip file containing your WordPress files, then extract it within the public_html directory.
4. Create a New Database
Next, you’ll need to create a new database on your new server. You can do this using cPanel or phpMyAdmin.
Method 1: Using cPanel
- Log into cPanel and click on MySQL Databases.
- Under Create New Database, enter a name and click Create Database.
Method 2: Using phpMyAdmin
- Log into phpMyAdmin and click on the Database tab.
- Enter a name for the new database in the Create a new database field and click Create.
5. Edit the wp-config.php File
The wp-config.php file plays a crucial role in your site’s functionality, as it contains the database connection details. Here’s how to edit it:
- Locate the wp-config-sample.php file in your new server’s directory. Make a copy and rename it to wp-config.php.
- Open the file in a text editor and update the database name, username, and password with the new database details.
6. Import Your Original Database
Now it’s time to import the database you exported earlier:
- Log into phpMyAdmin on your new server and select the database you created.
- Click on the Import tab and choose the .sql file to upload.
- Click Import to begin the process.
7. Change DNS Settings
To ensure visitors reach your site, you’ll need to update your DNS settings. This process will vary based on your domain registrar, but typically involves logging into your account and pointing your domain to the new server’s IP address. Follow the provided instructions from your registrar for specific details.
8. Update URLs (Optional)
If you’ve migrated to a new domain, you’ll need to update your URL references. This can be accomplished using the Search Replace DB script or a plugin like Better Search Replace. If using a script, upload it to your server, run it, and promptly delete it afterward for security reasons.
Bonus: An Easier Way to Migrate Your WordPress Site
If the manual migration process feels too complex, consider using a migration plugin like UpdraftPlus. This user-friendly tool allows you to create a backup of your site and restore it on a new installation with minimal effort. Simply back up your existing site, upload the backup file to your new site, and restore it. UpdraftPlus offers additional features in its premium version for more customizable migration options.