Installation of Elgg

(Note: Elgg requires installing an instance of MySQL.)

Steps to make adjustment and disposal of trial installations easier.


At this point, we assume you've set up your MySQL database

  1. Start your mysqld server daemon.
    (For the sake of this example, we'll assume we're running on port 9999; you shouldn't actually use this port because only one daemon can run on any port number.)
  2. Login to the server as root user, using the mysql client.
  3. Create a database to store Elgg's tables. We'll call the database elggalpha.
    mysql> create database elggalpha;
  4. Grant access to a user — for this example we'll call him/her elggalphauser.
    mysql> grant all privileges on elggalpha.* to 'elggalphauser'@'moxie'
        -> identified by 'secretpassword';


  1. Type umask 022
  2. Change into your public_html directory (aka folder).
    cd public_html
  3. make a directory called elgg
    mkdir elgg
  4. Change into the elgg subdirectory of public_html.
    cd elgg
  5. download elgg into this directory
  6. you'll end up with a file named
    (It's not literally X.X.X.X, it might be, for example.)
  7. unzip elgg
    unzip -q
  8. you'll end up with a directory (folder) named
  9. make a symbolic link (aka shortcut) to this
    ln -s elgg-X.X.X.X alpha
    (For example, ln -s elgg- alpha)
  10. Give user nobody access to this directory
    /usr/misc/bin/ -r -u nobody elgg-
  11. create a data directory for elgg (get into your home directory first):
    mkdir -p elgg/alpha/data
    chmod -R 755 elgg/alpha/data
  12. Change into the elgg/alpha directory.
    cd elgg/alpha
  13. Give user nobody access to this subdirectory data
    /usr/misc/bin/ -u nobody data
  14. In your browser, navigate to your elgg installation
    You'll have a screen which includes this message:
    Installing Elgg has 6 simple steps and reading this welcome is the first one!
    If you haven't already, read through the installation instructions included with Elgg (or click the instructions link at the bottom of the page).
    If you are ready to proceed, click the Next button.
  15. Follow configuration process:
    • The first screen probably will contain a success message in green and a failure message in pink:
      Requirements check
      Your server failed the requirements check. After you have fixed the below issues, refresh this
      page. Check the troubleshooting links at the bottom of this page if you need further assistance.
      Your server's PHP satisfies all of Elgg's requirements.
      Web server
      We think your server is running the Apache web server. The rewrite test failed and the most likely cause is that AllowOverride is not set to All for Elgg's directory. This prevents Apache from processing the .htaccess file which contains the rewrite rules. A less likely cause is Apache is configured with an alias for your Elgg directory and you need to set the RewriteBase in your .htaccess. There are further instructions in the .htaccess file in your Elgg directory.
      The database requirements are checked when Elgg loads its database.
    • To correct this, replace the .htaccess file that Elgg created with one that you can edit:
      cp -ip .htaccess temp-htaccess
      rm .htaccess
      mv temp-htaccess .htaccess
    • Edit the .htaccess file: Go to approximately line 101 (where it says #RewriteBase /) and add the line:
      RewriteBase /~your-user-id/elgg/alpha/
    • Be sure to save the edited file.

    • Click the Refresh button.

    • If this hasn't fixed things, seek professional help.

    • Click the Next button.

    • Fill in the parameters appropriate to your MySQL installation.
      Database installation
      If you haven't already created a database for Elgg, do that now. Then fill in the values below to
      initialize the Elgg database.
      Database Username
      User that has full priviledges to the MySQL database that you created for Elgg Database Password
      Password for the above database user account Database Name
      Name of the Elgg database Database Host
      Hostname of the MySQL server (usually localhost) ‡You might need to use for the host if you haven't set up MySQL as we've done. Database Table Prefix
      The prefix given to all of Elgg's tables (usually elgg_)

    • Continue filling in forms as requested.
      Configure site
      Database has been installed.
      We need some information about the site as we configure Elgg. If you haven't created a data directory for Elgg, you need to do so now. Site Name
      My Elgg Site version Alpha
      The name of your new Elgg site Site Email Address
      Email address used by Elgg for communication with users Site URL
      The address of the site (Elgg usually guesses this correctly) Elgg Install Directory
      The directory where you put the Elgg code (Elgg usually guesses this correctly) Data Directory
      The directory that you created for Elgg to save files (the permissions on this directory are checked when you click Next) Default Site Access
      The default access level for new user created content
    • Create admin account
      Site settings have been saved.
      It is now time to create an administrator's account. Display Name
      The name that is displayed on the site for this account Email Address
      Account username used for logging in Password
      Account password must be at least 6 characters long Password Again
      Retype password to confirm