Hey folks at Wordfence,
Are there any updates on this? We LOVE Wordfence and Pantheon and hope you can get them working together soon.
Thanks!
8 Months and no reply? you should consider this more seriously… distributed infrastructures like Pantheon have a considerable user base I think that you folks should not discard.
This code helps define the path absolutely based on the most current directory structure; I don’t believe asking that the path be definable as a relative path is necessary:
<?php
/**
* Write to a wflog directory inside the uploads directory path.
*
* @link https://wordpress.org/support/topic/write-logs-to-the-standard-file-path/
*/
if ( ! defined( 'WFWAF_LOG_PATH' ) ) {
// Get upload directory information.
$upload_dir_info = wp_upload_dir();
if ( array_key_exists( 'basedir', $upload_dir_info ) && ! empty( $upload_dir_info['basedir'] ) ) {
$use_upload_wflog = trailingslashit( $upload_dir_info['basedir'] ) . 'wflog';
// Make sure directory defined is trailing slashed.
define( 'WFWAF_LOG_PATH', trailingslashit( $use_upload_wflog ) );
}
}
In another support thread it looks like a Wordfence support person responded about security vulnerabilities using the uploads
directory for wflogs but after re-reading it’s not clear to me if that’s a response to defining /uploads/
or a sub directory like /uploads/wflogs/
for the log path.
Support thread: Hosting on Pantheon.io wflogs no write access
The code solution above still doesn’t make the firewall functionality supportable on Pantheon, as far as I have been able to tell, because of the issues outlined in a separate support request: Set auto_prepend_file path relatively but in case someone finds this helpful I thought I would share.
@terriann Thank you so much, this will be helpful and a starting point for some customization. 🙂