This support article outlines the steps for migrating your WordPress Blog site from another host to Hostinger. We’ve used SiteGround as an example to illustrate the migration process from SiteGround to Hostinger.
Overview
- Downloading the backup from SiteGround
- Downloading the Database from the Siteground
- Importing the Backup Files to Hostinger
- Importing the Database to Hostinger
- Establishing the Connection to the Database
- Creating a Self-Signed SSL Certificate for HTTPS on the blog
- Accessing the Blog Using Host Entries
- Launching the Blog
Downloading the backup from SiteGround
This support article explains the blog migration from SiteGround to Hostinger.
- Navigate to SiteGround, locate your website, and click on the Site Tools button. Then, click on Devs > SSH Key Manager and add a key there.
- To establish a connection to your SiteGround account, you need FileZilla. Download it from here: https://filezilla-project.org/download.php?platform=win64
- Please refer to this support article to understand how to establish a connection to your SiteGround hosting account with FileZilla. : https://world.siteground.com/kb/how_to_establish_sftp_connection_to_hosting_with_filezilla/
- Open FileZilla and access the files via SFTP. Click on File > Site Manager > Add a Site, select the SFTP method, and enter the SSH values here.
- Under Remote Site, the files will be displayed, and you need to locate the correct file to download. In this case, the blog file (the WordPress installation file for the blog) needs to be downloaded. Click on Home > Customer > www > yourdomain > public_html > Blog. Download the entire blog file to your local storage.
Downloading the Database from the Siteground
Open SiteGround and locate the website. Click on 'Site Tools,' then navigate to Site > MySQL > phpMyAdmin and click on 'Access phpMyAdmin'
Select the Structure and click on the 'Export' button
Simply click "Go," and it will download the entire database.
Importing the Backup Files to Hostinger
Open Hostinger and navigate to Website > Dashboard. Search for SSH and select SSH Access. The SSH credentials will be displayed, and you can use these to connect to the file manager in Hostinger.
After connecting via SFTP, navigate to the public_html directory under the Remote site: home > uXXXXXXXXX/domains/yourdomain.com/public_html. In the Local site, locate the backup file and find the blog folder. Right-click on the blog folder and select Upload.
Wait for the uploading process to complete. Once the upload is finished, all your blog files will be uploaded to Hostinger.
Please remember to always upload files to the Blog folder and ensure that they are successfully uploaded.
Importing the Database to Hostinger
Open Hostinger and navigate to Website > Dashboard. Click on Database, locate your database, and enter phpMyAdmin. If the database is not created, please create a new database.
Select the structure and click on Import. Choose the backup SQL file downloaded from SiteGround and click on Import. This will import the entire database.
Establishing the Connection to the Database
After importing the files and database, you need to match the database credentials to the WordPress installation. To do this, open Hostinger and go to Website > Dashboard > File Manager to access the files. Navigate to public_html > Blog > wp-config.php and update the database name, database username, database password and table prefix (please check the database for the prefix used).
Creating a Self-Signed SSL Certificate for HTTPS on the blog
Once you have successfully followed all the steps above, the blog will work only with HTTP (e.g., http://www.yourdomain.com/blog). To enable HTTPS, you need to install a self-signed SSL certificate in Hostinger. Once the blog is live, the SSL you enabled for the main domain (VL's Let's Encrypt SSL) will be automatically applied to the blog as well.
Once you have generated all the files, open each one in Notepad, copy the contents, and then navigate to Hostinger's dashboard. Select Website > Dashboard, and from the menu, go to Security > SSL. If there is an already installed SSL that is in a failed status, uninstall that SSL.
Select "Import SSL" and add the values of the private.key in the Private Key field, certificate.crt in the Certificate field, and request.csr in the Certificate Authority Bundle field (from the files you already generated) and click on Install SSL.
Once you install the SSL, you will be able to access the blog URL with HTTPS.
Accessing the Blog Using Host Entries
Before making the blog live, it must be tested to ensure that it has been migrated properly. To access the blog and WP Admin, host entries need to be configured.
The easiest way to configure host entries is by using the PowerToys tool for Windows.
You need to find the IP address of your website. To do this, open Hostinger and search for the DNS Zone Editor or FTP Accounts to locate the IP address.
After copying the IP address, configure the host entry in the PowerToys tool.
Now, the blog and WP Admin can be accessed only on your PC or laptop.
Launching the Blog
Once the migration is complete and you have ensured that everything has been migrated properly, please share the IP address and domain with the Vacation Labs support team (please raise a ticket by sending an email to support@vacationlabs.com). This will allow us to set up the reverse proxy and make your blog live.