{"id":1312,"date":"2019-03-01T15:48:27","date_gmt":"2019-03-01T15:48:27","guid":{"rendered":"https:\/\/blog.hostinger.io\/support\/2019\/03\/01\/2774885-how-to-migrate-your-vps-to-hostinger\/"},"modified":"2026-08-11T07:35:35","modified_gmt":"2026-08-11T07:35:35","slug":"2774885-how-to-migrate-your-vps-to-hostinger","status":"publish","type":"post","link":"https:\/\/www.hostinger.com\/support\/2774885-how-to-migrate-your-vps-to-hostinger\/","title":{"rendered":"How to migrate a VPS to Hostinger"},"content":{"rendered":"
A Hostinger Virtual Private Server (VPS) provides a dedicated environment where you have full control over the configuration and data. When moving your projects from an external provider or another Hostinger VPS, you must manually transfer your files and databases to the new instance.<\/p>
This guide covers the essential steps for a smooth migration between Linux-based servers. While specific commands may vary slightly depending on your distribution, these instructions generally apply to most Linux operating systems.<\/p>
If you are moving from a web hosting plan rather than a VPS, follow this tutorial instead: How to migrate from shared hosting to VPS<\/a>.<\/p> Before initiating the migration process, ensure you have the following<\/p> Consider performing the migration during low-traffic periods to minimize the impact on your visitors. Also allow a few additional hours for DNS propagation<\/a>.<\/p> To ensure all data is moved, package your data on your current server.<\/p> NOTE<\/strong><\/p> Prepare the new environment to receive your project data:<\/p> NOTES<\/strong><\/p> Choose one of the following methods to move your data to Hostinger.<\/p> SSH is the most efficient method because it enables a direct server-to-server transfer. This is significantly faster than other methods and does not rely on your local internet upload speed.<\/p> Use this method if you prefer a graphical user interface (GUI), do not have direct SSH access between servers, or if your previous VPS is no longer active and you have a local backup.<\/p> If both your old provider and your new Hostinger VPS use the same control panel, you can use built-in migration tools if available.<\/p> After restoring your backups:<\/p> <\/p> Your migration is complete once your domain points to the new server. To ensure you see the latest version of your site, clear your browser cache<\/a> or use an incognito window.<\/p> NOTES<\/b><\/p> Additional resources<\/b><\/p>Preparations<\/h2>
\n
Step 1 – Prepare your backups on the source server<\/h2>
\n
archive.tar.gz<\/code>) of your project files.<\/li>\n\n
\nmysqldump -u username -p database_name > backup.sql<\/code><\/li>\n
\nmysqldump -u username -p --all-databases > all_databases.sql<\/code><\/li>\n<\/ol>\n<\/li>\n.sql<\/code> files.<\/li>\n<\/ol>\n
Step 2 – Set up the destination Hostinger VPS<\/h2>
\n
\n
Step 3 – Transfer data to the Hostinger VPS<\/h2>
Option 1 – Transfer via SSH (Recommended)<\/h3>
\n
scp<\/code> (Secure Copy) command to send your files and database dumps directly to the Hostinger VPS IP address:
\nscp \/path\/to\/archive.tar.gz root@your_vps_ip:\/home\/<\/code>
\nReplace \/path\/to\/<\/code> with the file location and your_vps_ip<\/code> with the IP address<\/a> of your Hostinger VPS.<\/li>\n<\/code>Enter your Hostinger VPS root password when prompted to begin the transfer.<\/li>\n
\nFor individual databases, run the following command for each one:
\nmysql -u username -p database_name < backup.sql<\/code>
\nTo import all databases at once if you have a single .sql<\/code> file:
\nscp \/path\/to\/all_databases.sql root@your_vps_ip:\/home\/<\/code><\/li>\n
\ntar -xvzf \/home\/archive.tar.gz -C \/var\/www\/html\/<\/code>
\nThe -x<\/code> flag extracts, -v<\/code> shows progress, -z<\/code> handles the compression, and -f<\/code> specifies the file.<\/li>\n<\/ol>Option 2 – Transfer via SFTP<\/h3>
\n
.tar.gz<\/code> and .sql<\/code>) from your local computer to the \/home\/<\/code> or \/var\/www\/html\/<\/code> directory on the new server depending on your configuration.<\/li>\n.tar.gz<\/code> file.<\/li>\n<\/ol>Option 3 – Use a control panel transfer tool<\/h3>
\n
Step 4 – Update configurations<\/h2>
\n
wp-config.php<\/code> or .env<\/code>) and update them with the new database name, user, and password.<\/li>\n\n