Database installation: Data Directory problem


I'm having trouble getting past the data directory requirement in step 3 of the install process. I keep getting the "Your directory .../.../... does not exist." message.

I'm trying to serve it locally, working with apache on macOS Mojave. I've been able to install Wordpress so I assume it's not an issue with the database.

I want to install Elgg in /users⁩/user-name/sites/elgg. To address the 'outside root' requirements I've put the data directory at /users⁩/user-name/elgg-data.

'Elgg-data' permissions are set to 750.

I've checked the php.ini file for the open_basedir issue, which I located using phpinfo();. This is all that it says there, which I assume means that this isn't what is causing the problem?:

; open_basedir, if set, limits all file operations to the defined directory
; and below.  This directive makes most sense if used in a per-directory
; or per-virtualhost web server configuration file.
; Note: disables the realpath cache
;open_basedir =

These seem to be all of the steps that are covered in the trouble shooting guide and previous topic posts but I'm still getting the "does not exist" message.

There must be something that I've missed or misinterpreted?



    the database is created in phpadmin

    this is the mysql interface


    modify setting.php in ellg-config

  • Thanks, but modify setting.php how? Can you elaborate some more?

    At the moment my sites/elgg-config only has a readme. That readme says it will eventually hold a settings.php but only after installation, which I can't get through because of the data directory issue.

    The readme has instructions for manually copying settings.php from vendor/elgg/elgg/elgg-config/settings.example.php, but I'm still not clear on how to do that in a way that will fix the data directory issue.

    I had a previous requirements issue with the elgg-config directory but that seemed to be fixed once I changed the permissions. Is what you're saying related to that?

  • Requirements:

    STEP 1

    // Create DB
    // DB username=root password=password
    // DB must be encoding=utf8mb4

    mysql -u root -ppassword
    mysql > CREATE DATABASE elgg;
    mysql > exit;


    Use PhpMyAdmin or similat tools

    STEP 2

    // Create 2 directories
    // Use /var/www/ if this is a public server directory.
    // Otherwise, use /public_html/ or something else. Ask your hosting support about it.

    mkdir /var/www/username/www
    mkdir /var/www/username/data

    STEP 3

    // Set permissions

    chown -R username:username /var/www/username/www

    // Be sure that your server name is www-data
    // Otherwise, use apache, httpd or something else. Ask your hosting support about it.

    chown -R www-data:www-data /var/www/username/data
    chmod -R 750 /var/www/username/data

    STEP 4

    // SFTP way

    Download Elgg
    UnZip to /var/www/username/www


    // Composer way

    composer self-update
    composer create-project elgg/starter-project:dev-master /var/www/username/www
    cd /var/www/username/www
    composer install
    composer install
    vendor/bin/elgg-cli install 

    STEP 5

    Go to and run Elgg installation



    FAQs and Other Troubleshooting:

    Community discussions:

  • Forgot to add in Step 3:

    // Separatly, add these permissions for elgg-config folder:

    chown -R www-data:www-data /var/www/username/www/elgg-config
  • Thanks RvR, this helped me get it up and running.