-
Notifications
You must be signed in to change notification settings - Fork 34
PHP Shell
The shell
folder lets you add custom aliases and functions to your php containers.
Any file with the .sh
extension will be sourced into your php container whenever you bash/sh into it.
This is useful for when you need to run complex commands often during development, such as initialising tests.
By default, there is a totara-aliases.sh
file that has a few helpers to get you started. They are:
-
install
- installs a fresh instance of Totara -
upgrade
- upgrades an existing site -
cron
- runs cron -
purge
- purges the site caches -
installunit
- initialises PHPUnit -
unit
- runs PHPUnit -
installbehat
- runs a helper script for installing Behat -
behat
- runs a helper script for running Behat -
createcourse
- creates a course -
createuser
- create user(s)
Feel free to add your own .sh
/.bash
files into the shell
directory.
Note that the aliases listed above must be run inside the PHP docker containers at the root of your Totara site directory.
For the PHP containers, the Oh My Zsh extention is used on top of zsh.
Note that you will need to set your terminal's font to use one of the fonts from this repo in order for some icons to correctly display.
Oh My Zsh is highly configurable - see shell/.zshrc
for the current configuration and check out the ohmyzsh and powerline10k docs for more ideas on what is possible.
Copyright (c) 2025 Totara Learning Solutions Limited