Why You Can’t Install an Extension on Joomla

We regularly have clients coming to us and telling us that they are unable to install an extension on their Joomla website. An extension, as most of you would probably know, is any plugin, module, or component. So imagine if you are about to install a simple plugin to display the current temperature on your website and you are greeted with a message such as “could not create directory” or “warning! failed to move file” – in other words, Joomla was unable to install your plugin. What would you do?

According to our experience, here are the reasons why you’re not able to install an extension on your Joomla website:

Unable to write to the /tmp directory

In PHP (which is the programming language that Joomla is written with), usually when you upload a file (unless you change the php.ini file), it is uploaded to the /tmp directory. Now if Apache can’t upload to this directory (due to permission problems) then your extension won’t be uploaded, and thus won’t be installed. The solution to this is to create the /tmp folder and ensure that Apache and your account both have write permissions on this folder.

Zip library not installed on PHP

All the Joomla extensions are zipped when they are in the installable format. At one point, when you are installing an extension, Joomla needs to unzip it in order to move it to the appropriate folder(s). If the zip library is not installed, then Joomla won’t be able to install the extension. The solution to this problem is to contact your system administrator to install the zip library on PHP (note that Apache needs to be restarted once the zip library is installed).

No directory permissions

Once a file is uploaded to the /tmp directory and after it’s unzipped, Joomla then moves the unzipped directory(ies) to one or more folders (for example, a extension can consist of a module and a component, so Joomla will move one folder to the modules directory under the root of your website, and another one to the components1 directory, also located under the root of your website). If your user cannot write to one or more of the following directories: plugins, modules, components then the install will most likely fail (we’re saying most likely because it may be possible that you’re able to write to the plugins directory and your extension is just a plugin). The solution to this problem is to give the appropriate permissions to these directories.

Note that it’s not advisable at all to install a Joomla extension manually, in other words, unzipping it manually and placing the unzipped folders into the corresponding directories, this is because the installation package contains a file which has all the information about the plugin, and that file is loaded into the Joomla database when you install the extension the normal way. Anyway, in most cases, doing the process manually will result in a broken extension (e.g. the extension won’t work), unless you do the database updates manually.

If you are still having problems installing an extension, then please contact us, we’ll only charge you for 1 hour, and our rates are very reasonable.

1 Note that most extensions install their directories under the root of your website (such as components) and under the administrator’s folder (such as administrator/components)

2 Responses to “Why You Can’t Install an Extension on Joomla”
  1. Comment by Luís Talora — July 24, 2012 @ 9:45 am

    I’ve installed Joomla on the directory used by Apache by default on CentOS: /var/www/html. In my case, doing the following was enough to allow me to install a package (at least it allowed me to install Brazilian Portuguese language pack):

    cd /var/www/html
    chown apache:root tmp
    chown apache:root language
    chown apache:root tmp
    chown apache:root administrator/language
    chown apache:root administrator/manifests/packages

    That was it. Hope it helps.

    Regards,

    Luís Talora

  2. Comment by Pedro — September 5, 2012 @ 7:41 am

    Or in UBUNTU:

    chown www-data:root tmp
    chown www-data:root language
    chown www-data:root tmp
    chown www-data:root administrator/language
    chown www-data:root administrator/manifests/packages

Leave a comment