Title: Settings reset
Last modified: December 20, 2017

---

# Settings reset

 *  Resolved [Broome Arts](https://wordpress.org/support/users/broome-arts/)
 * (@broome-arts)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/settings-reset-4/)
 * I have the settings for Sucuri as I want them. However, sporadically, some of
   them change without action from me. The API key disappears, the alert recipients
   changes from the internal tech person to the primary admin account, the time 
   zone, alerts per hour and the selection of security alerts change, I would guess
   to the default. The last time this happened was about 2:00 am local time Sunday.
   I’ve fixed the settings several times, but after a few days they’re back (and
   my boss is again finding his inbox with the alerts). This started just in the
   last couple of weeks. I’ve uninstalled and reinstalled Sucuri, with no effect.
   All my plugins and themes are up to date, I can’t correlate any activity with
   the resets. Any ideas?
 * MJ
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fsettings-reset-4%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  [yorman](https://wordpress.org/support/users/yorman/)
 * (@yorman)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/settings-reset-4/#post-9798496)
 * Let’s try to answer this question taking a look at the code:
 * First of all, we need to understand how does the plugin determines the state 
   of the options in the settings page, for this we will take a look at the code
   that is executed when the security alert options are displayed in the dashboard.
   This function _“sucuriscan\_settings\_alerts\_events”_ [1] is used to render 
   the HTML of all those checkboxes, and using an iterator we go through all the
   available options and retrieve the current value from the database [2] _(actually,
   from the settings file, the plugin doesn’t stores the settings in the database)_.
 * If we take a look a the definition of this function _“SucuriScanOption::getOption()”_[
   3] the first thing that it does is to load all the data contained in the settings
   file located here [4] and checks if the requested option is contained in this
   file, if yes then the function returns that value, otherwise it returns the default
   value.
 * Considering this information, we can assume that the failure point is with the_“
   read the settings file”_ step, because according to what you are saying, the 
   plugin is randomly _“resetting”_ the settings to their default values. For some
   reason, in your web server, this file [4] is not being readable by the PHP interpreter
   at certain moment — we don’t know when yet.
 * Since this seems to be an edge case involving specific details about the structure
   of your hosting account, I cannot do much to investigate. Right now I am unable
   to reproduce the problem in my server, so I cannot provide a fix. What I suggest
   you, is to monitor the permissions and content of the settings file, something
   in your server is either removing the read access or completely deleting the 
   file, that’s why the plugin falls-back to show the default settings.
 * Let me know if you can find the reason for this, I will be happy to help if you
   provide more information so I can reproduce the issue in my server.
 * [1] [https://github.com/Sucuri/sucuri-wordpress-plugin/blob/cf06eee/src/settings-alerts.php#L386-L392](https://github.com/Sucuri/sucuri-wordpress-plugin/blob/cf06eee/src/settings-alerts.php#L386-L392)
   [
   2] [https://github.com/Sucuri/sucuri-wordpress-plugin/blob/cf06eee/src/settings-alerts.php#L483-L525](https://github.com/Sucuri/sucuri-wordpress-plugin/blob/cf06eee/src/settings-alerts.php#L483-L525)[
   3] [https://github.com/Sucuri/sucuri-wordpress-plugin/blob/cf06eee/src/option.lib.php#L229-L305](https://github.com/Sucuri/sucuri-wordpress-plugin/blob/cf06eee/src/option.lib.php#L229-L305)[
   4] `/wp-content/uploads/sucuri/sucuri-settings.php`
 *  [yorman](https://wordpress.org/support/users/yorman/)
 * (@yorman)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/settings-reset-4/#post-9979252)
 * Marking as resolved after no response from the original poster.

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

The topic ‘Settings reset’ is closed to new replies.

 * ![](https://ps.w.org/sucuri-scanner/assets/icon-256x256.png?rev=2875755)
 * [Sucuri Security - Auditing, Malware Scanner and Security Hardening](https://wordpress.org/plugins/sucuri-scanner/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/sucuri-scanner/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/sucuri-scanner/)
 * [Active Topics](https://wordpress.org/support/plugin/sucuri-scanner/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/sucuri-scanner/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/sucuri-scanner/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [yorman](https://wordpress.org/support/users/yorman/)
 * Last activity: [8 years, 1 month ago](https://wordpress.org/support/topic/settings-reset-4/#post-9979252)
 * Status: resolved