IT in Education

Joomla Command-Line Interface

joomlaUsing the Joomla CLI allows you to perform tasks without using a browser. This can speed up your processes, especially if you have multiple Joomla sites on the same server. This article will describe how to get started with the CLI.


Terminal

Using your preferred Terminal, gain access to the root of your website. Typically you will use SSH to gain remote access to your web server. If you are hosting the web server yourself, you might already have root access to the server.

Browse to where your web files are stored. For example:

cd /home/www/yourwebsite.org/public_html/

CLI folder

To access the CLI commands you will need to be in the cli folder

cd cli

From here you can run CLI commands. For example run the following command to clean the cache:

php joomla.php cache:clean

Here is a list of all CLI commands:

  • help Show the help for a command
  • list List the application's available commands
  • cache
    • cache:clean Clean cache entries
  • config
    • config:get Display the current value of a configuration option
    • config:set Set a value for a configuration option
  • core
    • core:check-updates Check for Joomla updates
    • core:update Update Joomla
  • database
    • database:export Export the database
    • database:import Import the database
  • extension
    • extension:discover Discover extensions
    • extension:discover:install Install discovered extensions
    • extension:discover:list List discovered extensions
    • extension:install Install an extension from a URL or from a path
    • extension:list List installed extensions
    • extension:remove Remove an extension
  • finder
    • finder:index Purges and rebuild the index
  • scheduler
    • scheduler:list List all scheduled tasks
    • scheduler:run Run one or more scheduled tasks
    • scheduler:state Enable, disable or trash a scheduled task
  • session
    • session:gc Perform session garbage collection
    • session:metadata:gc Perform session metadata garbage collection
  • site
    • site:down Put the site into offline mode
    • site:up Put the site into online mode
  • update
    • update:extensions:check Check for pending extension updates
    • update:joomla:remove-old-files Remove old system files
  • user
    • user:add Add a user
    • user:addtogroup Add a user to a group
    • user:delete Delete a user
    • user:list List all users
    • user:removefromgroup Remove a user from a group
    • user:reset-password Change a user's password


Thanks for visiting,
Steven