Skip to content

Virtual Media Folders - Migrate

Migration add-on for Virtual Media Folders. Import folders and file assignments from other media folder plugins.

Screenshot 2026-04-06 at 16 17 01
PluginStorageStatus
Enhanced Media LibraryTaxonomy media_category✅ Supported
FileBirdCustom tables fbv✅ Supported
Real Media LibraryCustom tables realmedialibrary✅ Supported
HappyFilesTaxonomy happyfiles_category✅ Supported
WP Media FolderTaxonomy wpmf-category✅ Supported
Media Library AssistantTaxonomy attachment_category✅ Supported
CatFoldersCustom tables catfolders✅ Supported
  1. Download vmfa-migrate.zip
  2. Upload via Plugins → Add New → Upload Plugin
  3. Activate via WordPress Admin → Plugins

Plugin updates are handled automatically via GitHub. No need to manually download and install updates.

  1. Detection — The plugin automatically detects which supported media folder plugins have data in your database (works even if the source plugin has been deactivated).
  2. Preview — See which folders will be created and how many assignments will be migrated before committing.
  3. Migration — Folders are created as VMF taxonomy terms (vmfo_folder). Attachment assignments are batched via Action Scheduler for large libraries.
  4. Non-destructive — Source plugin data is never modified or deleted. Existing VMF folder assignments are preserved.

When a VMF folder with the same name and parent already exists:

  • Skip (default) — Reuse the existing folder.
  • Merge — Same as skip, logged for review.
  • Overwrite — Create a new folder with a deduplicated name.

Navigate to Media → Folder Settings → Migration to detect sources, preview, and start migrations.

Terminal window
# List detected migration sources
wp vmfa-migrate list-sources
# Preview what will be migrated
wp vmfa-migrate preview enhanced-media-library
# Preview as a tree
wp vmfa-migrate preview enhanced-media-library --format=tree
# Run the migration
wp vmfa-migrate run enhanced-media-library
# Dry run
wp vmfa-migrate run enhanced-media-library --dry-run
# With options
wp vmfa-migrate run filebird --batch-size=200 --conflict=merge
# Include additional taxonomies (EML / MLA only)
wp vmfa-migrate run enhanced-media-library --include-taxonomies

Enhanced Media Library and Media Library Assistant support additional taxonomies (e.g. media tags) beyond their primary folder taxonomy. When you enable Include taxonomies (UI checkbox or --include-taxonomies in WP-CLI), these are migrated as standard WordPress taxonomies on each attachment.

Virtual Media Folders does not display these taxonomies in its sidebar. They are stored so the data is not lost. You can access them with native WordPress functions.

Register the taxonomy (e.g. in your theme’s functions.php or a custom plugin):

add_action( 'init', function () {
register_taxonomy( 'media_tag', 'attachment', [
'label' => __( 'Media Tags' ),
'public' => true,
'hierarchical' => false,
'show_ui' => true,
'show_in_rest' => true,
] );
} );

Get terms for an attachment:

$terms = get_the_terms( $attachment_id, 'media_tag' );
if ( $terms && ! is_wp_error( $terms ) ) {
foreach ( $terms as $term ) {
echo esc_html( $term->name );
}
}

Query attachments by term:

$attachments = get_posts( [
'post_type' => 'attachment',
'post_status' => 'inherit',
'tax_query' => [
[
'taxonomy' => 'media_tag',
'field' => 'slug',
'terms' => 'nature',
],
],
] );

Replace media_tag with the actual taxonomy slug shown during migration (e.g. attachment_tag for Media Library Assistant).

All endpoints require manage_options capability.

MethodEndpointDescription
GET/wp-json/vmfa-migrate/v1/sourcesList detected sources
GET/wp-json/vmfa-migrate/v1/sources/{slug}/previewPreview migration
POST/wp-json/vmfa-migrate/v1/sources/{slug}/migrateStart migration
GET/wp-json/vmfa-migrate/v1/jobs/{id}Get job progress
DELETE/wp-json/vmfa-migrate/v1/jobs/{id}Cancel a job

Add custom drivers by filtering vmfa_migrate_drivers:

add_filter( 'vmfa_migrate_drivers', function( array $drivers ): array {
$drivers[] = MyCustomDriver::class;
return $drivers;
} );

Your driver must implement VmfaMigrate\Drivers\DriverInterface.

Terminal window
composer install
npm install
npm run build
composer test
npm test

GPL-2.0-or-later