Upgrading & Uninstalling
Upgrading Media
Section titled “Upgrading Media”Always take a database backup (php vendor/bin/wire db:backup) before upgrading in production.
-
Update the package and refresh modules so ProcessWire runs
___upgrade()automatically:Terminal window composer update trk/processwire-mediaphp vendor/bin/wire module:refreshphp vendor/bin/wire media:doctor --json
- Open Setup -> Upgrades (with
ProcessWireUpgrade) or navigate to Modules -> New and use Add Module from Directory (Media), Add Module from URL, or Add Module from Upload (ZIP archive) to replace the module files (ensureintervention/imageandleague/flysysteminvendor/autoload.phpmeet the new version requirements). - Click Modules -> Refresh so ProcessWire detects the new version and executes
___upgrade()automatically.
- Replace
site/modules/Media/with the new release directory (ensureintervention/imageandleague/flysysteminvendor/autoload.phpmeet the new version requirements). - Open Modules -> Refresh in the ProcessWire Admin (or run
php vendor/bin/wire module:refresh) so___upgrade()executes cleanly.
Uninstall Steps
Section titled “Uninstall Steps”-
Remove any
FieldtypeMediafields from templatesOpen Setup > Fields, remove
FieldtypeMediafields from all templates, and delete those fields before uninstallingMedia. -
Purge module-owned Private Vault assets (if applicable)
If a custom module stored private files via
uploadPrivate($owner, ...), call$this->wire()->media->purgeByOwner($owner)during that module’s uninstall routine. -
Uninstall
MediaRun via ProcessWire Console:
Terminal window php vendor/bin/wire module:uninstall --name=MediaOr open Modules > Configure > Media, expand Uninstall, check Uninstall, and click Submit.
Media::___uninstall()removesProcessMedia,FieldtypeMedia,InputfieldMedia, the fivemedia-*RBAC permissions, and module-owned caches cleanly. -
Remove the Composer package (optional)
Terminal window composer remove trk/processwire-media