Title: CLI database commands assume multisite.
Last modified: March 8, 2019

---

# CLI database commands assume multisite.

 *  Resolved [daverobinsonpw](https://wordpress.org/support/users/daverobinsonpw/)
 * (@daverobinsonpw)
 * [7 years, 3 months ago](https://wordpress.org/support/topic/cli-database-commands-assume-multisite/)
 * It appears that running wp redirection database upgrade fails if you’re not running
   multisite.
 * It looks like it’s down to this change
 * [https://plugins.trac.wordpress.org/changeset/2042801/redirection/trunk/database/database.php](https://plugins.trac.wordpress.org/changeset/2042801/redirection/trunk/database/database.php)
 * So the multi site behaviour of iterating across get_sites() and executing the
   callback is being applied in any CLI environment even if the site is not multisite.
 * The end result is that a non multi-site build gets a fatal error for a call to
   an undefined function get_sites.
 * I assume that the change is related to this item in the changelog “Fix database
   upgrade on multisite WP CLI”. Unfortunately it’s caused a regression for non 
   multisite WP CLI.

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Thread Starter [daverobinsonpw](https://wordpress.org/support/users/daverobinsonpw/)
 * (@daverobinsonpw)
 * [7 years, 3 months ago](https://wordpress.org/support/topic/cli-database-commands-assume-multisite/#post-11290450)
 * The issue reported here was in 4.0.1 which appears to have been withdrawn since
   the current version according to the plugin page and download link is 3.7.3
    
   It would be useful to have a sticky note in the support queue and/or a notice
   on the plugin page to warn people who had already updated.
 *  Plugin Author [John Godley](https://wordpress.org/support/users/johnny5/)
 * (@johnny5)
 * [7 years, 3 months ago](https://wordpress.org/support/topic/cli-database-commands-assume-multisite/#post-11291042)
 * Yep, fixed and in the next version! Thanks for the report.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘CLI database commands assume multisite.’ is closed to new replies.

 * ![](https://ps.w.org/redirection/assets/icon-256x256.jpg?rev=983639)
 * [Redirection](https://wordpress.org/plugins/redirection/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/redirection/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/redirection/)
 * [Active Topics](https://wordpress.org/support/plugin/redirection/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/redirection/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/redirection/reviews/)

## Tags

 * [cli](https://wordpress.org/support/topic-tag/cli/)
 * [multisite](https://wordpress.org/support/topic-tag/multisite/)
 * [regression](https://wordpress.org/support/topic-tag/regression/)

 * 2 replies
 * 2 participants
 * Last reply from: [John Godley](https://wordpress.org/support/users/johnny5/)
 * Last activity: [7 years, 3 months ago](https://wordpress.org/support/topic/cli-database-commands-assume-multisite/#post-11291042)
 * Status: resolved