How to transfer your WordPress site to HostPapa

In this article, we will show you how to transfer your WordPress site to HostPapa without affecting your website content.This involves backing up your old site and uploading it to the new site. You can either do this manually or use the BackUpWordPress plugin to do so. The following sections describe how to do both.

Transfer your site manually

To transfer your site manually:

  1. Open phpMyAdmin from your site’s control panel (cPanel or other).
  2. Select the WordPress database.Backup WordPress via phpMyAdmin
  3. Click the Export button at the top of the page.
  4. On the Export page, select the Quick option and set the format to SQL.Backup WordPress via phpMyAdmin
  5. Click the GO button.
  6. When prompted, save the file to your local computer.
  7. Use an FTP client to download the entire WordPress installation directory to your local computer. Make sure you set your FTP client to view hidden files, as you also need to download the .htaccess file associated with your WordPress directory.
  8. Once you’ve downloaded both your database backup and your WordPress installation directory, go to your HostPapa account and create a new database for your WordPress installation.
  9. On your local computer, locate the folder where you stored the files from your old WordPress installation and edit the wp-config.php file as follows:
    1. Locate the line containing define('DB_NAME', 'db_name'); and change the 'db_name' to the name of the database you created in step 8 above.
    2. Locate the line containing define('DB_USER', 'db_user'); (just below the DB_NAME line) and change 'db_user' to the username for the database you created in step 8 above.
    3. Locate the line containing define('DB_PASSWORD', 'db_pass'); (just below the DB_USER line) and change 'db_pass' to the password you set for the database you created in step 8 above.
    4. Save and close the wp-config.php file.
  10. Open up phpMyAdmin in your new HostPapa account and import the database backup you created earlier:
    1. Go to the Import tab.
    2. Click the Choose File button in the File to Import section of the Import tab and select the backup SQL file.
    3. Uncheck the Partial Import checkbox.
    4. Set the format to SQL.
    5. Click Go. Your database file imports.
  11. Use your FTP client to upload the WordPress files from your computer to the public_html directory on your HostPapa site. If your old WordPress install was in a subdirectory of your former site, create that directory and upload your files there.
  12. Follow the Edit your wp-config.php file instructions, Update SiteURL and home options, Update URLs that refer to the old site, and Change your domain DNS settings sections below.

Use the BackUpWordPress plugin to transfer your site

The BackUpWordPress plugin simplifies this entire process.

  1. Backup your files and database using BackUpWordPress.
  2. Download the BackUpWordPress zip archive.
  3. Unzip the archive on your local system.
  4. Use Softaculous to install WordPress on your HostPapa account.
  5. Upload the unzipped files to the WordPress directory on your HostPapa account, overwriting all existing files and subdirectories.
  6. Use phpMyAdmin to import the sql file from your former installation.
  7. Edit your wp-config.php file as described below.

Edit your wp-config.php file

Use the File Manager in your cPanel to open and edit the wp-config.php file as follows:

  1. Change DB_NAME to the name of the new WordPress database. Example:define(‘DB_NAME’,’user_wrdp’);
  2. Change DB_USER to the administrator username. Example:define(‘DB_USER’, ‘username’’);
  3. Change DB_PASSWORD to the administrator password. Example:define(‘DB_PASSWORD’, ‘password’);
  4. Change DB_HOST (if necessary – the default is usually okay). Example:define(‘DB_HOST’, ‘localhost’);
  5. Save your changes.

Update SiteURL and home options

You now need to change the WordPress siteURL and home options to reflect the new installation:

  1. Open phpMyAdmin and browse the wp_options table.Edit the WordPress Database
  2. Find the siteURL and home entries and change their values to the new URL.Set Up WordPress

Update URLs that refer to the old site

After you’ve updated the SiteURL and home options, you need to replace references to any URLs from the old site so they point to the new site URL. To do so:

  1. Open phpMyAdmin.
  2. Go to the SQL tab and run the following SQL commands:UPDATE wp_posts SET guid = replace(guid, 'http://old-site-url','http://new-site-url');
    UPDATE wp_posts SET post_content = replace(post_content, 'http://old-site-url', 'http://new-site-url');
    UPDATE wp_postmeta SET meta_value = replace(meta_value,'http://old-site-url','http://new-site-url');
    UPDATE wp_options SET option_value = replace(option_value, 'http://www.old-site-url', 'http://new-site-url') WHERE option_name = 'home' OR option_name = 'siteurl';
    UPDATE wp_posts SET guid = replace(guid, 'http://www.old-site-url','http://new-site-url');
    UPDATE wp_posts SET post_content = replace(post_content, 'http://www.old-site-url', 'http://new-site-url');
    UPDATE wp_postmeta SET meta_value = replace(meta_value,'http://www.old-site-url','http://new-site-url');
  3. Exit phpMyAdmin.

Change your domain DNS settings

Last, you must log in to your domain registrar account and update your DNS settings to point to the new HostPapa server. DNS propagation can take up to 48 hours, although most HostPapa customers find that it happens within an hour.

If you need help with your HostPapa account, please open a support ticket from your dashboard.

This article is also available in: French Spanish German

Related Articles