Skip to content

Sterc/Sweep

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

14 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

MODX Extra by Heibel License: GPL v2

Sweep

Sweep is a MODX Extra that helps you scan for and safely remove unused files from your website. It provides a convenient way to identify which files are no longer referenced in your MODX content and clean them up directly from the interface.


πŸš€ Getting Started

  1. Navigate to Extras β†’ Sweep.
  2. Click Scan files to begin analyzing the filesystem.
  3. Go to the Directories tab and add the directories you want to scan.
    • All files in the selected directories will be checked for usage.

πŸ” File Usage Detection

Sweep checks for file usage in the following MODX fields:

Object Fields Checked
modResource content, introtext, description, properties
modChunk snippet
modTemplate content
modSnippet snippet
modPlugin plugincode
modTemplateVarResource value
cgSetting value
DigitalSignageSlides data

⚠️ Warning: If a file is used outside of these fields or objects, it may still be marked as unused. Please review files carefully before removal.


🧹 Deleting Files

You have several options for removing unused files:

  • Right-click on a file and choose Remove file.
  • Select multiple files, then right-click and remove them in bulk.
  • Use the Clean all button to remove all files marked as unused in one click.

πŸ“ Used Files Tab

The Used files tab displays all files that are currently in use on your site.

  • You can see exactly where each file is used.
  • This allows you to identify large files still in use and replace them manually with optimized versions if needed.

πŸ›‘ License

This project is licensed under the GNU GPL v2 License.


Happy sweeping! 🧼

About

MODX Unused Files Cleaner

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published