A git-based setup for working on the HumHub core or modules. Not for production — production installs follow the admin installation guide.
- PHP — see the admin requirements page for the supported version range
- MySQL or MariaDB
- A web server — Apache or nginx
- Git and Composer
CREATE DATABASE `humhub` CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;More on database setup: admin server-setup guide.
git clone https://github.com/humhub/humhub.gitIn the web-root (the cloned repo):
composer installThe installer is at http://localhost/humhub (or wherever you pointed your web server). The admin installation guide covers file permissions and other server-side details.
Copy .env.example to .env and adjust as needed.
For a development install:
- Keep
DEBUGmode enabled (default — Enable Debug Mode) - Disable caching under Administration → Settings → Advanced → Caching → None
- Use file-based mailing under Administration → Settings → Advanced → E-Mail
HumHub uses queued jobs for notifications, mails and other background work. In development, either configure the Instant or Sync queue, or run jobs manually:
php yii queue/runFor production-like behaviour, set up the cron worker.
By default modules are loaded from @humhub/protected/modules. Add custom paths via .env:
HUMHUB_CONFIG__PARAMS__MODULE_AUTOLOAD_PATHS=['/some/folder/modules', '/some/other-folder/modules']This is useful for keeping your own modules separate from marketplace modules, or for sharing a central module directory across multiple test installations.
Enable the Yii Debug Module for request and query profiling.
Via .env:
HUMHUB_CONFIG__BOOTSTRAP=['debug']
HUMHUB_CONFIG__MODULES__DEBUG='{"class":"yii\\\\debug\\\\Module","allowedIPs":["127.0.0.1","::1"]}'Or in protected/config/web.php:
return [
'bootstrap' => ['debug'],
'modules' => [
'debug' => [
'class' => 'yii\debug\Module',
'allowedIPs' => ['127.0.0.1', '::1'],
],
],
];For a git-based install:
git pull origin master
composer install
php yii migrate/up --includeModuleMigrations=1The HumHub Updater module does not work on git-based installations.
A git checkout won't run in production mode without building production assets. The build is also required to run acceptance tests.
See the testing guide for setting up the test environment.
The devtools module provides example components and a module skeleton generator based on Gii.