History: Console
Preview of version: 26
Console
New in Tiki11, Tiki Console is to administer your Tiki instance via the command line. It is based on Symfony's Console Component.
Copy to clipboard
php console.php
Copy to clipboard
user@server:/www/trunk$ php console.php Console Tool Usage: [options] command [arguments] Options: --help -h Display this help message. --quiet -q Do not output any message. --verbose -v|vv|vvv Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug --version -V Display this application version. --ansi Force ANSI output. --no-ansi Disable ANSI output. --no-interaction -n Do not ask any interactive question. --site Multi-Tiki instance --as-user Run the command as a different user Available commands: help Displays help for a command list Lists commands addon addon:install Apply profiles for addon addon:remove Remove objects created by addon profile creation addon:upgrade Upgrade profiles for addon to newer version backup backup:files Create a backup of Tiki instance files cache cache:clear Clear Tiki caches daily-report daily-report:send Send daily user reports database database:backup Create a database backup (with mysqldump) database:configure Database: Configure (write local.php) database:install Clean Tiki install database:redact Command not available database:update Update the database to the latest schema files files:batchupload Batch upload files into the file galleries files:deleteold Remove expired files which were uploaded using the deleteAfter option goal goal:check Reviews all active goals and assigns rewards. index index:catch-up Catch-up on incremental indexing. index:optimize Optimize the unified search index index:rebuild Fully rebuild the unified search index index:rebuild --log Fully rebuild the unified search index with log output less less:compile Compile LESS theme files into CSS mail-in mail-in:poll Read the mail-in messages mail-queue mail-queue:send Send the messages stored in the Mail Queue multitiki multitiki:list List MultiTikis in a path multitiki:move Moves a MultiTiki site from one tiki instance to another notification notification:digest Send out email notification digests profile profile:apply Apply a profile profile:baseline Generate the SQL patch to assign profile symbols for an existing installation. profile:export:init Initialize profile export for current site. profile:forget Forget a profile installation recommendation recommendation:batch Identify and send recommendations rss rss:refresh Refresh incoming RSS feeds tracker tracker:clear Clear all items from a tracker without warning or notifications. Use with care! tracker:import Import a CSV file into a tracker using a tracker tabular format
As of Tiki15 there is a console command for Batch Upload so you can set a scheduled batch upload cron task
Example command line usage
Copy to clipboard
# file according to sub-directory name and create missing galleries php console.php files:batchupload 1 --subdirToSubgal --createSubgals # file according using sub-directory with integer name into gallery with corresponding ID php console.php files:batchupload 1 --subdirToSubgal --subdirIntegerToSubgalId # set file user etc so apache can manage the files afterwards php console.php files:batchupload 1 --fileUser apache --fileGroup allusers --fileMode 0775 # upload files from a different directory php console.php files:batchupload 1 --filesPath /var/www/other/uploads # more help php console.php help files:batchupload
In Tiki16: New actions can be run in conjunction with PluginListExecute:
Copy to clipboard
php console.php list:execute "Page Name" "Action Name"
If you see this type of error message:
Copy to clipboard
[root@server]# php console.php list:execute "Batch Sync Users" "SyncUsersTrackers" Command not available at this stage. Complete required installation steps. [root@server]#
You may need to update the database schema first, with the usual:
Copy to clipboard
[root@server]# php console.php d:u
In Tiki18 LTS: New command to disable the installer:
Copy to clipboard
php console.php installer:lock
Copy to clipboard
user@server:/www/trunk$ php console.php Console Tool Usage: [options] command [arguments] Options: --help -h Display this help message. --quiet -q Do not output any message. --verbose -v|vv|vvv Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug --version -V Display this application version. --ansi Force ANSI output. --no-ansi Disable ANSI output. --no-interaction -n Do not ask any interactive question. --site Multi-Tiki instance --as-user Run the command as a different user Available commands: help Displays help for a command list Lists commands backup backup:files Create a backup of Tiki instance files cache cache:clear Clear Tiki caches daily-report daily-report:send Send daily user reports database database:backup Create a database backup (with mysqldump) database:configure Database: Configure (write local.php) database:install Clean Tiki install database:redact Command not available database:update Update the database to the latest schema goal goal:check Reviews all active goals and assigns rewards. index index:catch-up Catch-up on incremental indexing. index:optimize Optimize the unified search index index:rebuild Fully rebuild the unified search index mail-in mail-in:poll Read the mail-in messages mail-queue mail-queue:send Send the messages stored in the Mail Queue notification notification:digest Send out email notification digests profile profile:apply Apply a profile profile:baseline Generate the SQL patch to assign profile symbols for an existing installation. profile:export:init Initialize profile export for current site. profile:forget Forget a profile installation rss rss:refresh Refresh incoming RSS feeds
Copy to clipboard
user@server:/www/trunk$ php console.php Console Tool Usage: [options] command [arguments] Options: --help -h Display this help message. --quiet -q Do not output any message. --verbose -v|vv|vvv Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug --version -V Display this application version. --ansi Force ANSI output. --no-ansi Disable ANSI output. --no-interaction -n Do not ask any interactive question. --site Multi-Tiki instance Available commands: help Displays help for a command list Lists commands backup backup:files Create a backup of Tiki instance files cache cache:clear Clear Tiki caches daily-report daily-report:send Send daily user reports database database:backup Create a database backup (with mysqldump) database:configure Database: Configure (write local.php) database:install Clean Tiki install database:redact Command not available database:update Update the database to the latest schema index index:catch-up Catch-up on incremental indexing. index:optimize Optimize the unified search index index:rebuild Fully rebuild the unified search index index:rebuild --log Fully rebuild the unified search index with log output in the console mail-queue mail-queue:send Send the messages stored in the Mail Queue profile profile:apply Apply a profile profile:export:init Initialize profile export for current site. profile:forget Forget a profile installation
Getting advanced help
Clear Caches and options
All the cache
Copy to clipboard
php console.php c:c
All the cache
Copy to clipboard
php console.php c:c all
Help
Copy to clipboard
php console.php c:c help
Database cache
Copy to clipboard
php console.php c:c private
Modules cache
Copy to clipboard
php console.php c:c modules
Templates cache
Copy to clipboard
php console.php c:c templates
CSS and JS caches
Copy to clipboard
php console.php c:c public
Examples
Help on database update
Copy to clipboard
php console.php database:update --help
To mark an upgrade error as registered (so it will be ignored)
Copy to clipboard
php console.php database:update --auto-register
This is useful if you get database errors such as "Duplicate entry..." sometimes
Help on database install
Copy to clipboard
php console.php database:install --help
More advanced examples
See more advanced examples, where memory limit or execution timeout are raised, or rebuild is forced and logged, in this other page: