WordPress.org

Forums

Rapid upgrading many WP sites - command-line plugin deactivator/activator wanted (2 posts)

  1. aaron1728
    Member
    Posted 7 years ago #

    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

    then

    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?

  2. jerrybell
    Member
    Posted 7 years ago #

    Aaron,

    I know this is only 9 months late, but I have an upgrade script here: http://www.jerry-bell.com/2008/04/29/wordpress-backup-script/

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic