Migrating From Shared Hosting to VPS | A Simple Guide
If you’re looking to upgrade your basic hosting package and migrate from shared hosting to VPS, this is the guide for you.
This transition can be a vital step towards improving your website’s performance and control. We’ll simplify the process and answer any questions you may have.
If you’re set to make the upgrade, check out our VPS hosting plans.
There are two methods to migrate a website from shared hosting to VPS. This guide will show you how to migrate your website from cPanel to your VPS that you’ve setup, by manually creating a full backup of your website files and using web migration.
To prepare for site migration, you need to ensure you have access to your old web host via cPanel, as well as your new server via SSH. Your new server should be set up and ready to host a website before beginning, and your website should be put in a frozen state or maintenance mode.
Shared Hosting and VPS Hosting
Before making any significant changes to your website setup, it’s crucial to understand the basics. Let’s take a moment to recap. Feel free to refresh your understanding of shared hosting and VPS hosting here.
Firstly, let’s cover shared hosting. As the name implies, in a shared hosting environment, you’re sharing resources like server space with other websites.
This setup keeps costs low, but you may experience performance limitations when the server’s resources are stretched thin.
With VPS (Virtual Private Server) hosting, the story changes a bit.
You still share a server with other websites, but you have your own dedicated portion of the server’s resources.
It’s a bit like having your own apartment in a large building – you share the building’s structure, but inside your apartment, you’re free to decorate and organize things just the way you like.
This freedom translates into better performance and speed for your website, which can greatly benefit your site’s visitors and your business in general.
Benefits of Migrating to VPS
Now that you’re familiar with the basics of shared hosting and VPS hosting, let’s explore the advantages of making the switch to VPS.
Freedom, Performance, and Speed
With a VPS hosting account, you’ll be in the driver’s seat.
You’ll have more freedom to control your hosting environment, which means better performance and speed for your website.
This control will allow you to configure your server and site files to suit your unique needs.
Capacity for Expansion
One great feature of VPS hosting is its scalability.
As your business grows and drives more traffic to your website, your VPS can scale to accommodate these demands.
This adaptability ensures your site can handle traffic spikes with ease.
Managed VPS Solutions
Worried about managing your server? Some hosting providers, like us, offer managed VPS services. A management VPS hosting account would include handling many of your backend operations.
This means we’ll handle the technical stuff, leaving you more time to focus on running your business.
Self-Healing Environment
Reliability is another noteworthy benefit of VPS hosting.
In a VPS environment, if an issue arises on one virtual server, it doesn’t affect the others. This self-healing nature of VPS maintains website uptime and can save you a lot of stress.
Knowing When to Migrate
So, when is the right time to upgrade from shared hosting to VPS?
If you’re finding your website is often slow, experiencing high traffic volume, or if you simply need more control over your hosting environment, it may be time to consider migrating to VPS.
A massive amount of site data may even call for a dedicated server.
Moving from Shared Hosting to VPS
Ready to make the jump to VPS? Here’s a simple, step-by-step guide to help you make a smooth transition from shared to VPS hosting.
Create a Site Backup
Before everything else, it’s important to back up your website’s data. You can do this from your control panel.
This critical step ensures that you’ve got a safety net in case anything goes wrong during the migration process.
Set Up a VPS
Your next step is to set up your VPS. This process involves selecting your desired server specifications and installing your preferred operating system.
Don’t rush this stage — ensure everything is set up to best suit your specific needs.
Transfer Website Files
Once your VPS is ready, it’s time to move your website files. This step might take some time, especially if your website is large. So, grab a coffee and be patient.
Transfer Database Files
After your website files are in place, you’ll need to move your database files. This process is just as important and needs to be done right to prevent any data loss.
Make Final Changes
The last stage involves performing final checks and making any necessary adjustments. It’s a good opportunity to ensure your website is running smoothly on the new server.
With all the steps completed, you’ve successfully migrated from shared hosting to VPS. The enhanced performance and control of your website are now in your hands.
Steps to Migrate Website from Shared Hosting to VPS
To begin, make sure you are logged in to your old host cPanel area. Either also login to your new server via SSH now or be ready to do so after Step 1. Make sure you are logged in to your new server with root privilege.
- Create a backup of all your files. In File Manager in cPanel, select all files and folders (you may choose to exclude certain files or folders such as cgi-bin or .ftpquota), click the Compress icon and select Zip Archive as the compression type.
- Move your files. In your new server, go to the root folder of your site’s document and enter the command
wget https://domain.com/path/to/filename.zip
, where ‘domain’ is your domain name and ‘filename.zip’ is your backup file you’ve just created. - Extract the backup file using unzip command:
unzip filename.zip
then typing “Is
” and hitting Enter. - Copy your site’s database link. In your old host cPanel area, select the Backup Wizard > Backup > Select Partial Backup > MySQL Databases. Right-click the relevant database link and select Copy Link Location.
- Move your site’s database. In your SSH client, issue the following command:
wget --user=cpaneluser --password='cpanelpass' https://domain.com:2082/cpsessxxxxxxxx/getsqlbackup/filename.sql.gz
where ‘cpaneluser’ is your old host cPanel username, ‘cpanelpass’ is your cPanel password, and ‘https://domain.com:2082/cpsessxxxxxxxx/getsqlbackup/filename.sql.gz’ is the database link you just copied in Step 4. - Extract your database using
gzip -d filename.sql.zip
. You should get sql from this. - Import your .sql file to your server’s database. Create a new MySQL database and MySQL user on your new server with full access granted. Then use the command
mysql -u MYSQL_USER -p DATABASE_NAME < DATABASE_NAME.sql
where ‘MYSQL_USER’ is your MySQL username, ‘DATABASE_NAME’ is your database name, and ‘DATABASE_NAME.sql’ is the .sql file you transferred in the previous steps.
The Final Stages
Once you’ve completed the above steps to migrate your website from shared hosting to VPS, you can edit your script to reflect the new server settings, such as database name, user, and password.
Don’t forget to also change the NS entries of your domain with the new server’s IP to ensure your domain name resolves to your new server.
Remember, VPS hosting comes with a host of benefits like better performance, speed, higher reliability, and enhanced control.
Migrating involves creating a backup, setting up your new VPS, and transferring your website and database files, followed by some final adjustments. It may seem like a long journey, but taking it step by step makes it much simpler.
So, there you have it – everything you need to confidently make the move from a shared hosting account to VPS.
If you’re ready to experience the power of VPS web hosting and migrate to a faster hosting experience, head over to our VPS hosting service.