Congratulations on choosing HostPapa for your WordPress website. Moving your WordPress site to HostPapa involves backing up your old site and then uploading it to the new site. You can do this either manually or with the BackUpWordPress plugin. In the following sections we describe both variants.
Manual transfer of your website
To transfer your website manually:
1. Open phpMyAdmin in your website’s control panel (cPanel or another variant).
2. Select the WordPress database.
3. Click the button at the top of the page Export.
4. On the Export page, select the option Fast and set up the format SQL.
5. Click on the button begin.
6. If prompted, save the file locally on your computer.
7. Use an FTP client to download the entire WordPress installation directory to your local computer. Make sure your FTP client shows hidden files as you will also need to download the .htaccess file that goes with your WordPress directory.
8th. Once you have downloaded your database backup and WordPress installation directory, go into your HostPapa account and create a new database for the WordPress installation there.
9. On your local computer, browse to the folder where you saved the files from your old WordPress installation. There edit the wp-config.php file as follows:
a) Find the line define(‘DB_NAME’, ‘db_name’); and change ‘db_name’ to the name of the database you created in step 8.
b) Find the line define(‘DB_USER’, ‘db_user’); (under the DB_NAME line) and change ‘db_user’ to the username for the database you created in step 8.
c) Find the line define(‘DB_PASSWORD’, ‘db_pass’); (under the DB_USER line) and change ‘db_pass’ to the password you set for the database you created in step 8.
d) Save and close the wp-config.php file.
10 Open phpMyAdmin in your new HostPapa account and import the database backup file you created earlier:
a) Go to the tab Import.
b) Click on the button Choose a file in the Import files section of the Import tab, then select the backup SQL file.
c) Clear the checkbox Partial import.
d) Set the format SQL Celebration.
e) Click begin. Your database file will now be imported.
11. Use your FTP client to import the WordPress files from your computer into the public_html directory on your HostPapa website. If your old WordPress installation was in a subdirectory of your previous website, create that directory and upload the files there.
12. Follow the instructions below Edit your wp-config.php file, update the SiteURL as well as the home options, update URLs related to the old website and change the DNS settings for the domain.
Use the BackUpWordPress plugin to transfer your website
The BackUpWordPress plugin simplifies the whole process.
1. Back up your files and database with 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 in your HostPapa account, overwriting any existing files and subdirectories.
6. Use phpMyAdmin to import the SQL file from your previous installation.
7. Edit the wp-config.php file as below.
Edit the wp-config.php file
Use the file manager in your cpanel to 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 setting is usually fine). Example: define(‘DB_HOST’, ‘localhost’);
5. Save the changes.
Edit the SiteURL and Home options
Now you need to adjust the WordPress siteURL as well as the home options for the new installation:
1. Open phpMyAdmin and go to the wp_options table.
2. Find the siteURL and Home entries and change the values to the new URL.
Update the URLs that refer to the old site
After editing the old SiteURL and the home options, you need to edit the references to all the old URLs from the old website to point to the new URL. That is how it goes:
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 the domain’s DNS settings
Last but not least, you need to log in to your domain registrar and change the DNS settings to point to the new HostPapa server. DNS propagation takes up to 48 hours, but most HostPapa customers complete it within an hour.
If the above steps are unsuccessful, contact HostPapa Support for further assistance.
This post is also available in: German French Spanish