Extension

extension:disable

Disable a Joomla extension

Syntax

joomla extension:disable [--www WWW] [--] <site> <extension>

Arguments

site
Alphanumeric site name. Also used in the site URL with .test domain
extension
Extension name

Options

--www=<value>
Web server root
Default: /var/www

extension:enable

Enable a Joomla extension

Syntax

joomla extension:enable [--www WWW] [--] <site> <extension>

Arguments

site
Alphanumeric site name. Also used in the site URL with .test domain
extension
Extension name

Options

--www=<value>
Web server root
Default: /var/www

extension:install

Install extensions into a site using the discover method

Syntax

joomla extension:install [--www WWW] [--] <site> <extension> (<extension>)...

After copying or symlinking your extension code into the Joomla application, you can use this command to have Joomla automatically find the extension files and install it:

joomla extension:install testsite com_foobar

The extension argument should match the element name (com_foobar) as defined in your extension XML manifest.

For more information about Joomla’s discover method, refer to the official documentation: https://docs.joomla.org/Help34:Extensions_Extension_Manager_Discover

Alternatively simply pass in the Composer packages you would like to install: provide these in the format (vendor/package:[commit   [operator version])

Arguments

site
Alphanumeric site name. Also used in the site URL with .test domain
extension
A list of extensions to install to the site using discover install. Use 'all' to install all discovered extensions.

Options

--www=<value>
Web server root
Default: /var/www

extension:installfile

Install packaged extensions for file or directory into a site

Syntax

joomla extension:installfile [--www WWW] [--] <site> <extension> (<extension>)...

You can install extensions using their installation packages using this command:

joomla extension:installfile testsite /home/vagrant/com_component.v1.x.zip /home/vagrant/plg_plugin.v2.x.tar.gz

This will install both the com_component.v1.x.zip and plg_plugin.v2.x.tar.gz packages. You can also point to the directory where the extracted package can be found.

Arguments

site
Alphanumeric site name. Also used in the site URL with .test domain
extension
A list of full paths to extension packages (file or directory) to install

Options

--www=<value>
Web server root
Default: /var/www

extension:register

Register an extension with the #__extensions table.

Syntax

joomla extension:register [--www WWW] [--folder FOLDER] [--enabled [ENABLED]] [--client_id CLIENT_ID] [--element ELEMENT] [--position POSITION] [--] <site> <extension> [<type>]

You can register your extension in the extensions table without the need for a complete install package containing a valid XML manifest file.

joomla extension:register testsite com_foobar

The type of extension that gets registered is based on the first 4 characters of the extension argument you pass in. Example:

  • com_ => component
  • mod_ => module
  • plg_ => plugin (the plg_ will get stripped from the element field)
  • lib_ => library
  • pkg_ => package
  • tpl_ => template (the tpl_ will get stripped from the name and element field)
  • lng_ => language

This example registers an extension of the ‘plugin’ type:

joomla extension:register testsite plg_foobar

You can use naming without the type prefixes by adding a type argument to the end of the command:

joomla extension:register testsite foobar package

In all cases, if the type is not specified or recognized then the default value, component, will be used.

When registering a plugin type you can use the --folder option to specify the plugin group that will get registered with the record. This defaults to system. Example:

joomla extension:register testsite foobar plugin --folder=content

For a language type extension, you should use the --element option to ensure your language files can be loaded correctly:

joomla extension:register testsite spanglish language --element=en-GB

When registering a module type extension, you can use the --position option to ensure your module displays where you would like it to. A record gets added to the #_modules table:

joomla extension:register testsite mod_foobar --position=debug

Arguments

site
Alphanumeric site name. Also used in the site URL with .test domain
extension
Extension name
type
Type of extension being registered.

Options

--www=<value>
Web server root
Default: /var/www
--folder=<value>
Specifically for the Plugin typed extension, default "system"
--enabled=<value>
Enabled or not, default is "1"
Default: 1
--client_id=<value>
"0" for Site, "1" for Administrator
--element=<value>
Provide the element name for languages
--position=<value>
Provide the position the module should appear

Symlink projects into a site

Syntax

joomla extension:symlink [--www WWW] [--projects-dir PROJECTS-DIR] [--] <site> <symlink> (<symlink>)...

This command will symlink the directories from the --projects-dir directory into the given site. This is ideal for testing your custom extensions while you are working on them. Your source code should resemble the Joomla directory structure for symlinking to work well. For example, the directory structure of your component should look like this:

  • administrator/components/com_foobar
  • components/com_foobar
  • media/com_foobar

To symlink com_foobar into your tesite:

joomla extension:symlink testsite com_foobar

You can now use the extension:register or extension:install commands to make your component available to Joomla.

Note that you can use the site:create command to both create a new site and symlink your projects into it using the --symlink flag.

Arguments

site
Alphanumeric site name. Also used in the site URL with .test domain
symlink
A list of directories to symlink from projects directory. Use 'all' to symlink every directory.

Options

--www=<value>
Web server root
Default: /var/www
--projects-dir=<value>
Directory where your custom projects reside
Default: /home/vagrant/Projects

extension:uninstall

Uninstall un-protected extensions from a site

Syntax

joomla extension:uninstall [--www WWW] [--] <site> <extensions> (<extensions>)...

Arguments

site
Alphanumeric site name. Also used in the site URL with .test domain
extensions
The 3rd party extensions to uninstall from the site

Options

--www=<value>
Web server root
Default: /var/www

Need Help?

Let our developers personally assist you. You can ask development related questions in our Support Center. Only for Business or Agency subscribers.