githubEdit

Development Setup

Prerequisites

  • PHP 8.2+ with extensions: intl, gd, curl, zip, mbstring, xml, json, pdo, ldap, exif, bcmath

  • Composer

  • Node.js and npm (or Yarn — the project uses Yarn 4; see package.json for the exact pinned version)

  • MySQL 5.7+ or MariaDB 10.11+

  • Git

Installation Steps

1. Clone the Repository

git clone https://github.com/chamilo/chamilo-lms.git chamilo
cd chamilo

2. Install PHP Dependencies

composer install

3. Configure Environment

The repository ships .env.dist as a reference. Create an empty .env file that the web installer will populate — keeping it empty ensures upgrades never overwrite your local configuration:

Then make .env and config/ writable by the web server so the installer can write your local configuration:

4. Install Frontend Dependencies and Build

5. Start the Development Server

Or use Apache/Nginx pointing to the public/ directory.

6. Set Up the Database

Run the web-based installation wizard by navigating to your Chamilo URL in a browser.

7. Generate JWT Keys

8. Secure your system

The .env file and config/ directory only need to be writeable for the time of the installation. Secure them afterwards:

The var/ directory needs to remain writeable by the web server.

Build Commands

Command
Purpose

yarn encore dev

Build frontend for development

yarn encore dev --watch

Build and watch for changes

yarn encore production

Build optimized for production

php bin/console cache:clear

Clear Symfony cache

Development Tips

  • Set APP_ENV=dev and APP_DEBUG=1 in .env for detailed error messages

  • The Symfony debug toolbar appears at the bottom of pages in development mode

  • API documentation is available at /api when APP_ENABLE_API_ENTRYPOINT=1

  • Use yarn encore dev --watch to automatically rebuild frontend changes

Last updated

Was this helpful?