About Composer
Composer is a tool for dependency management in PHP. It allows you to declare the libraries your project depends on and it will manage (install/update) them for you.
With Composer you get the following advantages:
- The dependencies required by the package you are pulling in are automatically taken care by Composer itself, leaving you free to focus on the programming instead of dependency management.
- When the package you are using gets a new version, a simple
composer update
will do everything for you, without ever needing to do any file management manually.
Look at the following URL for a more detailed list of features: https://getcomposer.org/doc/01-basic-usage.md
There are a lot more thing you can do with Composer and it’s wonderful. I highly advise that you guys use and stop wasting time on managing packages yourself.
Install concrete5
Now you can install your favorite CMS concrete5
so easily with composer. Please, follow the following steps to install it via composer
.
- Open your terminal and go to your
htdocs
directory. - Assume you already have installed
composer
globally. If you don’t, please visit here. Run the following commands-# Run the following command to create concrete5 project with latest stable version composer create-project concrete5/composer MySite # But, if you want to install with the develop branch latest, run the following one composer create-project concrete5/composer:8.x-dev MySite # Go to your project directory $ cd MySite # Use the concrete5 CLI tool to run the c5 install from the public directory $ ./concrete/bin/concrete5 c5:install -i
-
After running the above install command you’ll be asked to enter your installation credentials as the following screenshot.
- Location of database server? [Default: 127.0.0.1]: Write your database hostname here.
- Database name?: Write your database name. In my case,
MyDB
. - Database username?: Write your database user name. In my case,
root
- Database password?: Write your database user’s password.
- The system time zone, compatible with the database one? [Default: Asia/Tokyo]: It will fetch your system time zone by default. But if you want to use another one, please write that. In my case, I’m leaving as it is.
- Name of the site? [Default: concrete5 Site]: Write your site name. In my case, I’m leaving as default.
- Canonical URL?: Write your website address here. In my case, as I’m using valet and my project root is MySite. So, it should be http://MySite.dev. Please, make sure to use
http://
orhttps://
. Otherwise, you’ll get an error at the end and your effort will be completely loss. - Alternative canonical URL?: Please, write if you have. I’m leaving it blank.
- Starting point to use? [Default: elemental_blank]: Use as your requirement. I’m using
0
forelemental_full
. [From next version of concrete5 it's going to be o for elemental_blank and 1 for elemental_full] - Email of the admin user of the install? [Default: admin@example.com]: Write your admin email. I’m leaving it as default.
- Password of the admin user of the install?: Write password for admin.
- Additional user username? [Default: demo]: Write additional username. I’m leaving as default.
- Additional user email? [Default: demo@example.com]: Write additional user’s email. I’m leaving as default.
- Additional user password?: Write password for additional user.
- The default concrete5 interface language (eg en_US)? [Default: en_US]: Write your desired interface language. In my case,
en_US
. - The default site locale (eg en_US)?: Write your desired site locale. In my case,
en_US
. - Use configuration file for installation? [Default: none]: Use configuration file if you have. I’m leaving it blank.
- Would you like to install with these settings? [ y / n ]: In this step you’ll be asked for confirmation with the values you’ve entered. Write
y
if everything is ok or writen
if you don’t want to proceed. I’m usingy
.
-
Sit tight and wait for a minute. Your installation will be done.
-
Visit your site from the browser.