Opened 5 years ago

Closed 5 years ago

#7627 closed defect (bug) (fixed)

Upgrade performed with empty database creates database

Reported by: pishmishy Owned by: pishmishy
Priority: high Milestone: 2.7
Component: General Version: 2.6.1
Severity: major Keywords: install upgrade database has_patch
Cc:

Description

An upgrade process performed before the user has initialized the WordPress install causes database tables to be created. This then prevents the user from running the setup process, locking them out. To reproduce:

  1. Install WordPress but don't run through the installation pages at http://foo.com/wp-admin/install.php
  2. Run the upgrade process at http://foo.com/wp-admin/upgrade.php
  3. Database tables have been created, preventing the install process from running, the user table is empty.

Attachments (1)

7627.patch (981 bytes) - added by pishmishy 5 years ago.
use is_blog_installed()

Download all attachments as: .zip

Change History (5)

  • Keywords has_patch added
  • Status changed from new to assigned

Attached patch won't allow an upgrade if get_option('db_version') is undefined. I am of course, presuming that this is a useful way of detecting an empty database.

comment:2   DD325 years ago

is_blog_installed() - /wp-includes/functions.php sounds like it'd be the function call you'd be after.

use is_blog_installed()

So it is! New patch attached.

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

(In [8763]) Only upgrade if we are installed. Fixes #7627 props pishmishy.

Note: See TracTickets for help on using tickets.