Title: Comments directory not existing
Last modified: September 1, 2016

---

# Comments directory not existing

 *  Resolved [designdrumm](https://wordpress.org/support/users/designdrumm/)
 * (@designdrumm)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/comments-directory-not-existing/)
 * Hello,
    I am getting these errors with your plugin.
 * > WARNING: wp-content/plugins/w3-total-cache/inc/functions/file.php:82 – opendir(/
   > mywebsite.com/html/wp-content/cache/db/000000/all/): failed to open dir: No
   > such file or directory
   >  wp_set_post_lock, update_post_meta, update_metadata,
   > W3_Db->update, W3_DbCache->update, W3_DbCache->_flush_cache_group, W3_Cache_File-
   > >flush, w3_emptydir, w3_rmdir, opendir
 * > WARNING: wp-content/plugins/w3-total-cache/inc/functions/file.php:82 – opendir(/
   > mywebsite.com/html/wp-content/cache/db/000000/options_comments/): failed to
   > open dir: No such file or directory
   >  wp_set_post_lock, update_post_meta, update_metadata,
   > W3_Db->update, W3_DbCache->update, W3_DbCache->_flush_cache_group, W3_Cache_File-
   > >flush, w3_emptydir, w3_rmdir, opener
 * > WARNING: wp-content/plugins/w3-total-cache/inc/functions/file.php:82 – opendir(/
   > mywebsite.com/html/wp-content/cache/db/000000/options/): failed to open dir:
   > No such file or directory
   >  wp_set_post_lock, update_post_meta, update_metadata,
   > W3_Db->update, W3_DbCache->update, W3_DbCache->_flush_cache_group, W3_Cache_File-
   > >flush, w3_emptydir, w3_rmdir, opener
 * > WARNING: wp-content/plugins/w3-total-cache/inc/functions/file.php:82 – opendir(/
   > mywebsite.com/html/wp-content/cache/db/000000/comments/): failed to open dir:
   > No such file or directory
   >  wp_set_post_lock, update_post_meta, update_metadata,
   > W3_Db->update, W3_DbCache->update, W3_DbCache->_flush_cache_group, W3_Cache_File-
   > >flush, w3_emptydir, w3_rmdir, opendir
 * I have created the directories myself and they just get deleted. I think from
   the deleting the cache files. Not sure what to do. Please advise. Thanks.
 * Best,
    Karl
 * [https://wordpress.org/plugins/w3-total-cache/](https://wordpress.org/plugins/w3-total-cache/)

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

 *  [muchmuch11](https://wordpress.org/support/users/muchmuch11/)
 * (@muchmuch11)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/comments-directory-not-existing/#post-7700431)
 * I have read here multiple times, db cache no longer works. Last real update of
   this plugin been months or year ago, the code for db cache seems already obsolete.
   Use page cache instead.
 *  [Kimberly](https://wordpress.org/support/users/amiga500/)
 * (@amiga500)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/comments-directory-not-existing/#post-7700468)
 * [@muchmuch11](https://wordpress.org/support/users/muchmuch11/),
 * For me db cache still works fine. But then i am using a community driven [updated version](https://github.com/szepeviktor/fix-w3tc/releases)
   of w3tc instead.
 *  [charleslf](https://wordpress.org/support/users/charleslf/)
 * (@charleslf)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/comments-directory-not-existing/#post-7700481)
 * Can you please post here your line 82 from `wp-content/plugins/w3-total-cache/
   inc/functions/file.php`?
 * The error you’re seeing is when `w3_rmdir` function is called.
    Line 82 should
   look something like this: `$dir = @opendir($path);` notice the “@” just before`
   opendir`. This is there to suppress those warning messages in case the folder
   does not exist.
 * Otherwise, you can also try adding the following just before line 82 (above `
   $dir = @opendir($path);`):
 *     ```
       if(!is_dir($path)) { return false; }
       ```
   
 *  Thread Starter [designdrumm](https://wordpress.org/support/users/designdrumm/)
 * (@designdrumm)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/comments-directory-not-existing/#post-7700491)
 * All caches work fine for me. This was a silent error I was seeing with Debug 
   Bar.
    However, this fixed the error message.
 * `if(!is_dir($path)) { return false; }`
 * Thanks!
 * Best,
    Karl
 *  [muchmuch11](https://wordpress.org/support/users/muchmuch11/)
 * (@muchmuch11)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/comments-directory-not-existing/#post-7700505)
 * [@kimberly](https://wordpress.org/support/users/kimberly/)
 * Thanks for the info, good news! Any effort to maintain this plugin is great.

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

The topic ‘Comments directory not existing’ is closed to new replies.

 * ![](https://ps.w.org/w3-total-cache/assets/icon-256x256.png?rev=1041806)
 * [W3 Total Cache](https://wordpress.org/plugins/w3-total-cache/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/w3-total-cache/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/w3-total-cache/)
 * [Active Topics](https://wordpress.org/support/plugin/w3-total-cache/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/w3-total-cache/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/w3-total-cache/reviews/)

 * 5 replies
 * 4 participants
 * Last reply from: [muchmuch11](https://wordpress.org/support/users/muchmuch11/)
 * Last activity: [9 years, 10 months ago](https://wordpress.org/support/topic/comments-directory-not-existing/#post-7700505)
 * Status: resolved