Mar 02, 2026
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 0–0/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 0/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.