Forum archive
Wordpress VM - both Address and Site URL are gray
Hi,
How do I modify these settings? The WordPress Address and Site Address are both populated with the private IP address my VM is using (under Settings > General from the wp-admin page). No where in the setup or config did I see a prompt to change these. The boxes are both gray and I cannot change the fields.
The problem is some plugins use these, and they fail with the private IP. For example, a google XML site map does not work with http://privateip/xml.
Thanks
The default configuration is to support all hostnames dynamically, but you change that in /var/www/wordpress/wp-config.php
old --- define('WP_SITEURL', 'http://'.$_SERVER['HTTP_HOST']); define('WP_HOME', 'http://'.$_SERVER['HTTP_HOST']); new --- define('WP_SITEURL', 'http://www.yoursite.com'); define('WP_HOME', 'http://www.yoursite.com');There is a gotcha though, as wordpress stores those values in the database. You can change them as follows:
SITE='http://www.yoursite.com' NAME=wordpress DB_PREFIX=wp_ mysql --defaults-extra-file=/etc/mysql/debian.cnf <USE $NAME; UPDATE ${DB_PREFIX}options SET option_value='$SITE' WHERE option_name='home'; UPDATE ${DB_PREFIX}options SET option_value='$SITE' WHERE option_name='siteurl'; EOF