Upgrading Joomla: Errors, warnings and fixes

March 17, 2012 (Revised January 5, 2013)

I address here several errors and warnings I've encountered when using the Joomla update manager.

The update manager, new since version 1.6, should make upgrading Joomla a breeze:

  1. Backup your site, download the backup file and test that it's working;
  2. Log into the administrator backend of your site and go the the extension manager;
  3. Click the warnings tab and check for warnings;
  4. Click the update tab and click the purge cache button;
  5. Click the find updates button;
  6. You should see a version of Joomla listed that is newer than your current version. Check the checkbox beside it and click the update button.

In my experience, however, several error messages and warnings may arise within this process:

Small PHP file upload size
This might appear in the warnings tab of the extension manager.

To fix this, open your /public_html/administrator/php.ini file. (If there isn't one, you'll need to create one.) Add two lines to that file:

   upload_max_filesize = 20M
   post_max_size = 20M

This lets the updater accommodate large update files. 20 MB is more than enough. (A .zip of Joomla 2.5.3, the latest version, is less than 8 MB in size.)

You'll probably want to change these settings back to something smaller (e.g. 2 MB) when you've completed your upgrade/installation.

PHP Upload Size bigger than POST size
This might appear in the warnings tab of the extension manager.

To fix this, set upload_max_filesize and post_max_size to be equal, as above.

Warning: Failed to move file!
This might arise when uploading and installing updates (step 6, above).

This problem is likely to be due to your FTP user being different to your Apache/PHP user. To check this, go to your System Information page in the administrator backend of your site. Click on the Directory Permissions tab. Is every—or almost every—directory marked as unwritable? That strongly indicates that your FTP user and your Apache/PHP user are different.

