Moving a WordPress site: Changing URL and/or sub-folder from the command line

When maintaining a WordPress site, you might find it challenging to find the settings to update to properly convert your site from one URL to another, or from a root directory to a sub-directory.

For example, you might want to update the site of an event that happens every year, where previous years will be relocated to /year/ while the current event occupies the main domain...

This is a short reminder list of what should be updated. This covers sites with multi-site configured.