Simple and Quick Guide to Install and Manage Elgg Project
Elgg is a PHP based open-source software used for social networking in individuals and organizations. It has all the component needed to create an online social environment such as blogging, microblogging, file sharing, networking, group and number of other feature.
Let’s dive into the setup process.
Step 1. Install Composer
Step 2. Intall Elgg as a Composer Project
1 2 3 4 5 6 7 composer self-update composer global require fxp/composer-asset-plugin composer create-project elgg/starter-project:dev-master ./path/to/my/project cd ./path/to/my/project composer install ## go to your browser and install Elgg via the installation interface
Step 3. Setup version controls
1 2 3 4 5 6 cd ./path/to/my/project git init git add . git commit -a -m 'Initial commit' git remote add origin <git repository url> git push -u origin master
Step 3. Install plugins
Install plugins as composer depencies. This assumes that a plugin has been registered on https://packagist.org/
1 2 3 composer install hypejunction/hypefeed composer install hypejunction/hypeinteractions # whatever else you need
Step 4. Commit
composer.lock is not ignored in
1 2 3 git add . git commit -a -m 'Add new plugins' git push origin master
Step 5. Deploy to production
1 2 3 4 5 6 7 8 cd ./path/to/www # you can also use git clone git init git remote add origin <git repository url> git pull origin master composer install
1 2 3 4 5 cd ./path/to/www git pull origin master # never run composer update in production composer install
Working on plugin repositories during project development
It happens often that you want to make pull requests or update your plugins while you are working on a project. What I do is require plugins with –prefer-source flag.
1 2 3 4 5 6 7 composer require hypejunction/hypefeed --prefer-source # make some changes cd hypeFeed git checkout master git commit -a -m 'Changes made' git push origin master
- Image: Unsplash
- Elgg officail Guide.