Make WordPress Core

Opened 20 years ago

Closed 20 years ago

Last modified 19 years ago

#1911 closed defect (bug) (worksforme)

Auto-deactivate plugin on delete

Reported by: ajay's profile Ajay Owned by:
Milestone: Priority: high
Severity: normal Version: 1.6
Component: Administration Keywords: plugins
Focuses: Cc:

Description

I don't know if this has been posted before, if it has please delete this post.

I wanted to suggest that a plugin be auto-deactivated if the file is deleted from the /wp-content/plugins folder.

This helps because if a plugin that is installed causes your site to break, you can just delete the file and the plugin is deactivated. Currently if you do this, and then reupload the plugin file it will again break your site.

I hope this makes sense.

Ajay

Change History (5)

#1 @westi
20 years ago

  • Resolution set to worksforme
  • Status changed from new to closed

From wp-admin/plugins.php:

"If something goes wrong with a plugin and you can’t use WordPress, delete or rename that file in the wp-content/plugins directory and it will be automatically deactivated."

It already does this!

Tested on revision 3161

Activated plugin, renamed to pluginname.bak checked to see it not in plugins list, renamed back to orginial plugin name and it wasn't activated

#2 @masquerade
20 years ago

  • Resolution worksforme deleted
  • Status changed from closed to reopened

This is still a valid ticket, the plugin is never really deactivated, it is just not loaded. Move the plugin file back to its original name and you will see that it is still activated.

#3 @skeltoac
20 years ago

  • Cc ryan added
  • Milestone set to 2.0
  • Priority changed from normal to high

The code appears to update the option. Could this be a caching issue?

#4 @markjaquith
20 years ago

  • Resolution set to worksforme
  • Status changed from reopened to closed

Testing procedure:

  1. activate akismet (akismet/akismet.php)
  2. rename akismet.php to deactivated.php
  3. click a random link on the admin interface (I used "Manage") to ensure the missing plugin has been noticed, and removed from the list.
  4. rename deactivated.php to akismet.php
  5. go to plugins page and note that the plugin is not active

Caching was working... I cleared the directory, and ensured that it was able to write properly.

#5 @(none)
19 years ago

  • Milestone 2.0 deleted

Milestone 2.0 deleted

Note: See TracTickets for help on using tickets.