This is the 6th article in EasyEngine Series
Today’s article I will guide you step by step to move a website from Shared Host service to EasyEngine installation server.
Prepare
- A brand new Linux server with Ubuntu and EasyEngine installed. If you haven’t chosen a VPS yet, I encourage you to choose DigitalOcean or A2Hosting .
- Connect to the server as root using an SSH Client like MobaXTerm.
Contents
- 1 Step-by-step instructions for transferring websites from shared hosts to Linux servers with EasyEngine
- 1.1 Step 1: Install the website on the Linux server
- 1.2 Step 2: Delete the data of the newly created website
- 1.3 Step 3: Bring website data from shared host to Linux server:
- 1.4 Step 4: Check the file wp-config.php
- 1.5 Step 5: Re-authorize the folder
- 1.6 Step 6: Install the necessary plugins
- 1.7 Step 7: Point the domain to the Linux server
Step 1: Install the website on the Linux server
First you add the website domain you want to transfer with the following command of EasyEngine:
ee site create domain.com --wpredisFor example:

Then you access the folder containing the source code of the website you just created with EasyEngine with the following 2 commands:
ee site cd domain.com
cd htdocsStep 2: Delete the data of the newly created website
EasyEngine’s website creation command in the above step will create the database and WordPress source code for the website. Your task is to delete them all so that you can get the website’s data from the shared host later.
Delete the database with the following command (using WP CLI):
wp db reset --allow-rootDelete the source code with the following command (make sure you have moved into the website’s htdocs directory):
rm -rf *You access the File Manager in the Shared Host’s cPanel. Compress the entire website source code.
Select the GZipped Tar Archive compression option. Enter the file name so that it is easy to remember. Click the Compress File(s) button to start the compression.

On the Linux server side, you get this archive with the following command: (replace domain.com with your website’s domain name, source_code.tar.gz with the name of the archive you created above.
wget domain.com/source_code.tar.gzFor example:

After downloading the compressed file to the Linux server, extract it with the following command:
tar -xvf source_code.tar.gzBecause EasyEngine uses the wp-config.php file located in the /var/www/domain.com directory , not the file located in /var/www/domain.com/htdocs .
So you need to rename the wp-config.php file of the old website you just transferred to the Linux server to anything. For example, you run the following command:
mv wp-config.php wp-config.old.phpNow you continue to transfer the database to the Linux server.
First you go to phpMyAdmin on the old shared host and export the database to the sql file.

Now you upload this file to /var/www/domain.com/htdocs using sftp in MobaXTerm:

Next, you import the old website data into the database of the new website on Linux with the following command (using the WP CLI):
wp db import data.sql --allow-rootData.sql is the file you just exported on the old website. Change the filename to suit your situation.
Step 4: Check the file wp-config.php
Using the Moba Editor available in MobaXTerm, you open the wp-config.php file located in /var/www/domain.com/ . If your old website uses a different prefix table than wp_, you should correct it. If you do not edit any further, access the website and it will appear on the WordPress installation screen.

You need permission to avoid being asked for FTP information when updating or installing plugins in WordPress.
Run the following command to make sure the directory and files of the newly converted website are owned by user www-data and group www-data.
chown -R www-data:www-data /var/www/domain.comStep 6: Install the necessary plugins
You need to run the command ee update site so that your website has just switched to receive automatic plugin installation and correct configuration with EasyEngine.
Initially, I created a website with the –wpredis option , now I will switch to –wpfc and then switch back to –wpredis . Having to do that, EasyEngine will automatically install the plugin and set the plugin to the –wpredis configuration in my case.
ee site update domain.com --wpfcStep 7: Point the domain to the Linux server
The last step is to point your domain to the Linux hosting you just moved to. Then visit the website and test again to see if there are still errors or not.
It’s done.
You have just moved a website from a shared host to a Linux server with EasyEngine installed.
If you encounter any errors during the website transfer, please share in the comments below.

