Every Joomla Upgrade Now Cleans Up After Itself

A Joomla core upgrade leaves three things behind: the fluff files, which are the README.txt, LICENSE.txt, htaccess.txt, sample images and similar files Joomla includes that a live site never needs, a cache built by the version you just replaced, and a tmp folder holding update leftovers. Tidying them is a small job on one site and a tedious one across a few hundred.
mySites.guru can now do that tidying straight after every Joomla core upgrade it runs, on one Joomla site or on every one you manage. It works the same from Mass Upgrade Sites and from a single site’s Core Upgrade pane. A long-time customer asked for a one-click backup, update and clean-up, including the temp folder and the cache. You asked, we built it, and the backup half is the bonus section at the end.
What Gets Cleaned After a Joomla Upgrade
Two switches decide what happens, and each Joomla site has its own pair. One removes the fluff files. The other empties the two default cache folders and the tmp folder.
| What | What happens | What stays |
|---|---|---|
| Fluff files | Deleted: README.txt, LICENSE.txt, htaccess.txt, web.config.txt and the like | Every file the site runs on |
administrator/cache and cache | Both default cache folders are emptied | Their index.html and .htaccess stub files |
tmp | Everything in the site root's tmp folder is deleted | A fresh tmp/index.html, written afterwards |
The fluff files are the same ones the Remove unneeded Joomla core fluff tool deletes: README.txt, LICENSE.txt, htaccess.txt, web.config.txt, configuration.php-dist, build and test config files, and Joomla’s sample data images. Removing them has no effect on how the site works. A core upgrade puts them back, so the time to remove them is straight after it.
After a successful upgrade, the work runs in a fixed order.
Fluff files. The fluff files are deleted.
Only if Clean up after core upgrades is on.
Administrator cache. The administrator/cache folder is emptied.
Only if Clear cache and tmp after core upgrades is on, as with the next two steps.
Site cache. The cache folder is emptied.
tmp. The tmp folder in the site's root is emptied.
Snapshot. mySites.guru takes a fresh snapshot of the site.
Each step runs on its own: if one fails, the others still run, the upgrade still counts as a success and the snapshot is still taken.
The clean-up only follows an upgrade that mySites.guru runs. If you upgrade from inside Joomla’s own administrator, or leave it to Joomla’s automated core updates, the upgrade happens outside mySites.guru and nothing is cleaned afterwards.
Why Empty the Cache and tmp Folders After a Joomla Upgrade?
The cache was written by the version you just replaced. Empty it and Joomla rebuilds it on the next visits.
The tmp folder is where old update packages pile up. A stale package sitting there is one cause of the file checksum failed error, so clearing tmp after each upgrade removes the leftovers before the next upgrade trips over them.
If you have moved a site’s tmp folder outside the web root, the clean-up still only empties the tmp folder inside the site’s root, and the relocated one stays as it is.
Hacked Files in the Joomla Cache Stay Where They Are
Malware really does hide in Joomla cache folders: the Smart Slider 3 Pro supply-chain backdoor planted files named cf_check.php in /cache. A tool that empties the cache after every upgrade would delete a file like that too. That destroys the only copy of the malware and clears the site’s hacked status without fixing anything, so the clean-up leaves a cache folder alone when:
- the last mySites.guru audit flagged hacked files inside it
- that count could not be checked
- the folder’s path does not resolve to a folder inside the site
In each case, clean the site first. The tmp folder has no hacked-file check.
Switch It On for One Joomla Site
Open Manage Site for a Joomla site, go to the Config tab and find the Checks and alerts card. The two switches are near the bottom of it: Clean up after core upgrades, and Clear cache and tmp after core upgrades. Both are off by default, so nothing changes on a site until you choose it.

The switches are independent. You can remove the fluff files and leave the cache alone, or the other way round.
Switch It On for Every Joomla Site at Once
A switch per site is fine for a handful of sites. With hundreds, turning it on site by site is one click per site, and upgrading many sites at a time is routine work for an agency. So the Config tab of every Joomla site has a row under the two switches called Every Joomla site, with a Turn on for all sites button. You can see it at the bottom of the screenshot above.

