Cleaners

Extreme clean can clean many things through a growing suite of cleaner plugins.

Extreme clean can be run in "Check Only" or "Actually Clean" modes. In "Check Only" mode, the cleaner is run but nothing is actually cleaned. If you are unsure of the potential consequences of a cleaner, run it in "Check Only" first to see what could happen.

The current cleanup plugins provided with Extreme Clean are detailed below.

Need something cleaned up that is not already supported? Let me know and I may be able to add a new cleaner for you!

[ Extreme Clean ]

Extreme Clean Cleaner plugins

The site cleanups provided by Extreme Clean can be extended through Cleaner Plugiuns.

Functionality can be extended by adding plugin classes for additional Cleaners. Cleaner plugins are simple classes that provide the functionality to extend Extreme Clean with additional cleaners. They should inherit from CleanersPluginBase. Details are provided by comments in the code.

Plugins can be added by placing the plugin classes at packages/anyPackageName/src/JtF/ExtremeClean/Cleaners/Plugins/PluginName or application/src/JtF/ExtremeClean/Cleaners/Plugins/PluginName. Plugins can also be similarly placed beneath the plugin type's namespace declared in a package controller's AutoloaderRegistries.

[ Extreme Clean ]

Broken File Cleaner

Remove broken image files.

Sometimes when an upload is interrupted the file manager can end up with image files that are broken. These files typically have zero size and are listed as 'Invalid file dimensions, please rescan this file'. This cleaner will rescan the file and, if it continues to fail, delete it.

[ Extreme Clean ]

Broken Workflow Cleaner

Clean up empty workflows.

Clean up empty and hence broken workflows. Normal use would be to clean all broken workflows. However, just in case you want to keep the latest, cleaning can be limited by age.

This cleaner currently cleans empty page workflows. Please open a support request if you have a requirement for other workflow cleaning.

There is an option to extend cleaning to all pending workflows, not just the broken workflows.

Removing all pending workflows will include those pending for pages that may actually need approving, not just those that are broken! For example, a page edit that is not yet approved. Whilst this will not break a site, you may need to subsequently find and approve pending page versions manually.

[ Extreme Clean ]

Cache Cleaner

Flush caches.

Flushes the concrete5 caches, with option to clear the thumbnails cache.

Excessive use of this cleaner could seriously degrade the performance or your site.

[ Extreme Clean ]

Clipboard Cleaner

Trim the size of the clipboard.

As blocks are added to the clipboard and the clipboard grows, loading the clipboard slows down and can eventually grind to a halt, sometimes completely jamming the Blocks/Stacks/Clipboard side panel and preventing further editing. When the clipboard is barely functioning you could go through it and clean up block by block. Or you could simply use this cleaner to trim it down to a manageable size and recover use of the dialog. This cleaner works even when the clipboard is broken!

The clipboard can be trimmed by age in days or size in blocks. When size in blocks is configured, the size is applied separetely to each user's clipboard.

[ Extreme Clean ]

Database Cleaner

Clean database tables.

Cleans up all database tables by running a MySQL optimize query. An optional available space threshold can be set below which tables will not be optimized.

From the MySQL documentation: OPTIMIZE TABLE reorganizes the physical storage of table data and associated index data, to reduce storage space and improve I/O efficiency when accessing the table. The exact changes made to each table depend on the storage engine used by that table.

Calculation of bytes recovered is an approximation. Some data types and indexes may have inherent unused space in their storage. As a consequence reported bytes recovered is not exact and optimization may never achive zero unused/available space.

This cleaner can modify all tables in a site's database, so please be sure to make a backup first.

[ Extreme Clean ]

Database Collation Fixer

Fix obsolete character sets and collations in the database.

This cleaner is experimental and may not work in all circumstances. Always run in check only before actually clean.

This cleaner attempts to fix the collation and character set for database tables that do not use the utf8mb4 character set and utf8mb4_unicode_ci collation. Table and column character sets will be changed to utf8mb4 and collations will be changed to utf8mb4_unicode_ci

This may need to be run multiple times where foreign keys are involved. Groups of tables with complex foreign key interrelationships such as Express data and oAuth may not be fixable with this cleaner.

[ Extreme Clean ]

File Version Cleaner

Remove old file versions.

Removes old file versions, beginning with the oldest and continuing to a configured number of remaining versions. The currently approved versions is never cleaned.

[ Extreme Clean ]

Fileset Cleaner

Clean empty filesets.

Identify empty filesets and delete them.

