Drupal

This is Drupal7 of course (php version won't let us use 8)

I had a site I was developing on my local machine, so instead of a fresh install, I copied the whole structure to the new server.

In my case this was:

/var/www/vhosts/entries.mydomain.net/htdocs/ - this is the Drupal root.

I copied the whole of this file structure up to the VPS in the same location (rsync -rultpogz).

This gives us the Drupal core plus this site's files. Be careful about ownership and groups - my Dev system run Apache and file ownerships may need to change if your in a similar situation.

EDIT: A much better way is to install using composer (getting the latest version) and then copy the site specific files:

On the live server, change directory to the virtual hosts 'root' eg:

$ cd /var/www/vhosts
$ mkdir mydomain.net
$ cd mydomain.net
$ composer create-project drupal-composer/drupal-project:7.x-dev drupal-7.x

This creates a structure under the drupal-7.x directory for drupal core with drush etc outside the core structure.
The webroot is drupal-7.x/web. I symlink to this from mydomain.net:

$ cd /var/www/vhosts/mydomain.net && ln -s drupal-7.x/web htdocs

ie, webroot in the virtual host configuration is /var/www/vhosts/mydomain.net/htdocs

Next copy up from DEV server the sites directory specific to this website.
On the DEV server run:

$ rsync -rultpogz /var/www/vhosts/mydomain.net/drupal-7.x/web/sites/maydomain.net <LiveServer_IP>:/var/www/vhosts/mydomain.net/drupal-7.x/web/sites/

If the DEV server runs apache or webserver other than nginx, the owner/group/permissions of the files copied up may need altering

To migrate the database, I first created an empty database with the same name as on the Dev machine and created the user that Drupal logs in with, following instructions found in INSTALL.mysql.txt in the Drupal root directory.

On the dev machine, I dumped the tables for this site using:

# drush $src_alias sql-dump --tables-key=entrysystem --structure-tables-key=common --result-file=/var/www/vhosts/dbdumps/dump.sql

If you are not familiar with alias's in Drush, then go read up about them. They're very useful, esp in multi-site environments.
Because the database is common for other sites, and I utilise the prefix to distinguish tables for each site, I only wanted to dump the tables for this site. That's what the --tables-key=$tables_key bit does - there's a key in drushrc.php  of the form:

$options['tables']['entrysystem'] = array('dbprefix*');

Drush then dumps just the tables with the correct prefix.

A bit more manipulation to remove inserts for cache tables and watchdog, and we have a usable dump.

scp this to the new server, and use mysql to run the script:

# mysql -u sqladmin -p [database] < /var/www/vhosts/dbdumps/dump.sql

If you get no output back then it ran successfully.

In theory, that's it.

If you haven't got your domain's DNS configured yet, add a suitable entry in your machine's host file and visit your website in the browser of your choice (which is of course Firefox)