Make WordPress Core

Opened 9 years ago

Closed 9 years ago

#4199 closed defect (bug) (fixed)

Saving general options when WP_SITEURL is defined can really screw things up

Reported by: filosofo Owned by: rob1n
Milestone: 2.2 Priority: high
Severity: critical Version: 2.2
Component: Administration Keywords: home, siteurl, options, has-patch commit
Focuses: Cc:


If you've defined WP_HOME or WP_SITEURL in your wp-config.php file, then the home and siteurl fields under Options > General become disabled.

At least in Firefox, that means that if you update any of the other options on that page, WP will set the home and siteurl options in the database to NULL, which makes WP think the site has not been setup yet, requiring a database edit to straighten things out.

My attached patch removes home or siteurl from the page_options field when they are defined by WP_HOME or WP_SITEURL.

Attachments (1)

wp-admin_options-general.php.diff (897 bytes) - added by filosofo 9 years ago.

Download all attachments as: .zip

Change History (7)

#1 @filosofo
9 years ago

  • Keywords has-patch added

#2 @Nazgul
9 years ago

  • Keywords commit added

#3 @rob1n
9 years ago

  • Owner changed from anonymous to rob1n

Looks good. +1.

#4 @rob1n
9 years ago

  • Status changed from new to assigned

#5 @ryan
9 years ago


#6 @rob1n
9 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

(In [5395]) Don't set URL options if WP_HOME and or WP_SITEURL are defined. Props filosofo. fixes #4199

Note: See TracTickets for help on using tickets.