Support » Fixing WordPress » Rapid upgrading many WP sites – command-line plugin deactivator/activator wanted

  • aaron1728


    I’ve got over 25 different WP sites on the same server and would like to expedite upgrades to current WP versions. If I could script

    1) for each domain, de-activate all plugins
    2) for each domain, delete old WP, copy new WP

    then I’d use a browser to run the upgrade script for each domain, which takes a few moments, each


    3) for each domain, re-activate plugins

    Is there a way from a Linux command line to de-activate and/or re-activate all the plugins in a WP installation? I assume that this must be via some kind of MySQL command line, no?

Viewing 1 replies (of 1 total)
  • Aaron,

    I know this is only 9 months late, but I have an upgrade script here:

    I do not have a way to automatically deactivate and reactivate plugins, though. There is a function called deactivate_all_plugins() in the file wp-admin/includes/plugin.php. To perform the automatic deactivation, we would have to unroll all of the things that are done by the function. I am hesitant to run off and do that, as the intricacies of the function may change from version to version. What is really needed is an API that can be called from a command line to perform such a deactivation.

Viewing 1 replies (of 1 total)
  • The topic ‘Rapid upgrading many WP sites – command-line plugin deactivator/activator wanted’ is closed to new replies.