⚡️ GITHUB: ★ 19 ⑂ 6 →
cPanel to EasyEngine Migrate CLI (CEM CLI) is a bash script built to help people migrate their sites from a cPanel to a rented VPS with EasyEngine installed on it.
You need to rent a VPS with EasyEngine installed on it. Here's the list.
wget -qO ee rt.cx/ee && sudo bash ee
After you have completed the pre-requisite steps, all you need to do is download and run the cPanel-EasyEngine-Migrate-CLI. You can do that by running the following commands.
Download cPanel-EasyEngine-Migrate-CLI
sudo wget -qO cemcli https://git.io/vPO0q && sudo chmod +x ./cemcli && sudo install ./cemcli /usr/local/bin/cemcli
Run cPanel-EasyEngine-Migrate-CLI
cemcli
To Uninstall cPanel-EasyEngine-Migrate-CLI
rm /usr/local/bin/cemcli
Running this CLI will output several questions on your terminal. Each question comes with an example value enclose with square brackets []
. Just fill up the answers and you'll be able to automate bits of the complete migration process.
Yes, I get that. This script is quite opinionated and in the beta stage. While I have released v1.0.0 it still needs to be tested and I plan to maintain and grow it. If you are wondering how it works, here's a step by step guide.
Rent a VPS preferably with Ubuntu 16.04 x64 OS (I recommend Vultr.com | During summer, by using my affiliate link you get $20 Signup Bonus or if you prefer non-affiliate link)
Install EasyEngine and run this command after logging into your VPS with SSH wget -qO ee rt.cx/ee && sudo bash ee
Take a backup of your cPanel. I prefer taking a complete backup and that's how this script works.
/public_html/
folderYou can watch all these steps in this short video which can be found at the end of these steps.
cemcli
command and start answering the questions as I did in the video below.While the CLI migrates your site for you, this following things happen.
cd ~
).Database Name
, Database Username
, Database Password
, and Database Prefix
. You should enter all of these values similar to what you have in your wp-config.php
on your old server. This is a crucial step. Otherwise, you won't be able to import your old database).--wp
parameter set. rsync
to copy/sync your WP Site's files from your backup to the EasyEngine site install location i.e. from sitefolder/backup/homedir/public_html/
to /var/www/domain.com/htdocs/
.--allow-root
parameter.--allow-root
parameter for now./var/www/domain.com/
folder. In case you want to use WPCLI to do something else, you can cd to /var/www/domain.com/htdocs/
path.nano /etc/hosts
and append XX.XX.XX.XX domain.com www.domain.com
at the end, then you can browse your migrated site to check if everything is running fine. (XX.XX.XX.XX is the IP of your server. I found out that if I flush the DNS cache in my mac then I can avoid the delay for the hosts file edits to take effect. You can flush your DNS cache by running this command on your mac sudo killall -HUP mDNSResponder
).cemcli
removes the backups both extracted and tar files as soon as it can to save as much space as possible.You can either try to guess how it's done with the GIF below or Watch a 2 min video on YouTube.
While CEM CLI is no where near an ideal script, it helps me migrate/stage my sites on self-managed VPS. I plan to improve this script by adding several new routines to it. Following is a list of ideas that I have.
Make sure to test this CLI on a new server. It is beta and completely new. I have tested it to transfer my cPanel sites to an EasyEngine VPS (based on Ubuntu 16.04 x64) while working on a Mac. Use at your own risk 🤔.
cemcli
removes the backups both extracted and tar files as soon as it can to save as much space as possible.cemcli
removes the backups both extracted and tar files as soon as it can to save as much space as possible.This open source project is maintained by the help of awesome businesses listed below. What? Read more about it →
For anything else, tweet at @MrAhmadAwais
I have released a video course to help you become a better developer — Become a VSCode Power User →