Elgg is an open-source and highly customizable framework used for building an online social environment. It provides a simple and powerful user interface that helps to manage and build your content through a web browser. Elgg offers a rich set of features including messaging, microblogging, file-sharing, RSS support, access control, groups, and many more.
In this tutorial, we will show you how to install and configure Elgg social networking platform on Ubuntu 20.04.
• A fresh Ubuntu 20.04 VPS on the Atlantic.net Cloud Platform
• A valid domain name pointed to your server IP
• A root password configured on your server
Step 1 – Create Atlantic.Net Cloud Server
First, log in to your Atlantic.Net Cloud Server. Create a new server, choosing Ubuntu 20.04 as the operating system with at least 2GB RAM. Connect to your Cloud Server via SSH and log in using the credentials highlighted at the top of the page.
Once you are logged in to your Ubuntu 20.04 server, run the following command to update your base system with the latest available packages.
apt-get update -y
Step 2 – Install Apache, MariaDB and PHP
Elgg runs on Apache web server, is written in PHP, and uses MySQL/MariaDB as a database backend, so you will need to install the Apache, MariaDB, PHP and other required PHP extensions to your server. You can install all of them with the following command:
apt-get install apache2 mariadb-server php libapache2-mod-php php-common php-sqlite3 php-curl
php-intl php-mbstring php-xmlrpc php-mysql php-gd php-xml php-cli php-zip unzip wget -y
After installing all the packages, edit the php.ini file and change some recommended settings.
Change the following values:
max_execution_time = 300
memory_limit = 512M
upload_max_filesize = 100M
date.timezone = Asia/Kolkata
Save and close the file, then restart the Apache service to apply the configuration changes.
systemctl restart apache2
Step 3 – Create a Database for Elgg
Next, you will need to create a database and user for Elgg. First, log in to MySQL shell with the following command:
Once logged in, create a database and user with the following command:
CREATE DATABASE elgg;
CREATE USER 'elgg'@'localhost' IDENTIFIED BY 'secure-password';
Next, grant all the privileges to the elgg database with the following command:
GRANT ALL ON elgg.* TO 'elgg'@'localhost' IDENTIFIED BY 'secure-password' WITH GRANT
Next, flush the privileges and exit from the MariaDB shell with the following command:
At this point, the MariaDB database is created for Elgg.
Step 4 – Install Elgg
First, download the latest version of Elgg from its official website using the following command:
Once the download is completed, unzip the downloaded file with the following command:
Next, move the extracted directory to the Apache root directory:
mv elgg-3.3.13 /var/www/html/elgg
Next, create a data directory and set proper ownership and permissions to the Elgg directory:
chown -R www-data:www-data /var/www/html/elgg
chown -R www-data:www-data /var/www/html/data
chmod -R 755 /var/www/html/elgg
Once you are finished, you can proceed to the next step.
Step 5 – Configure Apache for Elgg
Next, you will need to configure Apache to serve Elgg. You can configure it by creating a new Apache virtual host configuration file:
Add the following lines:
ServerAdmin [email protected]
CustomLog /var/log/apache2/elgg-access_log common
Save and close the file, then enable the virtual host and Apache rewrite module with the following command:
Finally, restart the Apache service to apply the changes:
systemctl restart apache2
Step 6 – Access Elgg Web Interface
Now, open your web browser and access the Elgg web interface using the URL http://elgg.example.com. You should see the Elgg welcome screen:
Click on the Next button. You should see the PHP requirement check page:
Once all checks are passed, click on the Next button. You should see the database configuration page:
Provide your database information, data directory, and site URL and click on the Next button. You should see the site configuration page:
Provide your database table prefix, data directory, site URL, and timezone and click on the Next button. You should see the site creation page:
Provide your site name and email and click on the Next button. You should see the following page:
Provide your admin username, password, email and click on the Next button. You should see the following page:
Click on Go to site. You should see the Elgg login page:
Provide your admin username and password and click on the Log in button. You should see the Elgg dashboard in the following page:
In the above guide, you learned how to install and configure the Elgg social networking platform on Ubuntu 20.04. You can now deploy your own social networking platform in your internal network or live environment. Get started with Elgg today on VPS hosting from Atlantic.Net!