Chat + Phone Support for Clients

How To Migrate Your Website From Shared Hosting To CLI Managed Cloud Server

Many bloggers launch their sites with shared hosting. This may be good to start out. But you should move your blog to a personal cloud server once you start getting enough traffic to your site.  This will boost your performance and give you more options for the type of web server your use.  In this tutorial, we show you how to migrate your site from a cPanel account to an Ubuntu or Debian VPS/Cloud Server running Nginx, PHP 7, MySQL, and Redis Cache.  Check the site for server OS version requirements.

Migrating to an VPS/Cloud Server isn’t complicated.  Just follow these steps and you can migrate a WordPress blog/website within 2 hours, without any downtime.

NOTE: will migrate your website for you with a 6-month order for any Cloud Server at no additional cost.  Send a ticket to support once you have completed your Cloud Server order and we will migrate your website for you to an, WHM cPanel server, or VestaCP Control Panel server for free.

Step 1

A) Login to your current cPanel account to download a backup of your site.


B) Take a backup of your existing site database and code folder. Make sure to create a backup of all of your files, along with the MySQL database before migrating your site from shared hosting server to your new Easy Engine VPS/Cloud Server.


C)  i) Take backup of code in the form of tar.gz file of code folder in the public_html in File Manager.


ii) Now take a backup of the database. You can export SQL file directly via PHPMyAdmin if the size of SQL file is less i.e., a few MBs.

iii) If your site DB size is in hundreds of MBs or GBs, it’s better to take MySQL dump via Command Line Interface (CLI). Use the below command to take MySQL backup through CLI:


If you do not have ssh cli access to the cPanel account and the DB size is too large for PHPMyAdmin to download the SQL dump backup file, you will need to contact your web host’s tech support to do it for you.

Note: It would be better to store this file in public_html/html etc in order to include in tar.gz backup file.

Step 2- Install EasyEngine

A) To install EE, First, log in to your server via putty third party application PuTTY if you run windows.  For Linux and MacOSX you can use a terminal program and login with your root credentials to your VPS/Cloud Server:

ssh root@YourServerPublicIPAddress

For PuTTY:

i) Enter the IP address of the server in PuTTY then click on OPEN.


ii)  It will ask for the username and password.

iii) Enter the root credentials and login to the server.

iv) Now you’re ready to install the EasyEngine.

B) Install EE using command

 wget -qO ee && sudo bash ee; source /etc/bash_completion.d/ee


C) After installing EE, install its stack by using the command:

ee stack install

This command will install all the required packages in one go. If you don’t want to install all packages then you can install single packages by using the following commands.

Install NGINX  


Install PHP


Install PHP 7.0install-php-7-0

Install HHVMinstallhhvm

Install MariaDB MySQLinstall-mariadb-mysql

Install Postfixinstall-postfix

Install WP-CLIinstall-wp-cli

Install Redisinstall-redis

Install Adminerinstall-adminer

Install phpMyAdmininstall-phpmyadmin

Install phpRedisAdmininstall-phpredisadmin

We recommend you install, Redis and PHP 7 for the best performance.

D) This step is optional but useful for the GUI administration of MySQL DB’s with PHPMyAdmin.  Now, install all Admin tools like PHPMyAdmin and note down HTTP Authentication password for PHPMyAdmin directory. By default its username is easy engine. Use the following command for installing admin tools:


ee stack install –admin

E) Now install php7 by using the command as given below

ee stack install –php7

Step 3: Create a website

A) Create a site by using the command as given below.  Replace with your WordPress domain.


ee site create –wpredis –php7

EasyEngine will automatically create a database for this new site and will set username/password to MySQL for the new domain name (example_com) by default.

Your website is created now.

It will show the result as follows:

Creating, Please Wait…

Creating Symbolic Link For

Creating htdocs & logs Directory

Creating Symbolic Link For Logs

Downloading WordPress, Please Wait…

Enter The MySQL Database Name [example_com]: example_com

Enter The MySQL Database Username [example_com]: example_com

Enter The MySQL Database Password [73kWK4MpRiXjuvo]:

Setting Up WordPress, Please Wait…

Updating WordPress Permalink, Please Wait…

Installing Nginx Helper Plugin, Please Wait…

Changing Ownership

Reloading Nginx Configuration, Please Wait…

Take /etc/Nginx

Configuration In Git Version Control…

WordPress Admin Username: admin

WordPress Admin Password: HelloExample

Successfully Created New Website:

Note: Here, we’re using Nginx, PHP 7, and WP Redis cache. You can also install WordPress or use EasyEngine for other PHP MySQL CMS websites or HTML CSS sites.  You can choose to use no-cache or use another cache of your choice as per your requirement (such as Nginx FastCGI cache or Memcached).

Step 4: Copy Webroot

As the website “” is ready on a new server but we need the old server data to launch a new website successfully.

A) Upload the (code) tar file (tar file downloaded from the shared server) to the document root on the EasyEngine cloud server which is /var/www/ via SFTP/FTP with the help of FileZilla client.


B) Now extract the backup (tar.gz) file that you’ve uploaded on the EasyEngine server. You can use the below command from ssh cli to extract the tar.gz file.

cd /var/www/
tar -zxvf backupfilename.tar.gz

C) The next step is to upload the .sql file to the new server via FTP/SFTP which you’ve downloaded from the shared server. Now import the .sql file into the DB created by EasyEngine  e., done from root ssh cli

mysql example_com < domain.sql

D) Now fix paths on the DB with wp-cli. i.e., within ssh root cli on the EasyEngine server while inside /var/www/

E) Replace the full server path to the site’s documents root in the DB from the old shared server path to the new EasyEngine server path.

wp search-replace ‘/home/exampleuser/public_html/’ ‘/var/www/’ –allow-root –dry-run

F) Once done, commit the changes by removing –dry-run:

wp search-replace ‘/home/exampleuser/public_html/’ ‘/var/www/’ –allow-root

To test your site on the new server before you update DNS and start troubleshooting if any issue arises you should change your workstation hosts file and save the EasyEngine server IP address and website URL into the hosts file.

This page shows you how to do this for Windows, MacOSX, and Linux:

You should clear your DNS cache on your workstations and clear browser cache.  Now browse to your website URL as you would normally – it will show you the website at the EasyEngine server.  Once you verified the site is working as expected, remove the entry from your hosts file on your workstation.

Make sure to update DNS for your existing IP address with the new IP address of your new server. You just need to wait for DNS to cache through the web and propagate.  Now your site should be up and running on your new server with EasyEngine setup.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

By continuing to browse you agree to allow cookies tracking your browsing activity.

10% to 20% recurring commisions for affiliate referrals!

* No purchase necessary. 
Account registration is required.
More info here.
Affiliates Recurring Commissions

Follow this blog

Get every new post delivered right to your inbox.