Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Pascal Birchler

    (@swissspidy)

    That’s… strange.

    Do you mean the .htaccess file gets emptied or just the rewrite rules get messed up? We run flush_rewrite_rules() during plugin deactivation, which is normal behaviour for such a plugin.

    Thread Starter Mark Howells-Mead

    (@markhowellsmead)

    Custom rules added by other plugins within the <IfModule mod_rewrite.c> block are deleted during deactivation of this plugin. The standard WordPress permalink rules remain.

    Plugin Author Pascal Birchler

    (@swissspidy)

    That sounds like a bug in those other plugins or perhaps in WordPress itself.

    flush_rewrite_rules() re-builds the rewrite rules and — if it’s a hard flush (which is the default) — also updates the .htaccess file. But: It only updates the rules inside the # BEGIN WordPress and # END WordPress markers. Other plugins shouldn’t add their rules inside this block.

    To sum up:

    1. Many plugins flush rewrite rules on plugin (de)activation, it’s the way we need to do it.
    2. Other plugins shouldn’t interfere with the core rewrite rules
    3. The problem has to be elsewhere

    I’ll mark this topic as resolved, but will open an issue about doing a soft flush on GitHub. It’s not really our fault, but we want a great new-user experience after all.

    Thread Starter Mark Howells-Mead

    (@markhowellsmead)

    The standard method – using add_rewrite_rule – inserts the defined custom rules within the # BEGIN WordPress and # END WordPress markers.

    Activating oEmbed (0.4.0-20150827) no longer adds htaccess rules. Is that correct?

    Deactivating oEmbed continues to remove all custom rules formerly added by other plugins using add_rewrite_rule.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Deactivating the plugin deletes ALL custom htaccess rewrites’ is closed to new replies.