How to use Joomla! CLI
Joomla! CLI is based on the Symfony Console, and you can access it by calling the cli/joomla.php
file of your website. As stated previously, you cannot access it from your web browser. To access Joomla! CLI, you need to use a terminal and type the commands.
In this book, we will assume that you have SSH or direct access to your Joomla! installation. So, start your terminal and set it on your Joomla! root
folder.
First, we will check the PHP version in use in the terminal. It’s possible that your server uses a specific PHP version for your Joomla! website and a different one for the PHP CLI. To check our PHP version, we will type the following:
php -v
If it’s the same as the one running your website, you are good to go. If it’s not the same version, you need to check that it’s at least the lowest PHP version you can run Joomla! on.
Once we are happy with our PHP-CLI version, we can start working with Joomla! CLI. To invoke...