A shared hosting can be compared to a rental property (e.g. an apartment). On the other hand, VPS (Virtual Private Server) hosting represents a house .. Shared hosting packages work well for smaller websites or applications that don’t consume a lot of resources.
The need to migrate from a shared hosting arises when:
- You need root access to your server to install certain applications that your current shared hosting provider doesn’t offer
- You need more bandwidth and disk space.
- There is a need for scaling up as required due to the high number of application users or website visitors
- Your applications or websites are running super slowly.
- You need more security and support.
If you see any of the above signs, it is time to migrate from a shared to a VPS plan. Transferring between the two different plans is not that hard. You just need to plan your move and proceed.
We are going to exactly show you how to migrate your website from a shared hosting to a VPS server on this guide.
Step 1: Select a VPS provider
There are lots of reliable VPS providers on the market. Most charge per hour and they send an invoice at the end of the month. The most reputable companies by the time of writing this guide are Linode, Digital Ocean, Google Cloud, Amazon and Vultr.
These companies have different packages that are priced depending on the disk space, bandwidth, RAM and CPU. Prices start as low as $5 per month for a 1 vCpu server with a 25GB SSD disk, 1GB RAM and a bandwidth of about 1 Terabyte.
You don’t have to worry about starting, if you later discover that your websites/applications require more resources, you can upgrade your plan even without reinstalling the operating system on your VPS server.
Step 2: Select an Operating System
Once you have identified a VPS provider and the plan, make the purchase. Next, you need to choose an operating system that you are going to install on your VPS server.
Unlike in shared hosting, VPS providers won’t install any operating systems or software, and you will be required to become a part-time administrator to run your new server.
As a newbie on the VPS industry, you might find it easy to start with Ubuntu. The latest stable version of this Operating System is Ubuntu 18.04. If you choose Ubuntu, you are very likely to get a lot of great support on the internet as compared to other Operating Systems like Centos.
However, if you plan to use Cpanel or WHM to manage your VPS, Centos may be a better bet because it supports those interfaces.
Installing the Operating System on a VPS is very easy; you will probably need to click a few buttons, and you can then spin up your server in a few minutes.
Step 3: Install a web server and a database server
A VPS plan provides you the ability to install any applications you can imagine. Since most of the VPS machines run on Linux, there are lots of open source software applications that you can get for free on the internet.
To start with, you need to install a web server so that your websites can be served well. The most popular web servers are Apache and Nginx.
Next, you need to install a database server. MySQL and MariaDB work pretty well with websites and online applications, and you can install them on your VPS server for free.
Step 4: Export your files from the shared hosting to VPS
Just like in a shared hosting environment, you can upload files using desktop File Management Clients like Filezilla in VPS. However, for better security, you need to connect to your server via a secure tunnel such as SSH (Secure Shell). I recommend Filezilla for downloading files from your old host to your new VPS environment.
You will also need to download all databases for your websites or applications. In most shared environments, you can do this using a web hosting control panel (e.g., cPanel). You can even use the backup feature to get a copy of your databases. Just download the files on your local computer and upload them to your new VPS machine.
Step 5: Point your domains DNS to your new VPS machine
Up to this point, you have a replica of your websites or applications, but your visitors are still being served by the old shared hosting server.
Now, you need to point your domains to the public IP address of your VPS machine. Most VPS providers make the process extremely simple, and this should take you a few minutes. They provide their domain name servers (DNS), and you need to point your domains to those value.
DNS records may take a while to propagate. Sometimes it may take up to 48 hours.
Step 6: Test your websites
If you followed our guide up to this point, your websites or applications should be served from the new VPS machine.
You may need to keep your old shared hosting plan for a month or two until you are sure that everything is working as expected on your new plan. Finally, cancel the plan from your shared hosting provider to avoid paying for services that you currently don’t require.
Migrating from a shared to a VPS host will open new opportunities for your websites or applications. However, remember to secure your VPS machine with strong passwords and authentication key pairs to make it more secure.
Also, run regular updates on your operating system and application packages to fix bugs. That’s it, you can now enjoy the freedom that comes with VPS hosting including faster load times, increase bandwidth and disc space.