@tyrro Let me make sure I've got this...
You're suggesting to:
cd /var/www/example.com/htdocs/
...and run some commands (I assume they are WP-CLI commands):
wp option set home https://example.com
...and:
wp option set siteurl https://example.com
???
Will this work for Single and Multi-Site installations?