How to migrate wordpress site to new host

Migrating a WordPress site to a new host can be a bit of a process, but it's definitely doable. Here's a step-by-step guide to help you through the process:

Before you start:

  1. Backup your site: Make sure to backup your WordPress site, including the database and files, before making any changes. You can use plugins like UpdraftPlus or Duplicator to create a backup.
  2. Check your hosting plan: Verify that your new host meets the requirements for your WordPress site, including PHP version, MySQL version, and storage space.
  3. Update your DNS: Update your DNS settings to point to your new host. This may take some time to propagate, so be patient.

Step 1: Export your database

  1. Log in to your current hosting control panel (cPanel) and navigate to the phpMyAdmin tool.
  2. Select your database from the list of databases.
  3. Click on the "Export" tab.
  4. Choose the "Quick" method and select "SQL" as the format.
  5. Click "Go" to download the database backup.

Step 2: Export your files

  1. Use an FTP client (like FileZilla) or SFTP client (like Cyberduck) to connect to your current hosting account.
  2. Navigate to the root directory of your WordPress site.
  3. Download all files and folders to your local machine.

Step 3: Create a new database on your new host

  1. Log in to your new hosting control panel (cPanel) and navigate to the phpMyAdmin tool.
  2. Create a new database and take note of the database name, username, and password.

Step 4: Import your database

  1. Log in to your new hosting control panel (cPanel) and navigate to the phpMyAdmin tool.
  2. Select your new database from the list of databases.
  3. Click on the "Import" tab.
  4. Choose the "SQL" file you exported earlier and click "Go" to import the database.

Step 5: Upload your files

  1. Use an FTP client (like FileZilla) or SFTP client (like Cyberduck) to connect to your new hosting account.
  2. Navigate to the root directory of your WordPress site.
  3. Upload all files and folders you downloaded earlier.

Step 6: Update your wp-config.php file

  1. Open the wp-config.php file in a text editor and update the database settings to match your new host.
  2. Save the file and upload it to your new hosting account.

Step 7: Update your site URL

  1. Log in to your WordPress dashboard and go to Settings > General.
  2. Update the "WordPress Address" and "Site Address" fields to match your new host's URL.
  3. Click "Save Changes" to update the settings.

Step 8: Update your plugins and themes

  1. Log in to your WordPress dashboard and go to Plugins > Installed Plugins.
  2. Update any plugins that require updates.
  3. Go to Appearance > Themes and update any themes that require updates.

Step 9: Test your site

  1. Visit your site to ensure everything is working correctly.
  2. Test your site's functionality, including forms, contact pages, and any other critical features.

Step 10: Update your DNS

  1. Once you've verified that your site is working correctly, update your DNS settings to point to your new host.

That's it! With these steps, you should be able to migrate your WordPress site to a new host. Remember to test your site thoroughly to ensure everything is working correctly.