I think W3 Total cache only needs that for database caching. So you don’t really need it.
Thanks for the quick response, Marko.
I tried disabling database caching in W3TC and it no longer overwrites the file but unfortunately it now removes the file completely without replacing it. Anything else I might try?
Can’t you still install the db.php from this plugin through the API?
Yes, I can install it without any problem but unfortunately it doesn’t stay there – the file is periodically removed.
I can’t really do something about that. It’s something you need to discuss with Frederick Townes the developer of W3TC.
If you have “database cache” enabled in W3TC, please disable it. This should prevent the file from being written. As I understand, the functionality is also superseded by the object cache, so you shouldn’t notice a difference in performance.
Thanks Kurt, I did disable the database cache in W3TC and it does indeed prevent the file from being written. However, even with this function disabled, any file named db.php that is present in the wp-content folder is removed.
Confirmed – W3TC is overwriting db.php when database caching is enabled and deleting db.php when database caching is disabled. I found a solution that seems to work, here:
http://wordpress.org/support/topic/newest-versions-of-w3tc-force-delete-dbphp?replies=4