Today we are releasing XenForo 2.3.0 Release Candidate 5. While the majority of this release is focusing on bug fixes and stability, there are a few noteworthy changes.
XenForo installations after upgrading to XenForo 2.3 will have a number of files sitting in the file system which are no longer used. Any XenForo installation that has been around for a while, will to a lesser extent, have a similar issue. These files on their own shouldn't present any issue, but at the same time, keeping them around doesn't make much sense either.
There are three approaches to cleaning up legacy files automatically.
One-click upgrades now have a special step for removing files that were present in the version you are upgrading from, which are no longer present in the version being installed. We already know we have write access to the files in your file system at this point so there should not be any issue in deleting these files in most cases.
After each upgrade, we also enqueue a job to do a file clean up based on a list of files enumerated from the hashes.json file. Anything in your src/vendor, src/vendor-patch and src/XF directory that is not listed in hashes.json will be removed automatically if possible. If it is not possible, we will log an error in your server error log.
If write access is an issue, you can log in to your server shell/CLI and simply run the following command:
As long as the CLI user has write access to your XenForo directory, the old files will be removed.
If all else fails, and you still wish to delete legacy files, we recommend the following approach:
- Close your forum
- Delete the contents of the following directories:
- src/vendor
- src/vendor-patch
- src/XF
- Re-upload the files from your current release
We will automatically attempt to clean up files for official add-ons as well after each upgrade. Again, if we run into write issues during the clean up process, an error log will be logged in your server error log. You can run the same command listed above (with either XFRM, XFES, or XFMG instead of XF as an argument), or follow the manual clean up steps above for the relevant add-on under src/addons.
Developers who wish to trigger an automatic clean up of their own files, can do so by calling the following from within their add-on Setup class in the postUpgrade method: