Download the PHP package eikona-media/akeneo-purge-media-files without Composer
On this page you can find all versions of the php package eikona-media/akeneo-purge-media-files. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download eikona-media/akeneo-purge-media-files
More information about eikona-media/akeneo-purge-media-files
Files in eikona-media/akeneo-purge-media-files
Package akeneo-purge-media-files
Short Description Purge media files
License MIT
Informations about the package akeneo-purge-media-files
Akeneo Purge Media Files Bundle
IMPORTANT: Do not use this bundle in the Akeneo PIM Enterprise Edition (why?)
This bundle comes with a new command to remove unused media files.
Requirements
Version | Akeneo PIM Community Edition | Akeneo PIM Enterprise Edition |
---|---|---|
2.* | 3.0.* | Do not use |
1.* | 2.3.* | Do not use |
Installation
Enable the bundle in the app/AppKernel.php
file in the registerProjectBundles()
method:
Usage
To remove unused media files execute the command eikona-media:media:purge-files
.
The command has one option: --force
. If you omit the option the command runs in safe mode (no files will be deleted).
The command searches for media files in the catalog storage directory (Akeneo parameter: catalog_storage_dir
) for files, which:
- do not have an entry in
akeneo_file_storage_file_info
- do have an entry in
akeneo_file_storage_file_info
but are not used in any product or product model (in this case the command also removes the entity)
Why not to use in the Akeneo PIM Enterprise Edition
- The Akeneo PIM Enterprise Edition has the asset management (so we probably dont want to delete unsued files)
- The Akeneo PIM Enterprise Edition has proposals (which the command does not search through)
- The Akeneo PIM Enterprise Edition can restore old product versions (which the command does not search through)