Composer installation
The easiest way to keep your Elgg site up-to-date is by using Composer. Composer will take care of installing all the required dependencies of all plugins and Elgg, while also keeping those depencies up-to-date without having conflicts.
Contents
Install Composer
Install Elgg as a Composer Project
composer self-update
composer create-project elgg/starter-project:dev-master ./path/to/my/project
cd ./path/to/my/project
composer install
This will create a composer.json file based of the Elgg starter project which has the basics of installing Elgg.
Open your browser
Go to your browser and install Elgg via the installation interface
Setup version controls
This step is optional but highly recommended. It’ll allow you to easily manage the installation of the same plugin versions between environments (development/testing/production).
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
Install plugins
Install plugins as Composer depencies. This assumes that a plugin has been registered on Packagist
composer require hypejunction/hypefeed
composer require hypejunction/hypeinteractions
# whatever else you need
Commit
Make sure composer.lock
is not ignored in .gitignore
git add .
git commit -a -m 'Add new plugins'
git push origin master
Deploy to production
Initial Deploy
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
Subsequent Deploys
cd ./path/to/www
git pull origin master
# never run composer update in production
composer install