Make WordPress Core

Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#4007 closed enhancement (duplicate)

check for constant SITEURL instead of db

Reported by: mikewp Owned by:
Milestone: Priority: normal
Severity: normal Version: 2.2
Component: Optimization Keywords:
Focuses: Cc:


is_blog_installed checks the db for the blog URL. But this option isn't changed often ;) . So, it's better to define a constant with the blog url and thus we have one less query.

The patch keeps the 'old' way if the constant isn't defined.

Attachments (1)

is_installed_option.diff (1.7 KB) - added by mikewp 9 years ago.

Download all attachments as: .zip

Change History (3)

#1 @charleshooper
9 years ago

  • Keywords has-patch removed
  • Milestone 2.2 deleted
  • Resolution set to duplicate
  • Status changed from new to closed
  • Summary changed from check for constant instead of db to check for constant SITEURL instead of db

Dupe of #4003, although I noticed in your patch that you have updated the is_blog_installed() function, I believe they missed it in their patch

#2 @charleshooper
9 years ago

Sorry, I looked closer at the changes and realized your change to is_blog_installed() is incorrect. is_blog_installed() is only called once by install.php, if it returns true then the installation is aborted, preventing population of the user-defined wordpress database.

This would prevent someone with SITE_URL defined from being able to install Wordpress.

Note: See TracTickets for help on using tickets.