Title: advanced-cache.php file keeps getting deleted
Last modified: August 30, 2016

---

# advanced-cache.php file keeps getting deleted

 *  Resolved [jeffwidman](https://wordpress.org/support/users/jeffwidman/)
 * (@jeffwidman)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/advanced-cachephp-file-keeps-getting-deleted/)
 * I’m having the same issue described here:
 * [https://wordpress.org/support/topic/wp-contentadvanced-cachephp-getting-deleted-on-save-settings](https://wordpress.org/support/topic/wp-contentadvanced-cachephp-getting-deleted-on-save-settings)
 * When I try to save the settings, it says the advanced-cache.php is not writable.
   Permissions should be fine, but just in case:
 * touch advanced-cache.php
    chmod 640 advanced-cache.php chown php-fpm_linux_user
   advanced-cache.php
 * Return to WordPress dashboard, then click “Save changes”.
    Again, I get the “
   Advanced cache file is not writable.” ls -l Surprise, no “advanced-cache.php”
   file exists–it appears to have been deleted when I saved WP-FFPC settings. Now
   I try saving settings again, and this time it’s created. Then I click “Save settings”
   and it disappears again. I played around with this a bit, and my files aren’t
   randomly disappearing, it’s only when WP-FFPC is trying to write to the advanced-
   cache.php file that it randomly seems to disappear.

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

 *  Plugin Author [petermolnar](https://wordpress.org/support/users/cadeyrn/)
 * (@cadeyrn)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/advanced-cachephp-file-keeps-getting-deleted/#post-6208325)
 * on save, wp-ffpc first removes the advanced-cache.php file then it writes it,
   that is the root of your problem.
 * comment out from [https://github.com/petermolnar/wp-ffpc/blob/master/wp-ffpc-class.php#L992](https://github.com/petermolnar/wp-ffpc/blob/master/wp-ffpc-class.php#L992)
   to [https://github.com/petermolnar/wp-ffpc/blob/master/wp-ffpc-class.php#L997](https://github.com/petermolnar/wp-ffpc/blob/master/wp-ffpc-class.php#L997)
 *  [phil1984](https://wordpress.org/support/users/phil1984/)
 * (@phil1984)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/advanced-cachephp-file-keeps-getting-deleted/#post-6208535)
 * Is there a point to deleting the file first?
    file_put_contents will overwrite
   the file by default.
 *  Plugin Author [petermolnar](https://wordpress.org/support/users/cadeyrn/)
 * (@cadeyrn)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/advanced-cachephp-file-keeps-getting-deleted/#post-6208567)
 * The file removal was removed from the plugin recently; this should be fixed.
 *  [larlance](https://wordpress.org/support/users/larlance/)
 * (@larlance)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/advanced-cachephp-file-keeps-getting-deleted/#post-6208593)
 * Hi Peter,
 * I am getting the same error
 * error: Advanced cache file (/…/wp-content/advanced-cache.php) is not writeable!
   
   Please change the permissions on the file.
 * Permissions on the file are: -rw-r—– 1 XXXX XXXX 0 Apr 11 07:55 advanced-cache.
   php
 * I have tried re-saving the setting but no luck
 * Any ideas?
 *  [phil1984](https://wordpress.org/support/users/phil1984/)
 * (@phil1984)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/advanced-cachephp-file-keeps-getting-deleted/#post-6208594)
 * But did you try changing the permissions so your webserver can write to that 
   file? Looks like you XXXXed out the owner and group of that file so we can’t 
   see.
 *  [larlance](https://wordpress.org/support/users/larlance/)
 * (@larlance)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/advanced-cachephp-file-keeps-getting-deleted/#post-6208595)
 * I just hid the users, full output is included
 * Permissions on the file are:
    `-rw-r----- 1 root root 0 Apr 11 07:55 advanced-
   cache.php`
 * I have given permission to the root user (I realise I probably shouldn’t be using
   this user but I understand the risks)
 *     ```
       sudo chown -R www-data:www-data /var/www
       sudo usermod -aG www-data root
       sudo chown -R 774 /var/www
       ```
   

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

The topic ‘advanced-cache.php file keeps getting deleted’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wp-ffpc_ffffff.svg)
 * [WP-FFPC](https://wordpress.org/plugins/wp-ffpc/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-ffpc/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-ffpc/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-ffpc/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-ffpc/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-ffpc/reviews/)

 * 6 replies
 * 4 participants
 * Last reply from: [larlance](https://wordpress.org/support/users/larlance/)
 * Last activity: [10 years, 1 month ago](https://wordpress.org/support/topic/advanced-cachephp-file-keeps-getting-deleted/#post-6208595)
 * Status: resolved