In this tutorial, we will show you how to migrate your Magento store to Cloudways from a cPanel based hosting provider.
Please note that these are general instructions (can vary slightly with different cPanel versions) and would require some level of knowledge of the related tools to be able to complete it.
How to Migrate Your Magento Store to Cloudways From a cPanel Based Host
Step 1: Create a Full Backup (Web Files and Database) of Your Magento Store via cPanel
Log in to the cPanel of your old host.
To create a full backup, click on the Backups option from the first page as shown in the figure below.
Download web files
Click on the button Home Directory.
To download a copy of the backup file to your computer, click the filename under Backups Available for Download.
The date on which the backup is created appears in the filename (which begins with backup-MM-DD-YYYY). The file is stored as a tarball (compressed data file) with the extension.tar.gz.
Now you need to download a database backup. Select the MySQL Databases option and a list of databases on your account appears. Select the database (as shown in the above screenshot) that you want to save and then click it to download. The backup is saved with a .sql extension.
Step 2: Upload Web-Files Backup to Your Cloudways Server
Locate your master credentials from the Master Credentials section under the Server Management area.
Here we assume that you have already launched a new server in your Cloudways account and installed a clean Magento application on it.
Open an FTP client program of your choice. We have used WinSCP in this example.
Under HostName enter your Cloudways server IP Address.
Enter port 22 under Port number.
Enter the Username and Password that you find in the Cloudways console application tab.
Click on the Login button.
You should see a warning. At that point, just click on Yes to continue.
Now we will upload the web files backup that we have on our computer (.tar.gz file) to the Cloudways server and then you need to untar your backup file.
Step 3: Edit Database Details in Your local.xml File
Under public_html > app > etc, open the file local.xml by just double-clicking it (from your preferred FTP client).
Now we need to replace the database connection details (database name, username, and password) with the correct ones.
Step 4: Restore Database Backup to Cloudways Server
Now, go back to your Cloudways console. Under the Application Management area, you will find a button to Launch Database Manager. You can launch it from here.
Cloudways MySQL Manager will be launched. Now we need to restore the database. For that, click Import.
As soon as you click on Import, a new window will appear providing you an option to choose your Database backup file:
Click on Browse.
After choosing your MySQL database backup file, click on Execute.
You can also click on checks to track errors during the restore process.
Step 5: Clearing Magento & Varnish Cache
It is very important to clear the varnish and Magento cache before testing your migrated store. The following instructions detail how you can accomplish that.
Purge varnish cache from your Cloudways Console under the Server Management area in the Manage Services section. Select Varnish and click on Purge.
Delete Magento cache from the folder public_html. You can find it in the var folder inside the cache folder. You can use your preferred method (SSH or SFTP). Delete the contents of the folder, not the folder itself.
Step 6: Test Your Newly Migrated Magento
Under the Application Management area, do the following steps.
Click on the Domain Management section.
Enter your Primary Domain as shown below.
Click on Save Changes.
Finally! we are done with your migration. Now you should test that all is fine with your site before doing the final DNS changes. You can test it locally via your host’s file.
Kindly note you will have to use your old admin credentials to access the admin area as we have overwritten the Cloudways created ones.
Once you are happy with how your site works on the new server, you can now proceed to do the necessary DNS changes to take your website live from Cloudways.
That’s it! We hope this article was helpful. If you need any help, then feel free to search your query on Cloudways Support Center or contact us via chat (Need a Hand > Send us a Message). Alternatively, you can also create a support ticket.
Make your hosting management faster with cPanel alternative. Cloudways is the visual representation to manage your sites, where everything takes a fraction of the time compared to cPanel.