Changing the WordPress Address and Site Address URL settings in the database

Sometimes when moving a wordpress site around, I mess up one of the settings and get locked out. The wordpress login page is not letting me in, or not showing up at all! Brief moment of panic ensues. To fix this in the database, I usually need to update 2 of the fields in the wp_options table.

mysql> SELECT * FROM wp_options WHERE option_name IN ('siteurl','home');

Update those to what you need and you should be able to get back in. For example,

mysql> UPDATE wp_options SET option_value = 'http://www.omniweb.com/wordpress' where option_name IN ('siteurl','home');

This entry was posted in Uncategorized. Bookmark the permalink.