Disable "open_basedir" when using Plesk.

open_basedir is a security measure for PHP, however it can cause numerous problems with your scripts. When using Plesk you can disable it by following the below instructions:
Login via SSH to your Dedicated or Virtual Dedicated Server
Once you are logged in you will need to move to the hosting directory for the domain you need to disable open_basedir
# cd /var/www/vhost/domainname.com/conf/

Where domainname.com is your domain. 
The conf directory holds configuration files apache configuration information for your domain name, do not alter any existing files within this directory.
For our change to take affect we need to create a new file called vhost.conf, this can be done with the following command:
touch vhost.conf

Note: Before doing this check you are in the correct directory by running "pwd", it will return the current directory you are in which should be "/var/www/vhost/domainname.com/conf/"
Once the new file has been created we need to edit it:
# vi vhost.conf
Now we are editing the file you will need to insert the following:

<Directory /var/www/vhosts/domainname.com/httpdocs>php_admin_value open_basedir none</Directory>
Where domainname.com is your domain name. 
Save the file and then run the following command to make the change live:

# /usr/local/psa/admin/sbin/websrvmng -v -a
Open_basedir should now be disabled for your domain name. 


  • Plesk
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

How to retrieve the Plesk admin password

You can retrieve your Plesk admin password by logging on to the server via SSH and running one of...

Enable Passive FTP Plesk

This guide explains how to enable passive FTP transfer mode on servers with Plesk.Part 1 -...

How to increase upload file limit for Plesk Linux

By default, PHP limits uploaded files' size to 2 MB. This limit applies to all PHP applications...

Plesk Log in to MySQL as root admin in Linux

To log into MySQL as root user on a Plesk server, you will need to specify the username "admin"...