Symptoms
- The server is running on the RHEL-based OS (CentOS, CloudLinux, RHEL) of version 6 with the Apache 2.2 version.
-
WP Toolkit was upgraded to the 5.8 version.
-
In an attempt to perform web reconfiguration the following error appears:
Syntax error on line 121 of /etc/httpd/conf/plesk.conf.d/vhosts/example.com.conf: RewriteOptions: unknown option 'InheritBefore'
Cause
This is the WP Toolkit bug with the ID #EXTWPTOOLK-8572, which will be fixed in the next release versions.
The InheritBefore directive is supported only in Apache starting from the 2.3.10 version and above.
Resolution
Migrate to a server with the OS that supports Apache of the 2.3.10 version.
In case migration is not an option, apply one of the workarounds below:
Workaround 1: Replace apache.php from WP Toolkit 5.7
- Log into the server via SSH.
- Download attached
apache.php
file with the command:# wget https://plesk.zendesk.com/hc/article_attachments/12387453080983/apache.php
- Rename
/usr/local/psa/admin/plib/modules/wp-toolkit/resources/webconfigs/apache.php
file:# mv /usr/local/psa/admin/plib/modules/wp-toolkit/resources/webconfigs/apache.php /usr/local/psa/admin/plib/modules/wp-toolkit/resources/webconfigs/apache.php_orig_58
- Copy downloaded
apache.php
to/usr/local/psa/admin/plib/modules/wp-toolkit/resources/webconfigs/
directory:# cp apache.php /usr/local/psa/admin/plib/modules/wp-toolkit/resources/webconfigs/apache.php
- Reconfigure affected
example.com
domain with the command:# plesk repair web example.com -y
In case it is required to reconfigure all domains on the server, execute the following:
# plesk repair web -y
Note: during the execution of this command the websites will be temporarily unavailable, it is recommended to execute in on the maintenance window.
Workaround 2: Disable Security measurements
-
Go to WordPress > Security.
- Select
example.com
instance and press the Revert button:
-
Select the following options and press the Revert button:
- Forbid execution of PHP scripts in the wp-includes directory
- Block author scan
- Enable bot protection
Note: to revert these settings for multiple WP instances, in WordPress > Security page select all required instances, press the Revert button, then perform the same actions that are described in step №4.