[ Extreme Clean ]

Folder Cleaner

Clean empty file folders.

Identify empty file manager folders and delete them. If empty folders are at the end of an otherwise empty path, successive cleans will remove the last (and now empty) folder in the path.

[ Extreme Clean ]

Inactive User Cleaner

Clean inactive users.

Removes users who have been inactive for more than a selected number of days, starting with the oldest users and working forwards until all users have been active within the selected period.

[ Extreme Clean ]

Incoming Files Cleaner

Clear out incoming files

Cleans up incoming files by age. Old incoming files left in the Default storage location /incoming directory are deleted.

[ Extreme Clean ]

Log Cleaner

Clean log tables.

Cleans up Logs and JobsLog tables by either length or age. Other log tables can be added by editing configuration.

When trimming by length, the first column is assumed to control the sequence. When trimming by age, the first column that is a timestamp or database date/time is assumed to control the sequence.

You can change the tables trimmed by editing the value "log_tables" in the file "/application/config/generated_overrides/jl_extreme_clean.php". Editing this setting is DANGEROUS. You could break a site irreperably by messing with the wrong tables.

[ Extreme Clean ]

Lost Files Cleaner

Clear out Lost files

Removes lost files, files that are still physically present in the Default storage location after being deleted from the file manager and are no longer referenced from the file manager.

[ Extreme Clean ]

Package Folder Cleaner

Clear out files and uninstalled packages in the packages folder

Manual install of packages can leave .zip archives, uninstalled packages and other unwanted files in the /packages directory /packages. Remove some or all of these files.

[ Extreme Clean ]

Page Drafts Cleaner

Clean up abandoned draft pages.

Cleans up page drafts by age. Drafts older than a configured age are moved to the trash. Follow this up with the Page Trash Cleaner if you need to remove old and festering trash.

[ Extreme Clean ]

Page Trash Cleaner

Clear out pages in the trash

A final deletion of pages in the trash. Pages that have been in the trash for more than a configured age are finally deleted.

[ Extreme Clean ]

Page Version Cleaner

Remove old page versions.

Removes old page versions, beginning with the oldest and continuing to a configured number of remaining versions. The currently published page and more recent un-published versions are never cleaned.

Unlike the core job, this cleaner scans through all pages on a site and all versions.

[ Extreme Clean ]

Redundant Directory Cleaner

Remove empty storage system directories

Removes empty system directories. As files are added in the File Manager's Default storage location, hashed directories such as /1234/5678/8012/ are created to hold the files. When files are removed, these directories can be left empty, taking up underlying system resources and backup space for no reason. If empty directories are at the end of an otherwise empty path, successive cleans will remove the last (and now empty) directory in the path.

[ Extreme Clean ]

Task History Cleaner

Clean up Task History.

Task history can be cleared out either completely or to a specified age.

Removing tasks that have not yet completed will include tasks in progress and tasks that have broken for any reason. Whilst this will not break a site, you may need to subsequently run a task again.

[ Extreme Clean ]

Temporary Files Cleaner

Clear out temporary files

Cleans up temporary files by age. Old temporary files in /application/files/tmp are deleted.

[ Extreme Clean ]

Unused Block Cleaner

Clear out unused blocks and templates

Cleans up /application/blocks/ for blocks that are not installed, blocks that are not used and block templates that are not used.

Always run this first in 'Check only' mode to see what blocks and templates it would delete. You can then add filters to 'Skip removal for blocks or templates matching' to make sure extreme clean will not remove blocks you want to keep, even if they are not used. 'Check only' again and repeat until you are sure that nothing you want for the future will be cleaned. Finally, select 'Actually clean' and click to 'Clean now'.

Filters can be added to ensure blocks or templates matching patterns will not be processed. One pattern per line. Patterns may contain shell wildcards * and ?. For example, */templates/my_name* will match any template starting with my_name.

Extreme Clean provides a suite of extreme cleanups to remove obsolete data.  

Cleanup your site

  • To assist with GDPR (General Data Protection Regulation) compliance.
     
  • Before taking a site from development to production. When you are intensively editing and developing a site, the history of Lorum-Ipsum and test data remains in old page versions and test users.
     
  • Improve speed. On a busy or old site accumulated edits, history and abandoned user accounts combine to slow it down.
     
  • Decrease the size of backups . As a site is used, the database grows and slows. Backups take longer because they are saving old data you no longer care about.  (but backup before you first run Extreme Clean, you don't want to clean too much!)