If I delete plugins via FTP are settings kept in DB?

When I delete plugins via ftp (meaning all its files recursively) does WordPress remove its settings from the database?

I want to delete all plugins on one of my websites and reinstall them, since I suspect it to be infected with a virus. However, I want the plugins options to be kept if possible.

4 Answers
4

Deleting the plugins’ files (as opposed to deleting via deactivate and delete) will not affect settings. The plugin’s deactivation/deletion code (if any, not all have that) might clear out the plugin’s options. But most plugins will keep the options in case you want to reinstall things.

So, deleting via FTP, will not affect the plugins’ options.

But if you think that you have an infected site, there is more to do than just deleting and reinstalling plugin files (via FTP or whatever), although that is certainly a good start.

A proper cleanup process will reinstall/update everything (WP core, plugins, themes). And manually looking for files that shouldn’t belong. I’ve created a process I use (there are many similar info to be found via the googles). I’ve used it to successfully clean infected sites. It takes a bit of work, but a cleanup can be done. My process is here: https://securitydawg.com/recovering-from-a-hacked-wordpress-site/ .

You have to make sure that you ‘look’ everywhere. And change credentials everywhere. And use strong passwords. Not just reinstalling plugin files.

Leave a Comment