Title: open_basedir problem
Last modified: August 18, 2016

---

# open_basedir problem

 *  Anonymous
 * [21 years, 7 months ago](https://wordpress.org/support/topic/open_basedir-problem/)
 * I uploaded and installed WP on my web account at a free web space provider. Each
   installation steps were done correctly, and the login page also came along. I
   entered admin and the generated password to get this error message:
    Warning:
   main(): open_basedir restriction in effect. File(../wp-config.php) is not within
   the allowed path(s): (.) in /disk/raid0/g/i/giros/wp-admin/index.php on line 
   3 I suppose it is because open_basedir is set to . in the PHP settings, and the
   3rd line in that index.php is require(‘../wp-config.php’); So it tries to require
   a file outside it’s own directory, but it is not possible because of the open_basedir
   restriction. Unfortunately I can’t change the open_basedir because as I mentioned
   this is a free web space provider, and I am not allowed to change the PHP settings
   on the server. Any idea about what else could I do to make WP work would be very
   appreciated.

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [adeydas4](https://wordpress.org/support/users/adeydas4/)
 * (@adeydas4)
 * [21 years, 7 months ago](https://wordpress.org/support/topic/open_basedir-problem/#post-103077)
 * Please check whether you have uploaded all the files in the right place with 
   the directory structure intact and the paths in the code are correct (if you 
   have tweaked it). My host also has open_basedir restriction in effect but WP 
   works fine.
 *  [giros](https://wordpress.org/support/users/giros/)
 * (@giros)
 * [21 years, 7 months ago](https://wordpress.org/support/topic/open_basedir-problem/#post-103082)
 * I didn’t mentioned all the error messages i get at the login step, only the first
   one, which I supposed to be the most important. These two messages also appear
   then, maybe you can say more about the problem from them:
    Warning: main(../wp-
   config.php): failed to open stream: Operation not permitted in /disk/raid0/g/
   i/giros/wp-admin/index.php on line 3 Fatal error: main(): Failed opening required‘../
   wp-config.php’ (include_path=”) in /disk/raid0/g/i/giros/wp-admin/index.php on
   line 3 I uploaded the files as they were in the installation package (except 
   I entered my database configuration). I didn’t changed the location of any file
   and didn’t entered any paths to anywhere.
 *  [adamx97](https://wordpress.org/support/users/adamx97/)
 * (@adamx97)
 * [21 years, 1 month ago](https://wordpress.org/support/topic/open_basedir-problem/#post-103358)
 * I have found thisissue with many themes. One solution is to find any php_require
   statements like this:
    <?/* php require(‘./post.php’); */ ?>
 * and replace them with this:
    <?php include (TEMPLATEPATH . ‘/post.php’); ?>

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘open_basedir problem’ is closed to new replies.

 * In: [Installing WordPress](https://wordpress.org/support/forum/installation/)
 * 3 replies
 * 4 participants
 * Last reply from: [adamx97](https://wordpress.org/support/users/adamx97/)
 * Last activity: [21 years, 1 month ago](https://wordpress.org/support/topic/open_basedir-problem/#post-103358)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