The button opens a dialog with the same two switches, Remove the fluff files and Clear the cache and tmp folders, and both start off. Tick what you want and press Turn on. Each ticked switch is turned on for every Joomla site on the account in one go, and the page reloads so the site’s own switches show their new state. Anything you leave unticked stays as it is, and Cancel changes nothing.
The dialog tells you where you stand before you decide. A switch that is already on for some of your sites says “Already on for N of M”, and one that is on everywhere is shown on and locked. It only ever turns switches on, and WordPress and Generic PHP sites are left out.
Only the account owner sees the row, and only while at least one Joomla site on the account still has either switch off. It is hidden once both are on everywhere, and on an account with a single Joomla site, where the two switches above it already do the job. Use it again after you add another batch of Joomla sites, since new sites start with both switches off.
Because each site keeps its own switches on its Config tab, turning them on for every site is a starting point and not a lock. If one client’s site needs its cache left alone, turn that switch off there later.
Does WordPress Get the Same Clean-Up?
No. The switches and the Turn on for all sites button are Joomla only, and mySites.guru has no equivalent clean-up step after a WordPress core upgrade.
WordPress is covered by the backup half
Both backup options in the next section work for WordPress core upgrades as well as Joomla ones.
Bonus: Back Up Before Every Joomla or WordPress Upgrade
The other half of that customer’s request was a backup before the upgrade. There are now two ways to get one. The first you pick each time you upgrade, and the second you switch on once.
Back up, then upgrade (pick it per run)
Back up, then upgrade is a button in the confirmation dialog of Mass Upgrade Sites and of a single site’s Core Upgrade pane. You choose it each time you upgrade; there is no setting for it.

Each site takes a fresh backup with its own backup plugin first, Akeeba Backup on Joomla or All-in-One WP Migration on WordPress, and its upgrade waits for it. If that backup fails or is cancelled, that site is not upgraded. The one-button backup post covers those plugin backups on their own.
On Joomla, Akeeba uses the backup profile set on the site’s Config tab, or profile 1 if none is set, and a database-only profile makes a database-only backup. The dialog names any ticked sites that have no backup plugin, because those upgrade without a backup.
The button only appears when at least one ticked site has a backup plugin connected. A team member also needs the Backups Manage permission as well as Core upgrades. Mass Upgrade Sites still keeps Joomla inside its current major series.
Back up before core upgrades on cPanel and DirectAdmin (switch it on once)
This one is a setting. On the Hosting Panels page (still in beta testing), open the Backups pane and switch on Back up before core upgrades for a hosting panel connection. It applies to sites matched to a cPanel or DirectAdmin account on that connection. If you have not connected a server yet, start with adding sites from WHM and cPanel or importing sites from DirectAdmin.

When it is on, a full backup of the account is taken on the server (on cPanel, into the account’s home folder) before every Joomla or WordPress core upgrade of a matched site. The upgrade waits for it, for an hour at most.
A failed server backup never holds the upgrade. If the backup would take the account over 80% of its disk quota, or it fails, the upgrade still runs and the reason shows under Recent runs on that pane and on the update queue. mySites.guru does not delete these backups, and on cPanel they count against the account’s quota, so download or delete old ones in cPanel’s File Manager. Team members can see the switch, but only the owner changes it.
Both at once
Use both and they run in this order.
Plugin backup. The site's own backup plugin takes a fresh backup.
If it fails, that site's upgrade is cancelled.
Server backup. The full account backup is taken on the server.
If it fails, the upgrade still runs.
Upgrade. The Joomla or WordPress core upgrade runs.
Clean-up. On a Joomla site, the fluff files, cache folders and tmp folder are tidied, and a fresh snapshot is taken.
Further Reading
- Purge Expired Cache - the Joomla manual on Joomla's own cache purge screen.
- Obsolete core files - Akeeba Admin Tools' documentation for removing files a Joomla update should have deleted.



