WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I wish to deactivate my plugin, but WITHOUT using update_option() or any other core WP function. What's the best way to go about this? Direct DB connection and modification?

share|improve this question
up vote 0 down vote accepted

The simplest way is probably renaming the plugin file or folder.

But if you're trying to handle it directly from the database, you'd have to grab the 'active_plugins' value from the wp_options table, unserialize it, remove your plugin from the array and reserialize it and update. You don't necessarily have to use update_option.

You could also look into a command line tool like WP-CLI. With that installed, deactivating a plugin is a simple command from the BASH shell, like wp plugin deactivate plugin-name.

share|improve this answer
Oh yeah I didn't specify... looking to do this programmatically from within the plugin itself. So yeah direct table manipulation is probably the best way to go, just wanted to make sure. Thanks! – Jonathan van Clute Nov 6 '11 at 17:09

You could log into the UI and deactivate it there. Assuming you are looking for a programmatic solution, if you don't want to use any WordPress functions, your only option would be to use a direct connection to query your db.

share|improve this answer

Without knowing the context in which you're attempting to do this, it's hard to provide a lot of help. But you can deactivate a plugin via FTP by renaming the plugin's directory. WordPress will automatically deactivate it the next time it tries to load.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.