Support » Fixing WordPress » Why does WP access the WP parent dir during installation?

  • I am running a Nginx, PHP-FPM based server instance.
    I have open_basedir restrictions in place which allow access to everything below /var/www/clientXX/web/

    During install, if I configure the wp-config.php file on my own, I can install WP without issues and everything runs just fine.

    However, if I let wp-admin/install.php create the wp-config.php, nginx will throw a 500 because of a open_basedir restriction.

    After some investigation I figured that the installation process want’s to access /var/www/clientXX, which it isn’t allowed to.

    If I change the php config to allow that folder, everything is back to normal. After install I can even remove access to /var/www/clientXX without effects on WP.

    However I am curious. Why does install accessing the WP parent folder? is there any possibility to prevent this? Am I missing something in my configuration?

Viewing 1 replies (of 1 total)
  • DrElch

    When you install WordPress, it looks for existing configuration files in the current folder as well as its parent folder. Many people save the wp-config.php file outside the installation. For me that works better than having it inside as I can sync the files from development site to production site with ease, without having to worry about wp-config.php getting replaced.

Viewing 1 replies (of 1 total)
  • The topic ‘Why does WP access the WP parent dir during installation?’ is closed to new replies.