I use Duplicator Pro too. It's just too easy however, I also use these following commands for other websites...
Note: the only downside is that we have to skip the old wp-config.php, so if there are specific settings, you'll need to copy those over. You could also overwrite wp-config.php and change the DB settings before importing and that will work too.
On Old Server
The following commands do this: Change to the user, change the directory to public_html, activate WordPress maintenance mode, export ALL tables in database, zip up (using no compression - it's faster) everything in public_html:
sudo su {USERNAME}
cd /path/to/public_html
wp maintenance-mode activate
wp db export bkup-now.sql
zip -0 -rq bkup-now.zip ./
On Enhance Server PHP >=7.4 ONLY!
Install WP App via Enhance - Make sure WP Version is the same, and change PHP version too. On the old server you can use wp core version
to get the WordPress version number if you don't already know it.
The following commands do this: Change to the Enhance user, change directory to public_html, get the .zip file from the live website, unzip the file and skip extracting wp-config.php, import the WordPress database.
sudo su {USERNAME}
cd /var/www/{WEBSITE-ID}/public_html
wget "https://domain.com/bkup-now.zip"
unzip -oq bkup-now.zip -x "wp-config.php"
wp-cli db import bkup-now.sql
Note: If you need to change domain url use the following command: wp-cli search-replace 'https://domain.com' 'https://newwebsite.com'
Then run the following to deactivate WordPress maintenance mode and remove the SQL file and .zip file.
wp-cli maintenance-mode deactivate
rm bkup-now.sql bkup-now.zip