Dec 22, 2025
Jordana A. & Valentinas C.
11min Read
For their first website, people usually go with shared website hosting. It’s affordable and easy to manage, making it more than suitable for beginners and users with minimal technical knowledge.
However, as the website and its traffic volume grow, the required server resources, such as storage space and bandwidth, will also increase.
One of the most effective ways to scale up is to migrate your website from shared hosting to VPS for better performance, compatibility, and security.
This tutorial will explain the steps to migrate from shared hosting to VPS. But first, let’s explore what VPS hosting is and why it can be an ideal upgrade from your shared account.
A brief overview of migrating a website from shared hosting to VPS:
| Required Knowledge | Basic website management, familiarity with hosting environments |
| Privileges Required | Root or administrative access for VPS |
| Difficulty | Intermediate |
| Main Goal | Steps to migrate a website to VPS, including data and database transfer |
| OS Compatibility | Any Linux-based system |
A virtual private server (VPS) is one of the most popular hosting services for large websites and projects.
Comparing VPS and shared hosting services, both divide a physical server for multiple users. However, a VPS platform uses virtualization technology like a hypervisor to divide the server into partitions, providing each user with isolated, dedicated resources.
What does this mean for the regular user? Essentially, as a VPS client, you’ll be able to freely configure individual systems and effortlessly scale your website as you grow.
A VPS also has some key differences from dedicated server hosting, which provides users with an isolated system instead of a virtual one. While dedicated servers commonly offer higher performance, they are usually more expensive. In this case, VPS may better suit your needs and budget.
Read our tutorial on what is a VPS to learn everything there is to know about virtual private servers.
Here are the advantages of switching from a shared plan to a VPS hosting environment:
If you need hosting scalability and full control over the server, upgrade from a shared to a VPS plan. It’s more affordable than a dedicated server and offers additional features.
Web hosting providers offer VPS plans at different prices depending on the features and allocated resources. They also commonly offer self-managed and managed VPS.
Check out our other tutorial to learn more about the 10 best VPS hosting providers and their different services, features, and prices.
With self-managed VPS, users configure, manage, and maintain the server themselves. If you go with a managed VPS, the web hosting company will handle the server configuration and security patching for you.
Hosting providers usually offer both shared and VPS plans, making the upgrade process easier. If you need a new hosting provider, pick one with robust VPS security, features, and support.
For example, Hostinger has four VPS hosting plans costing between £4.99–£18.99/month, with full root access, 24/7 assistance, weekly backups, and a 30-day money-back guarantee.
Hostinger VPS hosting plans come with control panel templates for CentOS, Ubuntu, Fedora, and Debian. If you wish, you could even install plain Rocky Linux and AlmaLinux operating systems without a control panel.
Hostinger’s VPS also includes Kodee, our smart AI assistant. You can use it to ask anything related to your VPS, guide you through tasks, and perform actions by simply typing a prompt. For example, type “How do I install NGINX on my VPS?” or “Please change my VPS password to [yournewpassword].”

