Loading...
 
Skip to main content

History: Console

Preview of version: 45

Console

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
[root@ html]# php console.php Tiki Console Tool Usage: command [options] [arguments] Options: -h, --help Display this help message -q, --quiet Do not output any message -V, --version Display this application version --ansi Force ANSI output --no-ansi Disable ANSI output -n, --no-interaction Do not ask any interactive question --site=SITE Multi-Tiki instance --as-user=AS-USER Run the command as a different Tiki user -v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug Available commands: help Displays help for a command list Lists commands patch Apply a specific database schema patch backup backup:files Create a backup of Tiki instance files cache cache:clear Clear Tiki caches cache:generate Generate 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 Unavailable: Redact database database:update Update the database to the latest schema dev dev:fixbom Fix BOM and line endings for all files faker faker:comments Generate comments fake data faker:tracker Generate tracker fake data files files:batchupload Batch upload files into the file galleries files:check Detect orphan or extra files files:copy Copy files from file galleries to a regular directory on the file system files:deleteold Remove expired files which were uploaded using the deleteAfter option files:move Move files from file galleries to a regular directory on the file system gallery gallery:migrate Migrate images from the Image Gallery to the File Gallery 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 installer installer:lock Disable the installer list list:execute Performs Plugin ListExecute command on a particular page 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 objects objects:notify-maintainers Send out email notification to maintainers for objects whose freshness is greater than the limit ocr ocr:all Unavailable: OCR all queued files ocr:file Unavailable: Attempt to OCR a file. Defaults to queued OCR job ocr:set Unavailable: Set the OCR status of files (Queue, Skip) ocr:status Unavailable: Give statistics on file OCR status (Queued, Processing, Finished, Skipped) package package:clearcache Deletes all content from Composer's cache directories. package:disable Disable a Tiki Package package:enable Enable a Tiki Package package:install Install package package:list List installed/available to install packages package:remove Remove package package:update Update package plugin plugin:approve Approve a list of plugin invocations/calls plugin:list List all plugin invocations/calls plugin:refresh Parses all the pages to refresh the list of plugin invocations/calls preferences preferences:delete Delete a preference preferences:export Export preferences preferences:get Get a preference preferences:rebuild-index Fully rebuild the preferences index preferences:set Set a preference 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:clear Clear incoming RSS feed cache rss:refresh Refresh incoming RSS feeds scheduler scheduler:heal Heal scheduled tasks scheduler:run Run scheduled tasks scss scss:compile Compile SCSS theme files into CSS sitemap sitemap:generate Generate sitemap theme theme:install Install a new theme theme:remove Remove a theme theme:update Update a theme tiki tiki:info Displays the Tiki and/or PHP version tiki:stats Display a table with the KPIs tracker tracker:clear Clear all items from a tracker without warning or notifications. Use with care! tracker:export Export a CSV file from a tracker using a tracker tabular format tracker:import Import a CSV file into a tracker using a tracker tabular format translation translation:englishupdate Fix English strings after modifying them. translation:getstrings Update language.php files with new strings users users:list Display the list of users in the system users:password Set the password to a given user vcs vcs:automerge Semi Auto Merge vcs:fixids Fix the Id's of SVN Keyword for all files vcs:update Update SVN to latest version & perform tasks for a smooth update.

Copy to clipboard
user@server:/www/tiki18$ php console.php Console Tool Usage: command [options] [arguments] Options: -h, --help Display this help message -q, --quiet Do not output any message -V, --version Display this application version --ansi Force ANSI output --no-ansi Disable ANSI output -n, --no-interaction Do not ask any interactive question --site=SITE Multi-Tiki instance --as-user=AS-USER Run the command as a different user -v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug Available commands: help Displays help for a command list Lists commands patch Apply a specific database schema patch 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 faker faker:tracker Generate tracker fake data files files:batchupload Batch upload files into the file galleries files:check Detect orphan or extra files files:copy Copy files from file galleries to a regular directory on the file system files:deleteold Remove expired files which were uploaded using the deleteAfter option files:move Move files from file galleries to a regular directory on the file system gallery gallery:migrate Migrate images from the Image Gallery to the File Gallery 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 installer installer:lock Disable the installer less less:compile Compile LESS theme files into CSS list list:execute Performs Plugin ListExecute command on a particular page 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 plugin plugin:approve Approve a list of plugin invocations/calls plugin:list List all plugin invocations/calls plugin:refresh Parses all the pages to refresh the list of plugin invocations/calls preferences preferences:delete Delete a preference preferences:get Get a preference preferences:rebuild-index Fully rebuild the preferences index preferences:set Set a preference 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:clear Clear incoming RSS feed cache rss:refresh Refresh incoming RSS feeds scheduler scheduler:heal Heal scheduled tasks scheduler:run Run scheduled tasks sitemap sitemap:generate Generate sitemap 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 users users:list Display the list of users in the system users:password Set the password to a given user


Copy to clipboard
user@server:/www/tiki15$ 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

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



Examples

Below are some common examples of how to use the console. They are typically for a recent version (so if they don't work, it could be that your Tiki is too old)

Batch Upload

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

Plugin List Execute

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

Wiki Plugin Approval

Copy to clipboard
plugin:approve plugin:list plugin:refresh

Disable the Installer

Disable the installer:

Copy to clipboard
php console.php installer:lock

Manage files from file galleries

Copy files from a gallery to a regular directory on the filesystem:

Copy to clipboard
php console.php files:copy 1 /tmp/dest/

Move files from a gallery to a regular directory on the filesystem:

Copy to clipboard
php console.php files:move 1 /tmp/dest/ --confirm

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


Translations

Copy to clipboard
translation:englishupdate: Fix English strings after modifying them. translation:getstrings: Update language.php files with new strings


You can use the following parameters with translation:getstrings

Copy to clipboard
[-l|--lang [LANG]] [--outputfiles] [--exclude [EXCLUDE]] [--include [INCLUDE]] [--basedir [BASEDIR]] [--filename [FILENAME]]

Getting string for a single language
Copy to clipboard
php console.php translation:getstrings --lang=en


Note: The basedir parameter is working only if it point to this or another Tiki root directory (will search for /lang/...)

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

 Note
If you get Credentials file local.php not found. See http://doc.tiki.org/Installation for more information. message it means you are doing fresh install from command line and need to create the db/local.php file manually first or run the Installer via a web browser.


Getting advanced help

Console-capture-20130429113244-882-0.png

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:

alias

History

Advanced
Information Version
ibrahim mussa 57
Marc Laporte 56
ibrahim mussa Re-order documentation exemple from simple to complex 55
ibrahim mussa add tiki console tool command for tiki 24.x 54
luciash d' being 🧙 Enabling TOC 53
luciash d' being 🧙 Examples for translation command 52
Marc Laporte Adding links to source code. If you use CLI, you are likely to be interested. 51
Marc Laporte 50
Marc Laporte code Plugin modified by editor. 49
Marc Laporte 12.x and 15.x are no longer supported 48
Bernard Sfez / Tiki Specialist 47
Bernard Sfez / Tiki Specialist Added information about undocumented commands 46
Marc Laporte Refactor 45
Marc Laporte 44
Marc Laporte Removing notes about old versions 43
Marc Laporte Tiki 13 is long gone 42
Marc Laporte 41
Marc Laporte Adding 21.x 40
Bernard Sfez / Tiki Specialist Adding some documentation for translation:getstrings 39
Roberto Kirschbaum Added in 21.x: objects:notify-maintainers 38
Roberto Kirschbaum Added commands from 19.x and 20.x 37
Xavier de Pedro 36
Xavier de Pedro added section for tiki18 35
luciash d' being 🧙 rbox Plugin modified by editor. 34
luciash d' being 🧙 rbox Plugin modified by editor. 33
luciash d' being 🧙 32
luciash d' being 🧙 31
Marc Laporte 30
Roberto Kirschbaum Added two new command descriptions under the "New commands in Tiki18 LTS" heading 29
Roberto Kirschbaum 28
Roberto Kirschbaum 27
gezza 26
gezza add index rebuild with log option (again) 25
gezza add index rebuild with log output into console 24
Roberto Kirschbaum 23
Roberto Kirschbaum Added new console command for Tiki18: installer:lock 22
drsassafras fixed incorrect syntax for clearing cache 21
Xavier de Pedro Edit restored by rescue script 2017-04-24T18:09:12+00:00 20
Jonny Bradley updated 15.x commands 19
Xavier de Pedro quick copy & paste of added doc by jonnyb to Batch Upload (thanks jonny!) 18
Xavier de Pedro 17
Jonny Bradley 16
Xavier de Pedro 15
Xavier de Pedro updated to 13.x and kept 12.x as a separate tab 14
Xavier de Pedro 13
Bernard Sfez / Tiki Specialist 12
Bernard Sfez / Tiki Specialist Code Plugin modified by editor. 11
Bernard Sfez / Tiki Specialist 10
Marc Laporte 9
Marc Laporte Updating to 12.x 8
  • «
  • 1 (current)
  • 2