Skip to content

Upgrading & Uninstalling

Always take a database backup (php vendor/bin/wire db:backup) before upgrading in production.

  1. Update the package and refresh modules so ProcessWire runs ___upgrade() automatically:

    Terminal window
    composer update trk/processwire-media
    php vendor/bin/wire module:refresh
    php vendor/bin/wire media:doctor --json
  1. Remove any FieldtypeMedia fields from templates

    Open Setup > Fields, remove FieldtypeMedia fields from all templates, and delete those fields before uninstalling Media.

  2. 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.

  3. Uninstall Media

    Run via ProcessWire Console:

    Terminal window
    php vendor/bin/wire module:uninstall --name=Media

    Or open Modules > Configure > Media, expand Uninstall, check Uninstall, and click Submit.

    Media::___uninstall() removes ProcessMedia, FieldtypeMedia, InputfieldMedia, the five media-* RBAC permissions, and module-owned caches cleanly.

  4. Remove the Composer package (optional)

    Terminal window
    composer remove trk/processwire-media

Next steps