Knowledge Base Hub

Browse through our helpful how-to guides to get the fastest solutions to your technical issues.

Home  >  WordPress FAQ  >  How to Migrate WordPress website using FTP?

How to Migrate WordPress website using FTP?

 4 min

The idea of  migrating a WordPress website can look scary, but it is possible with proper planning, even for those who are not developers. FTP (File Transfer Protocol) is one of the best ways to move a WordPress site. We help users migrate their websites every day at MilesWeb. This guide will help you understand how to perform a migration using FTP and phpMyAdmin step by step.

Prerequisite: Choose the Right WordPress Hosting with MilesWeb

Exploring website migration usually signals a need to switch from your existing provider to a different hosting solution. MilesWeb offers fully managed WordPress hosting tailored for varied business needs.

It includes multiple hosting options like shared, VPS, and dedicated hosting along with managed WordPress hosting. 

Step-by-Step Guide to Migrate a WordPress Website Using FTP

Step 1: Prepare Your Backup

Backing up is critical. Start by ensuring that the files and database for the WordPress website are backed up. Backup can be done using plugins like UpdraftPlus or Duplicator, or manually using cPanel with the hosting account.

Tip: Ensure that both the files (with FTP) and the MySQL database (with phpMyAdmin) are downloaded.

Step 2: Connect to Your Existing Hosting Account via FTP

  1. Download and install an FTP client such as FileZilla.
  2. Start Filezilla, and for the old host connection, input:
  3. Host: FTP server (e.g., ftp.yourdomain.com)
  4. Username & Password: Given by host
  5. Port: 21 (usually)
  6. After connection, locate the WordPress installation folder, commonly found at /public_html or /www.

Step 3: Download your WordPress Files

  1. Download WordPress files like .htaccess, wp-content, wp-config.php, and others.
  2. Select, right-click, and click on Download.
  3. Remember to save this in a new folder on your local machine.

Warning: Enabling “show hidden files” in your FTP client settings is a must to prevent skipping hidden files such as .htaccess.

Step 4: Export your WordPress Database

Through your current hosting control panel, log in to phpMyAdmin.

  1. On the left panel, select your WordPress database.
  2. Click on the Export tab.
  3. Select Quick export and then choose SQL format.
  4. Click Go, and the .sql file will be downloaded automatically to your computer.

Step 5: Upload Files to the New Hosting Account

With the same FTP client, log in to your MilesWeb FTP account.

  1. Go to the root directory of your new domain (e.g., /public_html).
  2. Upload all WordPress files downloaded in the prior step.

Tip: Make sure to clear out the old files if you are replacing an existing site to avoid conflicts.

Step 6: Create a New Database on MilesWeb

  1. Log in to the MilesWeb mPanel (client area) and select MySQL® Databases.
  2. Set up a new database and a new user with full privileges to the database.
  3. Take note of:
  • Database name
  • Database username
  • Database password

Step 7: Import the Database

Access phpMyAdmin from your MilesWeb server.

  1. Choose the new database from the list.
  2. Select Import.
  3. Choose the .sql file created from the last step.
  4. Select Go.

Step 8: Update wp-config.php.

Using your FTP client or text editor, open the wp-config.php file and change the following lines:

  1. ‘DB_NAME’ is set to your database name.
  2. ‘DB_USER’ set to the newly created db user.
  3. ‘DB_PASSWORD’ is set to the new database user’s password.
  4. ‘DB_HOST’ to localhost.
  5. Save the changes and re-upload to the new server.

Step 9: Update Site URL (If Necessary)

For those changing domain names, the following instructions will assist in changing the site URL:

  1. Enter phpMyAdmin.
  2. Locate the wp_options table.
  3. Set the siteurl and home parameters to the new domain URL.

Step 10: Verification Test for the Website

Open your newly registered domain and verify all services are working optimally. Inspect:

  1. URLs for pages
  2. Images
  3. Media uploads
  4. Website plugins
  5. Website themes

Warning: Remember to clear your browser history or test in incognito mode to avoid viewing cached pages from the old site.

Common Issues to Avoid

  1. Incorrect permissions on these files: Access and adjust read and write permissions for files.
  2. Address change: If your domain name has changed, use plugins like Better Search Replace to fix broken links.
  3. Errors in the database: Check the database name, username, and password in wp-config.php.
Conclusion

Performing website migration with FTP might seem to be a difficult task at first, but the FTP method is useful and safe. Your control over the startup server is far greater in this case, as you manually move files and databases, which also helps in reducing reliance on third-party plugins.

As is the case with any migration, backup, configuration files, and migrated data must be tested to ensure thorough verification. With any issues, MilesWeb’s support is always there to help with any problems or take over the migration for you.

For our Knowledge Base visitors only
Get 10% OFF on Hosting
Special Offer!
30
MINS
59
SECS
Claim the discount before it’s too late. Use the coupon code:
STORYSAVER
Note: Copy the coupon code and apply it on checkout.