Learn how to disable open_basedir in DirectAdmin easily with real examples and clear steps. Quick, practical, and beginner-friendly guide. Our DirectAdmin Live Support Team is always here to help you.

How to Disable open_basedir in DirectAdmin

You’ve probably seen this warning at least once:

Warning: file_exists() [function.file-exists]: open_basedir restriction in effect.
File(/home/arunlal/public_html/wp-content/uploads/2013/08) is not within the allowed path(s):
(/home/arunlal/:/tmp:/var/tmp:/usr/local/lib/php/)
in /home/arunlal/domains/mydomain.com/public_html/wp-includes/functions.php on line 1337

That’s a mouthful, but in short, it means open_basedir is restricting PHP from accessing a directory it needs. This setting is meant to keep things secure, but it often locks down your site too much, especially if your scripts or WordPress uploads are outside the allowed paths. Let’s not overthink it. Here’s exactly how to disable open_basedir in DirectAdmin without breaking your setup.

disable open_basedir directadmin

What open_basedir Actually Does

The open_basedir directive is a PHP security feature that limits which directories your scripts can access. For example, in the warning above, PHP is only allowed to work within:

/home/arunlal/:/tmp:/var/tmp:/usr/local/lib/php/

Anything outside that list triggers an error. While this helps protect sensitive files, it can also block legitimate access to uploads or plugin files. So the solution here is to disable open_basedir DirectAdmin settings for that domain.

Disable open_basedir via Admin Panel

If you’ve got admin access in DirectAdmin, this is the simplest route.

1. Log into DirectAdmin panel as admin.

2. Under the Extra Features tab, click “PHP SafeMode Configuration.”

3. Find your domain and disable Open BaseDir for that domain.

That’s all you need here. Once saved, try reloading your website and the error should disappear.

Disable open_basedir from Domain Settings

If you don’t see the SafeMode option or prefer to adjust settings per domain, do it this way.

1. Log in to DirectAdmin:

Head to your DirectAdmin control panel using your hosting credentials.

2. Access the Domain Settings:

Look for your domain under “Domain Setup”, “Domain Administration,” or any similar option depending on your DirectAdmin version.

3. Edit PHP Configuration:

Inside your domain panel, open “PHP Options” or “PHP Configuration.”

4. Disable open_basedir:

Find the setting for open_basedir. You can disable it by unchecking it, setting it to None, or leaving it empty.

5. Save Changes:

Always hit Save before exiting, or your changes won’t stick.

7. Restart the Web Server (if necessary):

Some servers need a quick restart for updates to take effect. Inside DirectAdmin, you can usually find “Restart Apache” or something similar.

Fix Your DirectAdmin Error Now!

Chat animation


Why Disabling open_basedir Works

Once you disable open_basedir DirectAdmin restrictions, PHP can freely access files needed by WordPress or other apps. But don’t go disabling it everywhere, keep it limited to the affected domain for safety. It’s about finding that balance between security and functionality.

Conclusion

That’s all you need to do to disable open_basedir DirectAdmin. No complicated code edits, no manual PHP tweaks. Just a few clicks inside DirectAdmin and your site should be running fine again.

Keep in mind that while open_basedir is useful, sometimes it causes more trouble than it prevents, especially on WordPress installs that rely on custom paths or plugins. Disabling it carefully for specific domains usually solves the problem instantly. So next time that annoying “open_basedir restriction in effect” message pops up, you know exactly what to do.