Title: Setting in Sql possible ?
Last modified: September 25, 2021

---

# Setting in Sql possible ?

 *  [treecutter](https://wordpress.org/support/users/treecutter/)
 * (@treecutter)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/setting-in-sql-possible/)
 * Hello
 * Not sure if this is more of a feature request….
 * Right now the plugin creates files/folders in the WP file system that appears
   to contain a file containing the Cache Enabler Settings.
 * …./wp-content/settings/cache-enabler/www.mywebsite.com.php
 * The created file says:
    ‘mirroring the plugin settings saved in the database….’
 * Can this behaviour be disabled ? i.e. rely simply on SQL to store the settings.
 * Logic being that rather loose file permissions are required for the plugin to
   operate in this mode, and relying just on SQL would enable more secure file/folder
   permissions.
 * Thanks very much
    -  This topic was modified 4 years, 8 months ago by [treecutter](https://wordpress.org/support/users/treecutter/).

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

 *  Anonymous User 16850768
 * (@anonymized-16850768)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/setting-in-sql-possible/#post-14913818)
 * On the top of my head that would not be possible without some big changes to 
   Cache Enabler. The reason the settings file is used is due to what’s available
   by default when the `advanced-cache.php` file is included by WordPress (which
   is included if the `WP_CACHE` constant is defined as a truthy value). This is
   an early part of the load cycle that allows caching plugins like Cache Enabler
   to do things before other parts of WordPress have been loaded. In our case it’s
   maybe delivering a cached page or starting our output buffer to maybe cache a
   page.
 * For example, the [`get_option()`](https://developer.wordpress.org/reference/functions/get_option/)
   function is not available in this part of the load cycle when trying to deliver
   cached pages, which is why they are pulled from that settings file instead. While
   the settings from the database could be used to generate a cached page as that
   comes later in the load cycle, the settings file value is used to create and 
   deliver cached pages with the same source.
    -  This reply was modified 4 years, 8 months ago by Anonymous User 16850768.
      Reason: clarification
 *  Thread Starter [treecutter](https://wordpress.org/support/users/treecutter/)
 * (@treecutter)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/setting-in-sql-possible/#post-14953949)
 * Hell Cory
    Thanks for your support, excellent as always. The plugin will throw
   the below error unless permissions are very loose:
 * _Cache Enabler requires write permissions 755 in the /var/www/html/website/wp-
   content/settings directory. _
 * This is highly undesirable, it would be far safer to check for the presence and
   write permission on advanced-cache.php ONLY and not the entire wp-content folder!
 * This is how other plugins such as for example Hyper cache work
 * What do you think ?
 * Thanks again for this brilliant plugin
    -  This reply was modified 4 years, 7 months ago by [treecutter](https://wordpress.org/support/users/treecutter/).
    -  This reply was modified 4 years, 7 months ago by [treecutter](https://wordpress.org/support/users/treecutter/).
    -  This reply was modified 4 years, 7 months ago by [treecutter](https://wordpress.org/support/users/treecutter/).
 *  Anonymous User 16850768
 * (@anonymized-16850768)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/setting-in-sql-possible/#post-14959706)
 * You’re most welcome, [@treecutter](https://wordpress.org/support/users/treecutter/).
   🙂 I really appreciate knowing you’re happy with the plugin. As of version 1.8.7,
   that warning will be displayed if the `/path/to/wp-content/cache` or `/path/to/
   wp-content/settings` directory exists and is not writable. Are you experiencing
   different behavior?
 * Checking if the directories above are writable is not related to the `wp-content/
   advanced-cache.php` drop-in file that Cache Enabler automatically creates. Cache
   Enabler will only be able to create that `advanced-cache.php` drop-in file if
   the `wp-content` directory is writable.
 * The overall requirements handling process will eventually be improved, so I do
   expect this to change in the future. I’m unsure how much will change, but I do
   believe more time and focus does need to be put into that part of the plugin.
   I haven’t fully gotten to that part since I started working on the plugin.

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

The topic ‘Setting in Sql possible ?’ is closed to new replies.

 * ![](https://ps.w.org/cache-enabler/assets/icon.svg?rev=2442383)
 * [Cache Enabler](https://wordpress.org/plugins/cache-enabler/)
 * [Support Threads](https://wordpress.org/support/plugin/cache-enabler/)
 * [Active Topics](https://wordpress.org/support/plugin/cache-enabler/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/cache-enabler/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/cache-enabler/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: Anonymous User 16850768
 * Last activity: [4 years, 7 months ago](https://wordpress.org/support/topic/setting-in-sql-possible/#post-14959706)
 * Status: not resolved