Applicable to:
- Plesk for Windows
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:\inetpub\vhosts\example.com\httpdocs/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:\Windows\Temp\) in C:\inetpub\vhosts\example.com\httpdocs\wp-includes\l10n.php on line 457
Note: the website may work, but installing plugins from the WordPress admin dashboard fails with the above error.
Cause
Because of inconsistency, the absolute path to the WordPress theme localization .mo
file is concatenated with the path to the plugin directory and, as 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.
httpdocs\wp-includes\l10n.php
. -
Find
WP_PLUGIN_DIR
and replace it withbasename( dirname( __FILE__ ) )
.
For example, replace:CONFIG_TEXT: $path = . '/' . trim( $plugin\rel_path, '/' );
With:
CONFIG_TEXT: $path = basename( dirname( __FILE__ ) );
-
Save changes.
Comments
4 comments
Solved. First I have changed only open_basedir in Domain > example.com > PHP Settings. Now I I have Changed the open_basedir parameter in my .user.php also like open_basedir="none"
Now it is working fine
@Joseph Anand
Thank you for the feedback. I added notice about '
.user.ini' file to the article.
Thanks Joseph Anand! Its working!!
Please sign in to leave a comment.