I have a bash script that I'm using to install WordPress using wp-cli. Everything works fine except for setting the siteurl. The way I'm installing is:
wp core install --url=mysite --title=mysite --admin_user=admin --admin_password=password --admin_email=example@mysite.com
Even though it should be set at install, the siteurl still winds up being 'localhost', which then breaks everything since I'm using WAMP's virtual host. I tried manually updating with
wp option update siteurl mysite
but that just returns 'Success: Value passed for 'siteurl' option is unchanged.' and siteurl stays as localhost. The WP_SITEURL and WP_HOME values aren't even set in wp-config.php after the script runs. If I manually add them, everything works fine, but I really need it done through a script.