How to Migrate Magento Store from cPanel to Cloud Hosting
- Syed Muneeb Ul Hasan
- March 17, 2020
Magento is one of the most successful and powerful platforms in the world of ecommerce, as it is loaded with many useful and valuable features. There are a large number of online stores that use Magento for their business which are hosted on different services.
On community forums, we regularly see many queries regarding migrating Magento from cPanel hosting onto a new server, Some of the users have taken the decision to migrate Magento to a new server and some of them are still confused that whether or not they should leave their current Magento cPanel hosting and where to host.
So, before going directly to learning how to transfer Magento to a new server, first, let’s understand why to move Magento to a new server and what’s the right solution. Once you and I get on the same page, then I will move towards the cPanel migration method.
The Basics –
What is Magento Shared Hosting?
Shared hosting is the most traditional hosting option as it is a cheap and easy solution for startups and for those who have a single simple light-weight website.
In shared hosting, multiple websites are hosted on a single server which is maintained by the hosting provider. Each website will get the share from the server’s resources, total available bandwidth, power, memory, and features. The amount of server resources you get depends on the plans you buy from a provider. This allocation keeps the cost low and would be easy for users to pay.
So, it can be a good option for startups and for those who have a simple lightweight website.
Companies that Offer Magento Shared Hosting
There are tons of companies who are providing Magento shared hosting, some of the big names are:
- Namecheap Magento Hosting
- HostGator Magento Hosting
- GoDaddy Magento Hosting
- SiteGround Magento Hosting
- A2 Magento Hosting
Is Magento Shared Hosting a Good Option?
If you’re are a startup and looking for the cheapest temporary solution then you can go with shared. However, for long-term, I would say a BIG FAT NO!
Now you will be thinking why I have directly rejected it and after going through it, you might consider migrating Magento onto a better home. There are reasons behind this decision.
In the ecommerce business, customer satisfaction is the most important factor to make it successful and when you talk about customer satisfaction, you need to give priority to it. I will discuss the two biggest aspects that a customer looks for, a fast loading and a secured online store where they can make purchases in less time without any downtime and security issues!
Magento is a heavy-weight web application and for that you need a robust, and a reliable hosting solution. But in shared hosting, the distribution of resources will affect the performance and can compromise its security.
As I have mentioned before that how shared hosting works, so keeping that in mind, just imagine your powerful online store hosted on it and sharing limited resources. You will experience lower speeds which will hamper the customer experience you are trying to provide to your users.
I hope you have the answer on your own as to why it is not a recommended option :)
So, now the question is raised that if shared hosting is not a solution for your Magento store then, what is the right one to migrate your Magento store?
To help you out further, I will explain more about cloud hosting and will also guide on how to migrate your Magento store on to a new server (based on a cloud) including, why is it essential for your ecommerce store. So, let’s move to it!
What Is Cloud Hosting for a Magento Store Owner and Why Should You Consider It?
Cloud hosting is a viable solution, where your website is hosted on a dedicated cloud server and you have one of the biggest advantages that if your application (specially Magento) faces any server issues, you have the option to scale the server whenever you want.
It is not the cheapest solution as shared hosting is but you have an advantage of paying for the resources that you consume and not end up paying for the resources that are not being utilized.
Cloud-based infrastructure that you might consider to migrate Magento Site:
- Google Compute Engine
- Amazon Web Services (AWS)
- Microsoft Azure
So, keeping all the factors of Cloud Hosting in mind, it is the best and recommended option for Magento store to boost its performance and increase security level, which in return, increases sales ratio!
Key Differences Between Shared Hosting and Cloud Hosting
|Key Factors||Shared Hosting||Cloud Hosting|
|Performance||As the resources are shared between the websites hosted, it will slow down your store.||Due to the deployment of your application on the dedicated cloud server, it has an upper hand in terms of speed and performance.|
|Scaling||As the requirement of business increases in terms of traffic, you can’t scale the server due to the limited/shared resources.||As the requirement of business increases in terms of traffic, you can easily scale the server quickly in no time.|
|Price||As the resources are divided between each user hosted on a single server, the price will be cheapest.||The price will be higher than shared, but you don’t have to pay for the unused services which will lower the price significantly.|
|Resources||Server resources will be shared to host a large number of websites.||Server resources will be dedicated to host larger number of websites.|
|Security||The security risk is higher due to the server resource sharing with other users.||The security risk is lower because of anti-malware solutions and multiple layers of recovery options.|
|Traffic||Doesn’t have the ability to serve a large number of traffic as the amount of processing power, bandwidth and storage are limited.||Have the ability to serve a large number of traffic as the amount of processing power and storage is dedicated to you only.|
|Downtime Risk||Due to limitations, the downtime risk is higher.||Due to less limitations, the downtime risk is lower.|
After seeing all the factors and differences, hope you are convinced to migrate your Magento store to Cloud hosting.
If I am right, then let’s also understand the difficulties which you may be faced with, in migrating Magento on to Cloud hosting:
Difficulties That Can Occur in Magento Cloud Hosting
- It’s not easy to deploy your Magento store directly to cloud hosting without technical knowledge
- As Magento is a robust and powerful ecommerce platform, it needs proper configuration and optimization to help it perform better.
- Managing your server is a bit more difficult to make use of the provided services.
Now there is one question that will come to your mind: What’s the Solution to Make Cloud Hosting Easier? The answer is Managed Cloud Hosting.
If you’re not familiar with this term, don’t worry, let’s discuss it!
What is Managed Cloud Hosting?
A hosting solution where you don’t have to manage your server on your own. All your server configuration and management will be the responsibility of the provider. You can also do the basic necessary changes and requirements easily by using their handy features which is difficult to implement in Cloud Hosting. As you don’t have to think for your server related issues, your time will be saved which can be utilized on other tasks to get the most from your business.
Now that you are aware of Managed Cloud Hosting, it’s time to recommend you a Managed Cloud Hosting provider for your Magento store. I will recommend Cloudways as a solution for YOU!
Why Should You Migrate Magento from Shared Hosting/Cpanel onto Cloudways?
Cloudways is a well-known managed hosting provider which reduces all the pains regarding setting up and managing your server. They offer you lots of options to host your Magento store on any 5 top rated infrastructure providers which include AWS, DigitalOcean, Vultr, Google Compute Engine and Linode. Let’s get a short overview of the features offered by Cloudways:
Key Benefits That Will Convince You to Migrate Your Magento Store onto Cloudways
SSD-Based Magento Cloud Hosting: You will get full control over your cloud server with dedicated resources.
Advanced Cache: You have to option to utilize advance cache options which include Memcached, Varnish, and Redis that can enhance your store’s performance significantly.
CloudwaysCDN: You can install it within a few clicks to boost the speed of your Magento store.
Optimized Stack: Their stack uses the latest technologies like Apache, Nginx, PHP-FPM, and MySQL/MariaDB which can help your Magento store load faster than ever.
Free Magento Full Page Cache: If you have Magento 1.x version installed, then this additional feature will make your store blazing fast.
Dedicated Firewalls: They ensure the security of Magento stores with platform-level firewalls and by performing regular firmware upgrades.
1-Click Installation: You can use their one click feature for deploying Magento application to SSL installation.
Auto-Healing Servers: This feature will mitigate the chances of downtime and business loss.
Automated Backups: You can easily schedule automatic backups of your store with setting its frequency (hourly to weekly).
Vertical Scaling: In terms of any urgent requirement regarding RAM, processor, bandwidth, and storage, you can vertically scale them using an innovative 1-click feature.
24/7 Expert Support: You can contact their support team anytime as they are always active to welcome queries and providing their solutions.
Large Number of Global Data Centers: You have the option to select the nearest location of your targeted audience from the provided 60 datacenters.
There are many more valuable and powerful features of Cloudways that would be beneficial for your Magento powered store. To know more, you can explore Cloudways Magento Hosting.
Ready to Migrate Magento to Cloudways?
Now if you want to migrate your store from Magento cPanel hosting on to Cloudways, here is the easy process to do it!
Before starting with Cloudways, first, you need to get a backup of your store and its database. So, connect your Magento cPanel hosting with SSH terminal, you can use Putty for it.
Once is done, navigate to the root directory of your Magento 2 store.
Then create a backup of your store’s database by running this command:
mysqldump -u yourdbusername -p yourdbname > database.sql
In the above command, enter your cPanel hosting database username, database name and then add the database file name of your choice.
After executing this command, it will ask you for a database password, enter it!
Now go to the File Manager from your cPanel hosting:
Then navigate to the root directory of your store:
Now compress all the files and folders in a zip:
Note: I have set the zip file name as magentobackup.zip, you can change it according to your choice.
Now your website and a database backup is ready which you can find from: www.yourdomain.com/magentobackup.zip
Let’s get started with Cloudways!
Create an account at Cloudways and once its done, then start Magento 2 within a few clicks:
Select Magento 2 from the drop-down:
Then enter the server and application name of your choice:
Now select the server of your choice from their infrastructure partners, I am selecting DigitalOcean. Then set server size and location according to your requirements:
At last, just click on Launch Now:
It will take a few minutes to get deployed. Once it’s completed, you will see the server installed successfully message with the Magento 2 application under it:
Before performing cPanel migration for your Magento store, you have to remove the database and files from your installed application of Cloudways.
Here’s the quick checklist that you should keep in mind while cPanel migration to Cloudways:
- Create a full backup of your Magento store
- Upload Magento backup to your Cloudways server
- Upload database backup to your Cloudways server
- Clear Magento cache and Varnish cache
- Test your migrated Magento store
- Take your Magento store live on your Cloudways server
Connect your Cloudways hosting with SSH and then go to your store’s root directory.
First, clean the stored files and folders by running this command:
rm -rf *
Now go to your application dashboard from your account. Then click on LAUNCH DATABASE MANAGER:
Select all the table and drop them:
Now again go to SSH terminal where you have connected your Magento application of Cloudways. Then run this command:
Note: As mentioned above, the URL is the path to your backed up file on cPanel
Now unzip this file by running this command:
Now import the database on to your Cloudways application by running this command:
mysql -u CLOUDWAYS-DB-USERNAME -p CLOUDWAYS-DB-NAME < database.sql
In the above command. enter the database credentials of your application installed on Cloudways.
After executing this command, it will ask you for the database password, enter it!
Then go to open the env.php file by going to app/etc directory of your store and replace the database credentials with your Cloudways one.
Note: If you want to use a new domain name, open the database manager and then go to core_config_data table. And replace the value of web/unsecure/base_url and web/secure/base_url.
All done, now just run the necessary CLI commands like clear the cache and then go to your store’s front page and you will see the result.
To better understand the process, here’s a video tutorial on how to migrate your Magento store from cPanel to Cloudways:
Note: I have shown you Magento migration method using CLI, there is one more solution which you can find from here: How to Migrate Magento Store to Cloudways From a cPanel Based Host
Ready to Begin Magento’s Migration on to Cloudways?
If yes, then at the moment, they have a big discount which you can’t miss:
After following this Magento migration detailed guide, I hope you have learned which Magento hosting would be a good choice for you and how to migrate Magento from cPanel hosting on to Cloudways.
cPanel hosting can be a hectic task to do. If you never been it to into such sort of processes before. Then, there’s nothing to worry about that, your cPanel to cloud hosting at Cloudways will be done for free for your first Magento store. You just have to send a request and rest will be taken care of by the technical support team.
Still, if have any confusions or want to add something? just drop your comment below and I will get back to you!
Subscribe to get latest Magento news
Read More Articles
- June 24, 2020