The two important changes needed to future-proof Joomla 4 updates

Published by Vic Drover on

Flow chart for updating your ,htaccess file. Image credit Brian Teeman.

Image credit: Brian Teeman.

Joomla 4.0.4 launched on October 26, 2021. It includes changes that make the Joomla update process more efficient, but may also break the update process. Below we will review the steps needed to fix this and future-proof Joomla 4 updates.

Why are changes needed?

Joomla 4.0.4 included a rewrite of the code responsible for updating Joomla. This change makes the update process more efficient.

But importantly, it modernizes and reduces the total amount of the code. This makes the Joomla update process more secure, more reliable and easier to maintain for Joomla developers. Full technical details are available on Github.

As a side effect of these changes, Joomla updates may not work as expected.

The instructions below will future-proof Joomla 4 updates both from Watchful and the Joomla backend.

How to future-proof Joomla 4 updates

Follow these two steps to ensure Joomla updates continue to function normally.

1. Update the Watchful Client

We recently released version 2.2.8 of the Watchful Client for Joomla. Be sure to update to this version (or greater) before attempting to update to Joomla 4.0.5 (or greater).

2. Update your .htaccess file

Many Joomla website sites contain a modified .htaccess file for stronger security. Notably, many security tools for Joomla also modify this file.

Any website containing a hardened .htaccess file will need it reviewed (and likely edited) to allow Joomla updates to proceed as normal.

This flow chart will help you determine if you need to make any changes, and which changes to make.

Flow chart for updating your ,htaccess file. Image credit Brian Teeman.
Flow chart for updating your .htaccess file. Image credit: Brian Teeman.

Full details on this process is available at joomla.org, but we’ve included them below for your convenience.

  1. For each Joomla website you manage, open the .htaccess file in a text editor and search for this code: RewriteRule ^administrator/components/com_joomlaupdate/restore.php$ - [L]
  2. If you detect the code above, replace it with the following depending on your Joomla version:
    • Joomla 2.5.1 through 4.0.3 โ€” RewriteRule ^administrator\/components\/com_joomlaupdate\/restore.php$ - [L]
    • Joomla 4.0.4 and later โ€” RewriteRule ^administrator\/components\/com_joomlaupdate\/extract.php$ - [L]

Need help?

If you’re confused about whether or not the .htaccess file on your Joomla sites needs to be updated, drop us a note and we’ll lend an assist.

Categories: News

4 Comments

Adrian · December 1, 2021 at 11:50 AM

Thanks Vic, didn’t know about this! I have one site owner who this might effect so I’ll let him know, since technically, I’m not actually maintaining it, haha.

    Vic Drover · December 1, 2021 at 11:50 AM

    Good opportunity to sell them a care plan ๐Ÿ™‚

Nathan · December 1, 2021 at 3:57 AM

What if your .htaccess does not have any mention of this ‘com_joomlaupdate’ code?

Should we add it in?

    Vic Drover · December 1, 2021 at 6:36 AM

    There is no need to modify anything if you do not find the code. Please do check that you are using a software firewall however like RS Firewall or Admin Tools.

Leave a Reply

Avatar placeholder

Your email address will not be published.