How to Install Elgg on macOS

Elgg is an open source social networking engine that allows you to create and manage your own social network. In this tutorial, we will go through the steps of installing Elgg on macOS. We assume you have basic knowledge of Terminal and LAMP stack installation.

Prerequisites

Step 1: Download the Latest Version of Elgg

Go to the Elgg website and find the latest stable release of Elgg. Click on the “Download” button and save the ZIP file to your computer.

Step 2: Extract the Elgg ZIP File

Extract the downloaded ZIP file to your web server's document root. You can rename the extracted folder to something more meaningful like elgg.

Step 3: Install the Required Dependencies

Before setting up Elgg, you need to install the required dependencies using Composer. Open Terminal and navigate to the elgg directory by running the following command:

cd /path/to/elgg

Run the following command to install the dependencies:

composer install --no-dev

Step 4: Create a MySQL Database

Open MySQL server using the MySQL client or PHPMyAdmin. Create a new database for Elgg.

Step 5: Configure Elgg

In the elgg directory, find the .htaccess-dist file and rename it to .htaccess.

Find the htaccess-sample.conf file in the docs/examples directory, make a copy of it in the same directory and rename it to .htaccess.

Edit the .htaccess file and update the following:

RewriteBase /

to

RewriteBase /elgg/

Edit the .htaccess file and update the database settings:

SetEnv ELGG_DB_NAME      your_database_name
SetEnv ELGG_DB_USER      your_database_user
SetEnv ELGG_DB_PASSWORD  your_database_password
SetEnv ELGG_DB_HOST      localhost

Step 6: Set the Correct Permissions

Set the correct permissions for the elgg directory using the following commands:

cd /path/to/elgg
sudo chown -R _www:_www ./
sudo chmod -R 775 ./engine/settings_cache/
sudo chmod -R 775 ./engine/settings.php
sudo chmod -R 775 ./cache/
sudo chmod -R 775 ./data/

Step 7: Access Elgg on Your Web Server

Finally, access Elgg on your web server by visiting http://localhost/elgg in your web browser.

Conclusion

In this tutorial, we went through the steps of installing Elgg on macOS. You should now have a working installation of Elgg on your machine.

If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!

Alternatively, for the best virtual desktop, try Shells!