You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|[AccessAlly WordPress LMS](https://accessally.com/)| wp-content/accessally-protected-content |`PROTECTED_CONTENT_FOLDER` variable within the plugin assumes access to `PATH`|
37
+
|[AccessAlly WordPress LMS](https://accessally.com/)| wp-content/accessally-protected-content |`PROTECTED_CONTENT_FOLDER` variable within the plugin assumes access to `PATH`|
|[WP Fastest Cache](https://wordpress.org/plugins/wp-fastest-cache/)| wp-content/cache | This plugin uses `is_dir` to verify the target directory, which will return |
62
64
|||false if the directory is a symlink. This causes a permissions error when |
63
65
||| deleting cache files. |
@@ -1000,15 +1002,19 @@ ___
1000
1002
1001
1003
## Wordfence
1002
1004
1003
-
<ReviewDatedate="2020-07-15" />
1005
+
<ReviewDatedate="2022-12-16" />
1006
+
1007
+
**Issue 1:** Wordfence can't write configuration and log files to the codebase.
1004
1008
1005
-
**Issue:**[Wordfence](https://wordpress.org/plugins/wordfence/) assumes write access to several files in the codebase to store configuation and log files.
1009
+
[Wordfence](https://wordpress.org/plugins/wordfence/) assumes write access to several files in the codebase to store configuration and log files.
1006
1010
1007
1011
**Solution:** Prepare your environment before installing Wordfence with the proper symlinks and configuration files:
This process uses [Terminus](/terminus) commands. Before we begin, set the variables `$site` and `$env` in your terminal session to match your site name and the Dev (or [Multidev](/guides/multidev)) environment:
1017
+
This process uses [Terminus](/terminus) commands. Before we begin, set the variables `SITE` and `ENV` in your terminal session to match your site name and the Dev (or [Multidev](/guides/multidev)) environment:
1012
1018
1013
1019
```bash{promptUser: user}
1014
1020
export SITE=yoursitename
@@ -1017,7 +1023,7 @@ export ENV=dev
1017
1023
1018
1024
</Alert>
1019
1025
1020
-
1. Set your Dev (or [Multidev](/guides/multidev)) environment to [Git connection mode](/guides/quickstart/connection-modes):
1026
+
1. Set your Dev (or [Multidev](/guides/multidev)) environment to [Git connection mode](/guides/quickstart/connection-modes) in the dashboard or via Terminus:
1. Open `pantheon.yml` and add a [protected web path](/guides/secure-development/private-paths) for `.user.ini`:
@@ -1092,7 +1097,7 @@ Complete this step in Dev, Test, and Live Environments.
1092
1097
exit
1093
1098
```
1094
1099
1095
-
1. Set the environment connection mode to SFTP, then install and activate Wordfence. You can do both with Terminus:
1100
+
1. Set the environment [connection mode to SFTP](/cms-admin#sftp-mode), then install and activate Wordfence. You can do both with Terminus:
1096
1101
1097
1102
```bash{outputLines: 2,4-25}
1098
1103
terminus connection:set $SITE.$ENV sftp
@@ -1120,98 +1125,104 @@ Complete this step in Dev, Test, and Live Environments.
1120
1125
1121
1126
1. Navigate to the **Wordfence** plugin in the site's WordPress Admin and **Resume Installation** if prompted, or click **CLICK HERE TO CONFIGURE**. The plugin requires that you download `.user.ini` to continue. As this file is blank at this point, you can delete it after downloading.
1122
1127
1123
-
**Issue:** Occassionally, when configuring the Web Application Firewall (WAF), it can result in an "Error connecting to the database" message, in which the Wordfence plugin generates a bad `wordfence-waf.php` file. This results in two problems:
1128
+
</Accordion>
1124
1129
1125
-
*__DIR__ is not providing the proper path for Wordfence
1126
-
* Wordfence cannot find your database credentials
1130
+
**Issue 2:** Error connecting to the database.
1127
1131
1128
-
**Solution:** To address the first problem you can modify Wordfence to use relative paths. Change the following code within `wordfence-waf.php` over SFTP
1129
-
from:
1132
+
Occassionally, when configuring the Web Application Firewall (WAF), it can result in an "Error connecting to the database" message, in which the Wordfence plugin generates a bad `wordfence-waf.php` file. This results in two problems:
1130
1133
1131
-
```
1132
-
if (file_exists(__DIR__.'/wp-content/plugins/wordfence/waf/bootstrap.php')) {
**Solution if `__DIR__` is not providing the proper path for Wordfence:** Modify Wordfence to use relative paths.
1145
1138
1146
-
Next, add [Wordfence constants](https://www.wordfence.com/help/advanced/constants/) in between conditions in the`wordfence-waf.php`file. The file should resemble the following when complete:
1139
+
1. Change the following code within`wordfence-waf.php`over SFTP from:
1147
1140
1148
-
```
1149
-
// Before removing this file, please verify the PHP ini setting `auto_prepend_file` does not point to this.
1150
-
// This file was the current value of auto_prepend_file during the Wordfence WAF installation
1141
+
```php:title=wordfence-waf.php
1142
+
if (file_exists(__DIR__.'/wp-content/plugins/wordfence/waf/bootstrap.php')) {
1. Add [Wordfence constants](https://www.wordfence.com/help/advanced/constants/) in between conditions in the `wordfence-waf.php` file. The file should resemble the following when complete:
1158
+
1159
+
```php:title=wordfence-waf.php
1160
+
// Before removing this file, please verify the PHP ini setting `auto_prepend_file` does not point to this.
1161
+
// This file was the current value of auto_prepend_file during the Wordfence WAF installation
#### Further Considerations with Wordfence: Utilizing data storage over files
1172
1183
1173
1184
If you experience degraded performance with Wordfence active, using [Wordfence's data storage option](https://www.wordfence.com/help/firewall/mysqli-storage-engine/) might be appropriate. Modify `wordfence-waf.php` to include the MySQLi storage engine constant. Combined with the constants previously mentioned, the plugin will write to your database instead of your file system. If you do this, we recommend wrapping the constants in a condition that checks `wp-config.php` for a conflicting constant. The end result of your modified `wordfence-waf.php` should resemble the following:
1174
1185
1175
-
```
1186
+
```php:title=wp-config.php
1176
1187
<?php
1177
1188
// Before removing this file, please verify the PHP ini setting `auto_prepend_file` does not point to this.
1178
1189
// This file was the current value of auto_prepend_file during the Wordfence WAF installation (Sun, 21 Nov 2021 23:40:56 +0000)
1179
1190
1180
1191
if (file_exists('/includes/prepend.php')) {
1181
-
include_once '/includes/prepend.php';
1192
+
include_once '/includes/prepend.php';
1182
1193
}
1183
1194
1184
1195
if(! defined('WFWAF_STORAGE_ENGINE')) {
1185
-
// define WF constants if not set in wp-config.php
**Advantages:** Customers have reported improved file system performance, while not having to compromise on Wordfence's features.
1213
+
**Advantages:** Customers have reported improved file system performance without having to compromise on Wordfence's features.
1203
1214
1204
1215
**Disadvantages:** Due to the nature of the plugin, binary logs and insertion queries will increase. Performance gains in one area may be sacrificed in another.
1205
1216
1206
1217
#### How do I confirm I am using data storage with Wordfence?
1207
1218
1208
-
You can confirm usage by navigating to the Wordfence menu within your WordPress dashboard. Select **Tools**, on the the Tools page click the **Diagnostic** tab. In the **Diagnostic** tab, below the **Wordfence Firewal** section, search for the "Active Storage Engine". This query will display either "File System" or "MySQLi". For this instance, choose "MySQLi". An additional table will be added called `wp_wfwafconfig` (assuming your table prefix is wp_) and queries will increase based on blocked traffic.
1219
+
You can confirm usage by navigating to the Wordfence menu within your WordPress dashboard. Select **Tools**, on the the Tools page click the **Diagnostic** tab. In the **Diagnostic** tab, below the **Wordfence Firewal** section, search for the "Active Storage Engine". This query will display either "File System" or "MySQLi". For this instance, choose "MySQLi". An additional table will be added called `wp_wfwafconfig` (assuming your table prefix is `wp_`) and queries will increase based on blocked traffic.
1209
1220
1210
1221
___
1211
1222
1212
1223
## WordPress Download Manager
1213
1224
1214
-
**Issue 1:** The [WordPress Download Manager](https://www.wpdownloadmanager.com/) plugin `wpdm-cache` directory may grow excessively large with generated files.
1225
+
**Issue:** The [WordPress Download Manager](https://www.wpdownloadmanager.com/) plugin `wpdm-cache` directory may grow excessively large with generated files.
1215
1226
1216
1227
**Solution:** We recommend that you research an alternative download manager plugin that fits your needs.
1217
1228
@@ -1468,6 +1479,7 @@ ___
1468
1479
1. Create a symlink for `wp-content/languages` pointing to `wp-content/uploads/languages`. See [Using Extensions That Assume Write Access](/symlinks-assumed-write-access) for more information.
1469
1480
1470
1481
1. Define the [FS_METHOD in the wp-config](#define-fs_method).
0 commit comments