Viewing 2 replies - 1 through 2 (of 2 total)
  • That is a very good question, the way the “Reset Plugins” tool works is that it takes a list of plugin names, checks if they are free (which means that they exist in the WordPress market place), then the plugin is deleted from “/wp-content/plugins/”, and finally the “Plugin_Upgrader” WordPress class [1] is instantiated to call a method named “install” which basically does what you normally do when you click the installation button in the plugins manager interface.

    As the plugins are not deactivated nor uninstalled following the normal WordPress procedure I would say that their settings will remain intact in the database because the Sucuri plugin only deletes and re-downloads the source code from the official repository, it does not touches any other part of the configuration.

    Although, if the plugin(s) that you are planning to reset have an option to export the settings then do it just in case. Every theme/plugin in the market is developed in a different way and I can not guarantee that the reset action will not break some configuration; what I can tell you is that the Sucuri plugin does not touches the database so technically speaking it is safe.

    Here is the code [2] that processes the reset action in case that you want to audit it (search for Plugin_Upgrader), as you can see it calls a custom method named “remove_directory_tree” to delete the plugin’s directory from the disk, then calls “Plugin_Upgrader(Plugin_Installer_Skin)::install” to re-download and re-install the plugin from the official repository.

    [1] https://developer.ww.wp.xz.cn/reference/classes/plugin_upgrader/
    [2] http://plugins.svn.ww.wp.xz.cn/sucuri-scanner/trunk/sucuri.php

    Thread Starter tsweder

    (@tsweder)

    Thank you!!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Does "Reset Plugins" also reset their settings?’ is closed to new replies.