I am trying to install extension by command.
In server already configure the PHP CLI and I'm using this code :
shell_exec('php-cli '.$SitefilePath.' --package='.$packagePath.'');
I have upload the file:
In the CLI folder and pass path as SitefilePath
into command.
but its not working.
I have checked with all option :
http://www.php-cli.com/php-cli-options.shtml
Let me know how to get this work.
All of these issues have been properly debugged in the install-joomla-extension.php script I wrote.
First, create a new plain text file and paste that code in it. Save it as install-joomla-extension.php in your Joomla! site's cli directory. The name is not important, the location (cli directory) is.
Now you can call it like this:
cd /path/to/site/cli php ./install-joomla-extension.php --package=/where/is/your/extension.zip
The script returns one of the following exit statuses:
Source: https://www.dionysopoulos.me/238-installing-joomla-extensions-from-the-command-line.html
Let me know if this works.