Skip to main content
All CollectionsWebsiteOther
How to Migrate Your Website from VPS to Shared Hosting on Hostinger
How to Migrate Your Website from VPS to Shared Hosting on Hostinger

Two simple ways how to migrate from VPS to a Shared Hosting on Hostinger

Updated over a month ago

Migrating your website from a VPS plan to Shared Hosting on Hostinger is a straightforward process. This guide will walk you through each step to ensure a smooth transition.

Step 1: Prepare for Migration

Before you start the migration process, make sure to:

  • Check resource requirements to ensure that your website can perform optimally on a Shared Hosting plan.

  • Review limitations of Shared Hosting to confirm compatibility (e.g., software compatibility, resource limits).

Note: VPS offers full control and flexibility, while Shared Hosting may have restrictions on certain scripts and resource-intensive applications.

Step 2: Download Files and Databases from VPS

  1. Connect to Your VPS via SSH:
    in your terminal enter this command, with your VPS IP address.

    ssh root@your-ip-address​

  2. Find Your Website Directory:
    To locate your directory, use this command:

    ​find / -type d -name "your_website_directory"​

  3. Compress Your Website Files:
    Compress all website files into a .zip file:

    ​zip -r file_name.zip path/to/your/directory

    Note: If you see zip: command not found, install zip with:

    ​sudo apt-get install zip​

  4. Download the Compressed File to Your Local Device:
    Run this command on your local machine's terminal (not on the VPS), changing your_vps_ip with your actual IP:

    ​scp root@your_vps_ip:/path/to/file_name.zip /local/path/​

  5. Export Your Database:
    Create a backup of your database:

    ​mysqldump -u root -p database_name > backup_name.sql


    You will be prompted to enter your password, you should enter your mysql password for the specified user.

    Note: While you are entering the password, it will seem that nothing is being typed in the terminal. It's a common security practice.

  6. Download the Database Backup:
    Again, on your local machine's terminal (not on the VPS), run:

    ​scp root@your_vps_ip:/path/to/backup_name.sql /local/path/​


OPTION A:


Step 3: Set Up Your Shared Hosting Environment

  1. Log in to hPanel and open your Shared Hosting plan.

  2. Press on "Add website" -> "Migrate Website"

  3. Upload your website backup files (don't forget the database file)

Step 4: Final Checks

  1. Monitor your website’s performance to ensure it’s stable on Shared Hosting.

  2. If everything looks good, you’re all set!

OPTION B:

Step 3: Set Up Your Shared Hosting Environment

  1. Log in to hPanel and open your Shared Hosting plan.

  2. Go to File Manager and upload your website files to the /public_html directory.

  3. Create a new database for your website by going to Databases in the side menu, then Management, then by creating new database name, username and password.

  4. Import your database:

  • Go to phpMyAdmin in hPanel.

  • Select your newly created database and import the .sql file from your local device.

Step 4: Update Configuration Files

Edit your configuration file (e.g., wp-config.php for WordPress or config.php for other CMSs) to reflect the new database details:

Update database name, username, and password with the one's created in hPanel.

Step 5: Final Checks

  1. Monitor your website’s performance to ensure it’s stable on Shared Hosting.

  2. If everything looks good, you’re all set!

Did this answer your question?