Warning: is_writable(): open_basedir restriction in effect. File(/) is not within the allowed path(

I want to set up a URL at academy.mysite.com. I added an A record in the DNS settings, pointing academy.mysite.com to the IP address of my Multisite installation.
When adding the site and entering academy.mysite.com and some aliasses in the domain mapping settings I got this error message:

Warning: is_writable(): open_basedir restriction in effect. File(/) is not within the allowed path(s): (/srv/www/vhosts/multisitedomain.com/:disappointed:tmp/) in /srv/www/vhosts/multisitedomain.com/httpdocs/wp-admin/options-permalink.php on line 133

It sounds as if "academy" is not an allowed (or listed) part of the URL. The message disappeared after logging out and in again, and the site works. Anyhow, I wonder if something went wrong or if I need to adjust more settings (e.g. add "academy" to some list).

Thanks for your ideas on this.
Best, Wolfgang

  • Ash

    Hello @mynym

    Welcome to WPMU community!

    I hope you are well today and thanks for asking the question.

    Would you please add the following in your htaccess at the bottom:

    <DirectoryMatch "/home/sites/site81/">
        php_admin_value open_basedir "/srv/www/vhosts/multisitedomain.com/:/tmp/"
    </DirectoryMatch>

    Change the multisitedomain.com with correct name of your folder structure.

    Let us know if it works for you.

    Cheers
    Ash

  • mynym

    Thanks for clarifying.
    Now to make sure I do it right, and given my limitted technical know-how, one last question:
    If I log in to my hosting account via FTP, Wordpress is installed in a directory called "httpdocs/". The path to the wp-content directory would be e.g. /httpdocs/wp-content/.
    This is what I see, so I assume the correct path I had to add to the .htaccess file should look like this:
    <DirectoryMatch "/httpdocs/multisitedomain.com/">
    ?
    Or is the "real path" different from what I see being logged in via FTP? Maybe I had to include more details than those?
    Sorry to bother you, but I don't want to mess things up...

    And one more thing: Would the "multisitedomain.com" be the main URL of the multisite installation, or would this have to be the "academy.subsite.com" domain that caused the error message?

    By the way: After the initial error message (that disappeared without any intervention from my side), the site is online and everything works fine. At least as far as I see...

    Best
    Wolfgang

  • Ash

    Hello @mynym

    If the site is running fine, then you do not need to add anything.

    But for future reference, let me explain. Here is you error message:

    Warning: is_writable(): open_basedir restriction in effect. File(/) is not within the allowed path(s): (/srv/www/vhosts/multisitedomain.com/:disappointed:tmp/) in /srv/www/vhosts/multisitedomain.com/httpdocs/wp-admin/options-permalink.php on line 133

    (I guess multisitedomain.com is the main site domain that you changed in this thread)

    So, in your case, you need to try with two options, first go with:
    /srv/www/vhosts/multisitedomain.com/ (it should work)
    If it doesn't work, then go with:
    /srv/www/vhosts/multisitedomain.com/httpdocs/

    Of course change multisitedomain.com with your main site url. It doesn't matter if you see the error in subsite, your mainsite URL is the real URL :slight_smile:

    Cheers
    Ash

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.