Now, open up your FTP client (e.g. WinSCP or FileZilla) and look at the permissions of those unwritable directories. Do any of them have permissions set to 755? (If you've set your permissions correctly, all of your directories, with rare exceptions, should have permissions set to 755.) If yes, then you need to tell your hosting company that (1) your FTP user is different to your Apache/PHP user and (2) this is preventing the Apache/PHP user from writing to directories owned by the FTP user.

If your hosting company won't fix this, you'll need to set up your Joomla FTP layer by adding settings to your configuration.php file similar to:

   public $ftp_host = '127.0.0.1';
   public $ftp_port = '21';
   public $ftp_user = 'joedoe';
   public $ftp_pass = 'JoEdOeSfTpPaSsWoRd';
   public $ftp_root = '/public_html/';
   public $ftp_enable = '1';

That isn't a great solution, as it gives FTP access to your site to anyone who manages to read your configuration.php file. You might be better off using a different hosting company.

The PHP temporary directory is not set or
The PHP temporary directory is not writeable
This might appear in the warnings tab of the extension manager.

To fix this—having first checked that your FTP and Apache/PHP users are the same—open your /public_html/administrator/php.ini file. (If there isn't one, you'll need to create one.) Add one line to that file:

   upload_tmp_dir = /home/myname/public_html/tmp

In this case, /home/myname/public_html/tmp is the full name of your temporary directory. (To check that the directory is now writable, go to the administrator backend of your site. Open the System Information page and click the Directory Permissions tab.)

If using an Apache webhost, you may need to add:

   open_basedir = /home/myname/public_html:tmp

If using a Windows webhost, you may need to add:

   open_basedir = /home/myname/public_html;tmp

Joomla temporary directory not writable or does not exist
This might appear in the warnings tab of the extension manager.

To fix this—having first checked that your FTP and Apache/PHP users are the same—open /public_html/configuration.php and set the $tmp_path variable:

   public $tmp_path = '/home/myname/public_html/tmp';

In this case, /home/myname/public_html/tmp is the full name of your temporary directory. (To check that the directory is now writable, go to the administrator backend of your site. Open the System Information page and click the Directory Permissions tab.)

Unable to find install package
This might appear in the install tab of the extension manager.

To fix this first check that your FTP and Apache/PHP users are the same.

Next, go to the administrator backend of your site. Open the System Information page and click the Directory Permissions tab. If the temporary directory is not listed as writeable, open /public_html/configuration.php and set the $tmp_path variable:

   public $tmp_path = '/home/myname/public_html/tmp';

In this case, /home/myname/public_html/tmp is the full name of your temporary directory. And then check in the Directory Permissions tab that the temporary directory is now writeable.

The problem might also have arisen because the zip file you're trying to upload is larger than upload_max_filesize. To see if this might be the case, compare the zip file size against the value of upload_max_filesize in the PHP Information tab in the System Information.

If upload_max_filesize is too small, you'll need to temporarily increase it.

The PHP allow_url_fopen setting is disabled. This setting must be enabled for the updater to work
This might arise when finding updates (step 5, above).

To fix this, open your /public_html/administrator/php.ini file. (If there isn't one, you'll need to create one.) Add this line:

   allow_url_fopen = 1

Click the purge cache button then click the find updates button. And be sure to remove that line from the php.ini file once you've finished the update.

Update: :Collection: Could not update http://www.joomla.org/update/core/list.xml
Update: :Collection: Could not update http://www.joomla.org/update/jed/list.xml

This might arise when uploading and installing updates (step 6, above).

To fix this, open your /public_html/administrator/php.ini file. (If there isn't one, you'll need to create one.) Add this line:

   enable_functions = fopen

You should remove that line once you've finished the update.

-1 - An error has occurred. Copy failed
This might arise when uploading and installing updates (step 6, above).

To work around this—having first checked that your FTP and Apache/PHP users are the same—go back to the update tab of the extension manager. You'll see the URL of a .xml file (e.g. http://update.joomla.org/core/extension.xml) that tells the uploader where to find the Joomla core update files. Open this in a browser and look for the targetplatform tag that matches your version of Joomla (your version number is in the page footer). Look for the downloadurl tag above that line. It gives the URL of the required download.

Go to that URL and download the file. Then do the upgrade via the install tab: click the install tab within the extension manager; browse for the file you just downloaded; and click the upload & install button.

If you're using an old version of Joomla, this may not update you to the latest version: there may be intermediate steps required. For example, if you're using 1.6.2 and 2.5.3 is the latest version, you would need to upgrade to 1.7.0 and then upgrade to 2.5.3.

JInstaller: :Install: Cannot find XML setup file
Update path does not exist
JInstaller: :Install: Cannot find XML setup file
Unable to detect manifest file

This might arise when uploading and installing updates (step 6, above).

To work around this, go to your /public/tmp/ directory. You'll probably see the .zip file within it that the updater is to use. For example, if you're updating from 2.5.0 to 2.5.3 it'll be called something like Joomla_2.5.0_to_2.5.3-Stable-Patch_Package.zip. If you're seeing the above message, I suspect that the file will be of size zero. Google that file name and download the file. Or look at the .xml file that tells the uploader where to find the core Joomla update files (see above) and download the appropriate file.

Then do the upgrade via the install tab: click the install tab within the extension manager; browse for the file you just downloaded; and click the upload & install button.

If you're using an old version of Joomla, this may not update you to the latest version. There may be intermediate steps required. For example, if you're using 1.6.2 and 2.5.3 is the latest version, you would need to upgrade to 1.7.0 and then upgrade to 2.5.3.

I have also see this problem occur because upload_max_filesize is too low. Not a very informative error message! To fix this, you'll need to temporarily increase that setting.

Warning: Update Not Complete!
The update is only partially complete. Please do the second update to complete the process

This would arise after a successful install (i.e. after step 6, above) in the event that there are intermediate installs required. For example, if you're using 1.6.2 and 2.5.3 is the latest version, you would need to upgrade to 1.7.0 and then upgrade to 2.5.3.

To fix this, simply go to the update tab within the extension manager and install the next upgrade in the upgrade process.


Addendum: Determining the full name of your temporary directory

  1. Create a php file (call it findmycwd.php) containing a single line:
    <?php echo getcwd() ?>
  2. Upload that file to your /public_html/tmp/ directory.
  3. Use your browser to open that file (e.g. go to http://mysite.com/tmp/findmycwd.php).
  4. You should see a line of text similar to /home/myname/public_html/tmp. That is the full name of your temporary directory.
  5. Delete the findmycwd.php file.