Make WordPress Core

Opened 9 years ago

Closed 9 years ago

#40366 closed defect (bug) (invalid)

WordPress Address (URL) and Site Address (URL) cross wired into wp_options table in DB

Reported by: rgmenon's profile rgmenon Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.7.3
Component: Database Keywords:
Focuses: Cc:

Description

Reporting on Version: 4.7.3, Linux

In wp-admin->Settings->General, the "WordPress Address (URL)" and "Site Address (URL)" fields are cross wired into the database wp_options table. What you fill in "WordPress Address (URL)" is going into option_name siteurl and what you fill in "Site Address (URL)" is going into option_name home:

mysql> select * from wp_options where option_name = 'home';
+-----------+-------------+----------------------------------+----------+
| option_id | option_name | option_value | autoload |
+-----------+-------------+----------------------------------+----------+
| 33 | home | < value set in Site Address (URL)> | yes |
+-----------+-------------+----------------------------------+----------+
1 row in set (0.00 sec)

mysql> select * from wp_options where option_name = 'siteurl';
+-----------+-------------+---------------------------------------+----------+
| option_id | option_name | option_value | autoload |
+-----------+-------------+---------------------------------------+----------+
| 1 | siteurl | <value set in WordPress Address (URL) field> | yes |
+-----------+-------------+---------------------------------------+----------+

Workaround of setting the fields directly in the DB works correctly.

Change History (1)

#1 @johnbillion
9 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to invalid
  • Status changed from new to closed

Thanks for the report, @rgmenon. Welcome to WordPress Trac!

This is expected behaviour. The home option specifies where the home page of your site exists (eg example.com) and the siteurl option specifies where WordPress is installed, which can be in a subdirectory, eg. example.com/wordpress.

The terminology used on the General Settings screen was improved years ago to improve things for users, but this does mean that the option names don't necessarily match the labels used in the admin area.

Note: See TracTickets for help on using tickets.