Symptoms
-
Website on WordPress is unavailable:
PLESK_INFO: 500 Internal server error
-
Accessing this website from the server returns the following error message:
PLESK_INFO: PHP Warning: is_readable(): open_basedir restriction in effect. File(C:inetpubvhostsexample.comhttpdocs/wp-content/plugins/C:/inetpub/vhosts/example.com/httpdocs/wp-content/themes/sometheme/plugins/tf-flexslider/lang/en_US.mo) is not within the allowed path(s): (C:/inetpub/vhosts//example.com;C:WindowsTemp) in C:inetpubvhostsexample.comhttpdocswp-includesl10n.php on line 457
The website may be accessible but an attempt to install a plugin at Plesk > WordPress > example.com > Plugins fails with the same error above.
Cause
The absolute path to the WordPress theme localization .mo
file is concatenated with the path to the plugin directory and, as a result, restricted by open_basedir
PHP parameter.
Resolution
Note: the resolution contains a common suggestion on addressing such issues. The case may be different for different themes and plugins. For the exact specific solution, refer to plugin support page or contact plugin developers.
-
Access file manager in Domains > example.com > File Manager.
-
Edit the file, mentioned in the error, e.g.
httpdocswp-includesl10n.php
. -
Find
WP_PLUGIN_DIR
and replace it withbasename( dirname( __FILE__ ) )
.For example, replace:
$path = WP_PLUGIN_DIR . '/' . trim( $plugin_rel_path, '/' );
With:
$path = basename( dirname( __FILE__ ) );
-
Save changes.