After purchasing a new VPS hosting plan from Hostinger, follow the steps below to easily migrate your custom or WordPress sites. Do note that if you’re using a website builder platform, the steps may differ.
Now, let’s go over the process of migrating your website from shared hosting to VPS, ensuring a smooth transition to increased performance and control.
Before modifying a site, make sure to create a WordPress backup to avoid data loss in case of errors or misconfigurations. Doing so also lets you transfer your site files and databases to another hosting type and provider easily.
This tutorial will show you how to back up your site data through Hostinger’s custom control panel, hPanel. The steps may differ for other hosting providers, but the general procedure is similar:
Repeat the steps for your database by clicking Database backups. If there are no backups available, select Generate new backup → Proceed. Copy the backup download link and database name to a text editor.
Before migrating your site, set up the VPS first. We recommend choosing a server template with the Linux, Apache, MySQL, and PHP (LAMP) stack and Webmin/Virtualmin pre-installed. Servers with a pre-installed control panel, like Hostinger’s Cyberpanel VPS hosting, make management easier.
To change your VPS OS and pre-installed software, Go to the hPanel → VPS tab. Select the VPS in question, and click Operating System on the sidebar. Pick OS with Control Panel, select your desired template, and click Change OS.
For this tutorial, we will use the AlmaLinux 8 64bit with Virtualmin. Remember that the new server might take a few minutes to start, and the process will wipe all the existing data in your VPS. If you’re migrating – you don’t have to worry about that, since you’ll want an empty VPS to begin with.
Accessing Webmin/Virtualmin
Webmin is web-based frontend software for UNIX system administration. It allows the admin to manage the system remotely through any web browser.
Virtualmin is a Webmin plugin that helps simplify multiple domain management tasks, which works similarly to cPanel or other website management tools. This web hosting control panel supports UNIX-based systems like Linux.
Here’s how to access Webmin or Virtualmin with root access permissions:
Setting up Virtualmin
Follow these steps to configure Virtualmin. Depending on the version, the steps may slightly differ:
Important! Don’t enable ClamAV if your VPS has less than 2 GB of spare RAM. Doing so may consume all the remaining memory, crashing your server.
Once the configuration process is complete, click Re-check and refresh the configuration to test whether the virtual server setup is successful.
Creating a virtual private server
Next, create a new user, database, and directory for your website. Here are the steps to do it using Virtualmin:
Virtualmin will create a MariaDB account with its administrative login username for the domain. If you use the default template settings, it will also create a MariaDB database for the virtual server.
The database name will be the first part of the domain name – so if the domain is foo.com, the database will be called foo.
Depending on the hosting provider, your website’s database may not be MariaDB. For example, Hostinger uses MySQL. While different, you can migrate a MySQL database to MariaDB without extra steps.
Once the new server is set, transfer your site files from shared hosting to VPS. We’ll use the wget command to download the backup archives we created in the first step. Here’s how to do it:
cd /home/hostinger-dev/public_html/
Remember to replace hostinger-dev with the appropriate domain name.
wget http://srv167.main-hosting.eu:8080/download-backup/fe26ee2e4159db037c3106c37fa3ffb5b2072662/backup-file-name.tar.gz
tar -xvf backup-file-name.tar.gz
For the last two commands, replace backup-file-name.tar.gz with the appropriate file name.
cd domains/hostinger-dev/public_html/
Remember to replace hostinger-dev.
mv -v ./* /home/hostinger-dev/public_html/
cd /home/hostinger-dev/public_html/
chown hostinger-dev:hostinger-dev -R *
Completing this step will not only move your website content to the new VPS environment but also your WordPress assets like themes, plugins, and custom code.
Instead of SSH, you can also use an FTP client like FileZilla to transfer files from your local computer to the personal server. However, FTP only supports file transfer to VPS. It does not support shell commands for website configuration.
We’ll use the wget command to transfer the database backup from your shared hosting account to the VPS. The steps are similar to migrating site data in the previous section.
Since the server already created a new database during the VPS configuration, you don’t need to add one.
Checking MySQL database name and password
To transfer the MySQL database backup, obtain the newly created database’s name, username, and password. Go to the Virtualmin control panel → Edit Databases section to retrieve them. The username and password will show up in separate tabs.
In this example, our MySQL database Name and username are both hostinger-dev.
Downloading and importing the MySQL backup
Once you have the MySQL database name, follow these steps to import the backup:
mkdir sql_backup && cd sql_backup
wget http://srv167.main-hosting.eu:8080/download-backup/60a7e64afb1a769b1de4f2139aa0a27c2c2ecb01/backup-file-name.sql.gz
gunzip backup-file-name.sql.gz
mysql -u root -p hostinger_dev < MySQL-database-name.sql

After completing the website and MySQL database import process, you may need to do additional VPS configurations to ensure it works properly.
If the Error establishing a database connection message appears, edit the wp-config.php file and update it with the new MySQL database details. Here’s how to do it:
cd /home/hostinger-dev/public_html/
nano wp-config.php
Scroll down until you find these lines:
// ** MySQL settings – You can get this info from your web host ** //
// ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define('DB_NAME', 'database-name');
/** MySQL database username */
define('DB_USER', 'username');
/** MySQL database password */
define('DB_PASSWORD', 'password');
/** MySQL hostname */
define('DB_HOST', 'mysql');Lastly, update the DNS record to point the domain name to VPS from the shared hosting server. The easiest way is to change the A record via the domain name registrar or VPS account settings.
Since domains registered with Hostinger resolve to our nameservers, set the A record via hPanel. Go to DNS Zone Editor, fill in your VPS IP address as the A record, and click Save Changes. A similar procedure should apply to other domain name registrars.
Alternatively, contact your registrar to point the domain name to your new VPS.
Important! It can take up to 24 hours for DNS changes to fully propagate worldwide.
Most users solve their scaling issues by migrating from shared hosting to virtual private server (VPS) services.
And it’s no wonder why – a VPS hosting plan guarantees better security, offers stable performance, and lets users manage resources flexibly, which makes it more than suitable for higher-traffic websites.
Commonly, many web hosting providers offer both shared and VPS plans. For example, Hostinger offers four VPS hosting plans starting at £4.99/month.
In this article, you have learned how to migrate from shared hosting to your new VPS. The migration process takes five steps but may differ depending on the VPS provider. Here’s how to do it with Hostinger:
We hope this article has helped you understand the shared hosting to VPS migration process! If you have any questions, leave us a comment below.
How to Change the SSH Port
How to Change Hostname on Linux
How to Install FFmpeg on Linux for Video Management
In this section, we will answer several commonly asked questions about migrating from shared hosting to VPS to help you understand it more.
In a shared hosting environment, multiple users share the same server resources, meaning your website may slow down when others experience high traffic. It is also preconfigured and has limited customizability. Meanwhile, VPS hosting provides users with isolated resources from a virtual server partition, providing better performance and customization.
Yes, you can migrate custom-coded websites or ones built on any content management system (CMS) to VPS hosting plans. However, you may not be able to migrate websites built using a website builder since they are tied to a specific hosting provider. In this case, upgrade your builder-based website to cloud hosting, which performs better than a shared account.
Yes, VPS hosting provides isolated server resources to ensure your website performs well, even during high traffic. You can also tailor the server environment and resource allocations according to your needs to ensure optimal website performance.
All of the tutorial content on this website is subject to Hostinger's rigorous editorial standards and values.
Comments
September 15 2017
Very nice tutorial, worked great for me! Thank you
July 29 2018
Good information! Thank you so much
January 15 2020
Very Nice Blog..!! Thank you for sharing this information with us. It is very useful and important information for those who are doing this work at the first time.
January 29 2020
Hey Jerry, Glad you enjoyed the blog!
September 22 2020
Hi, great step-by-step. Two questions: 1)Can all this be done on the smallest VPS, the one with just on 1GB of RAM? 2)Do you have any instructions for creating a copy of a wordpress site on a subdomain running on the same VPS?
November 18 2020
Hey Daniele, Yes, it will work on the smallest VPS package. As for a guide that would depend on the control panel you've chosen.
October 14 2020
This did not work for me, are there extra steps if I am not using hpanel shared hosting? I am trying to migrate from hostgator cpanel shared server to hpanel vps.
February 02 2021
Hi there, Steven! Can you please share what errors are you getting? By the way, you can always contact our Customer Success team for further support!
March 23 2022
Hi, Whether DirectAdmin comes with free License and Pre-installed if we choose this OS template CentOS 7 64bit with DirectAdmin on VPS 2 plan? Kindly can you clarify the same. Thanks
March 29 2022
Hi, Mohammed! Yes, that's right :) However, we do suggest caution choosing CentOS, as it's nearing it's end of life. You can read more about CentOS vs another popular OS - Ubuntu on our guide.
October 04 2021
Hi, if anyone wants to move your site from shared hosting to the VPS. For all data transfers. I will suggest you use the UpDrafte plus wp plugin. You can learn more about this on google and youtube. Wellcome.
October 19 2021
Hi! I recently got a new VPS from Hostinger & followed exactly as the steps provided. It's working fine for the main website, but the subdomain from the shared host (also from Hostinger) is not functioning even after pointing the DNS to the VPS server? Are there any extra steps to carried out?
October 27 2021
Hi, first thing I'd suggest to look at would be to make sure you've configured the subdomain as necessary on your VPS as well as double-check all the DNS settings. If anything, don't hesitate to check with our Customer Success team for further investigation!
January 04 2022
Can You Adjust amount If Someone purchased wrong Hosting plan like shared instead of purchasing VPS for Django.
January 11 2022
Hi, if you purchased the wrong plan on Hostinger, you can still refund it within 30 days and purchase the correct one. Check out our Refund Policy for that and feel free to contact our Customer Success team :)
March 25 2022
Hi! Is there a way to upgrade from shared hosting to vps hosting plan directly? In the shared hosting plan site it is only possible to upgrade to cloud hosting.
March 29 2022
Hi there! Shared and VPS plans run on very different OS - Shared plans are managed, while VPS are completely setup and configured by the user, so upgrading from Shared to VPS with a click of a button (as you would upgrade from Shared to Cloud) is not possible. The only way around it would be to manually migrate your website as per this guide :)
April 26 2022
Thank you for this article am correctly using shared hosting now I need to transfer my website to VPS hosting by Contabo VPS Is this method will work as well without any issues . Is there a video tut for this guide Thank you loads
May 04 2022
Hi Rita! Yes, the guide will work just well as long as you choose Webmin/Virtualmin control panel on your VPS. At the moment we don't have a video tutorial for it, but I'll pass the idea to the team, thanks for pointing that out :)
March 11 2023
can i move multiple sites from the shared hosting to vps? i currently have 7 sites on shared web hosting which runs on wordpress...and i want to upgrade to vps.
March 17 2023
Hello there! Yes, it's possible to have multiple websites on a single VPS plan. I would also suggest choosing a similar VPS plan to your current shared plan (resources-wise), so there won't be any performance issues. Keep in mind that there is no direct way to upgrade from shared to VPS, as it's two different products. Thus you would need to do the migration yourself.
October 17 2024
Maybe I'm confused, but is this tutorial not specifically to migrate a Wordpress site from shared hosting to VPS? If so, shouldn't there be a step involving installing Wordpress or am I missing something?
October 30 2024
Thanks for bringing this to our attention! We’ve made updates to the article. To clarify, completing the migration to VPS will also move your themes, plugins, and custom code, so you won’t have to reinstall WordPress ;)
October 17 2024
I completed all the steps, but when trying to access the Wordpress Admin console with IP or domain/wp-admin, I get "You don't have permission to access this resource.Server unable to read htaccess file, denying access to be safe"
October 23 2024
Hello! It often relates to issues with the .htaccess file. Ensure that the .htaccess file is present and correctly configured on your VPS. Additionally, check the file permissions and ownership settings to ensure they are correct and allow the web server to read the file ;)
December 06 2024
I went through the previous steps without any problems, but when I entered the password in the last step when importing the database, he said "Access denied for user 'root'@'localhost' (using password: YES)", I tried many times, and it still does, I don't know what to do anymore
December 18 2024
Hi! I recommend verifying your database credentials by checking the
my.cnffile using the commandsudo nano /etc/mysql/my.cnf. If the credentials are correct and you're still getting the error, you may need to reset the MySQL root password. You can follow this guide to Reset the MySQL root password for step-by-step instructions ;)