WordPress: meh. But anyway:
#
# server1
#
scp -r /var/html/www/sitey/ server2:.
mysqldump sitey-db-name -u root -p > sitey-sql
scp sitey-sql server2:.
#
# server2
#
mv sitey /var/html/www/
# for nginx. owned by user for easy modification (can be www-data) too.
sudo chown -R ubuntu:www-data /var/html/www/sitey
# option1: manual
# mariadb (mysql improved)
# underscores better as no quotes required
#
sudo mysql -u root -p
create database wp_sitey;
create user wp_sitey_user;
grant all on `wp_sitey.* to `wp-sitey-user`@'localhost';
set password for `wp_sitey_user@localhost = PASSWORD('blahblah');
# option2: auto (better!)
# use https://raw.githubusercontent.com/saadismail/useful-bash-scripts/master/db.sh
mysql -u root -p -d wp_sitey < sitey.sql