Moving a WordPress site to a new domain means replacing the old address in the database. That is the kind of command I want to see the result of before it runs for real.
With WP-CLI, add --dry-run:
wp search-replace 'http://old.example' 'https://new.example' --dry-run
It prints a table with how many replacements it would make per table and column, and writes nothing. When the numbers look sane, run the same command without the flag. WP-CLI handles serialized data properly, which a plain SQL replace does not, and that is why I would use it for this.
Caveat: a dry run is not a backup. Export the database first (wp db export) before you do the real run.
Further reading: wp search-replace (WP-CLI handbook), On this site: wp option list –autoload=on –format=total_bytes shows what every page load drags along, On this site: wp search-replace –dry-run shows what a WordPress domain change would touch