A step by step guide for Hostinger’s internal migration.
In this article I will give a step by step guide on migrating/moving your website from One Hostinger premium website plan to another. Follow along with the steps, and you shall do this without any issues.
Let’s dive into this:
To do the following task of internal migration from one Hostinger plan to another. We will first have to take the website backup (important).
Steps on taking website backup (File):
1. Login to your Hostinger account, and locate the hPanel dashboard.
2. On the dashboard you will see the Daily Backups, click on it.
3. Once clicked, you will find an option “Generate new backup” press generate, wait as Hostinger will generate a backup, on the same page there will be an option “File backups” press select, it will show all the websites files scroll down, and press the download button, this will create a backup file .tar extension.
Next we are going to backup the database for our website.
Steps on backing up the database:
1. On the same page as shown above you can see Database backups select it.
2. Choose from your database of selection from the drop-down option, if not sure which database your site uses, go to hPanel and locate file manager, under public_html and look for a file named “wp-config.php” right click on this file and press edit, there you will see DB name “name” (note this name) and then head back to backups, Database backups and now select the appropriate backup from the drop down selection. Below this database selection menu, there will be the database version (it’s always a good practice to choose from an older version) and then click download.
At this point we have both the backup of files and database.
Note: We need to first delete the website from the current Hostinger premium plan before moving it to the other/new Hostinger plan. To do this follow these steps.
1. Go to hPanel → under the websites tab, click on the three dots on the website you wish to delete, and then select delete, this will issue a warning that this action can’t be reserved. Click ok.
Now we can move/migrate the website to the new Hostinger plan. Steps to do the following:
1. Go to hPanel → under websites tab you will see a tab called add/migrate a website, select that button.
2. Then it will ask you to choose a hosting plan, choose the appropriate one from the selection, on the next page, it will ask you to either “connect a domain” or use an “existing domain”, choose us an existing domain (if the domain is directly purchased from Hostinger itself). Enter the domain, and this has successfully migrated our site to the new Hostinger plan. Next we have to re-store our website data files and database.
Steps for adding back the website files:
1. Go to hPanel, and locate the file manager, and upload your backed up .tar file that we made earlier.
2. Next extract your .tar file and name it “Backup”.
3. Next double click on the Backup folder that you just created, press Ctrl + A to select all files in this folder, and on the top right, you will see a move button click on it and keep moving the files to this directory “/files/public_html” and press the button move. Now we have successfully added the website files.
Next we create the database for our newly migrated website. Follow these steps:
- On the hPanel, search for Management, under database, click on it this will open a page asking you to create a new SQL db.
2. Once created you will see below the database is created, you will click on myPhPdatabase button below this page, and this will open a page where will we add our backed up database.
3. On the database page it will be auto-selected with your correct database, on the top you will see a tab upload, click on it and when a page opens it will have a button where it will ask you to upload the .sql backup file that we have made earlier, scroll to the bottom of this page and click on upload, wait for few seconds and it will show a message that database is successfully added.
4. Lastly the added database should match with your website config files, to do so head over to files manager and look for public_html and locate the wp-config.php file, right click and edit, there you will see the DB name, DB username, and password make sure to match it when we created the SQL database back in step 2 (important).
If all steps mentioned above are correctly followed, your website files and database will load correctly without any issues. If not followed properly you will see the error “Establishing a Database connection failed”.
I hope this article was informative, if you still have any issues regarding this comment down below, and I shall reply to your issues.