Forums

WP Super Cache
Configuration is lost when plugin is deactivated (4 posts)

  1. Dalton Rooney
    Member
    Posted 11 months ago #

    I recently had to deactivate my plugins for troubleshooting purposes and noticed that WP Super Cache did not automatically restore itself to its previous state upon reactivation—I needed to go in and re-enable caching, CDN configuration, etc. Normally this isn't too much work, but also I have to remember to exclude my ecommerce directories or else the cart gets cached, which is bad news. This time I forgot to exclude those directories so suddenly my ecommerce page was broken and I couldn't figure out why!

    So I guess I'm wondering why the decision was made to drop the config information when the plugin is deactivated. Otherwise, I absolutely love it.

    Cheers,
    Dalton

  2. Donncha O Caoimh
    Member
    Posted 11 months ago #

    Unfortunately plugin developers are supposed to (or encouraged) to clean up after themselves when a plugin is uninstalled, or deactivated. That's why the config file is removed.

    If you have any ideas for how to get around this I'm all ears, but the config file has to be deleted. The plugin could email the configuration to the blog owner but in 99% of cases that probably won't be welcome..

  3. Dalton Rooney
    Member
    Posted 11 months ago #

    Hi Donncha,
    I didn't realize you use a config file, I'm so used to plugins that write their options into a record in the database. In that case the plugin config is usually retained through deactivation and is only removed if an uninstall script is run. I'm curious, how do you preserve the plugin state between auto-upgrades?

    Now that I know it's a config file, I'll just keep a backup copy and restore it if I ever need to deactivate the plugin again. An export/import config option would be nice, but probably not critical.

    Thanks!
    Dalton

  4. Ron Rennick
    MultiSite Guru
    Posted 11 months ago #

    I'm curious, how do you preserve the plugin state between auto-upgrades?

    The config file is not removed for/during an upgrade.

Reply

You must log in to post.

About this Plugin

About this Topic