WP Migrate Lite icon
Backup & Migration

WP Migrate Lite hooks reference

  • By WP Engine
  • v2.7.12
  • Updated

WP Migrate Lite 2.7.12 has 25 actions and 123 filters, read directly from its source code on Nov 17, 2026. The list updates automatically when a new version is released.

How to use these hooks

Actions let you run your own code at a specific moment. Filters let you change a value before the plugin uses it. Put your code in a child theme's functions.php or a code-snippets plugin, never in the plugin's own files, because updates overwrite them.

functions.phpyour child theme
// Run your own code when WP Migrate Lite fires an action
add_action( 'wpmdb_post_process_table_data', function( $table, $target_table_name ) {
	// Your code runs here.
}, 10, 2 );

// Change a value WP Migrate Lite is about to use
add_filter( 'wpmdb_replace_destination_protocol', function( $value, $destination_url ) {
	// Change $value here.
	return $value;
}, 10, 2 );

Parts of a name in {braces} are filled in at runtime (for example a post type or field ID). Choose Example on any hook for a ready-to-edit snippet.

All hooks

  • class/Common/Sql/Table.php line 1873
    /**
     * Fires just after processing the data for a table.
     */
    do_action( 'wpmdb_post_process_table_data', $table, $target_table_name );
  • class/Common/Sql/Table.php line 892
    /**
     * Fires just before processing the data for a table.
     */
    do_action( 'wpmdb_pre_process_table_data', $table, $target_table_name, $temp_table_name );
  • class/Common/Replace.php line 500
    /**
     * Filters $do_protocol_replace, return false to prevent protocol replacement.
     */
    apply_filters( 'wpmdb_replace_destination_protocol', true, $destination_url );
  • class/Common/Replace.php line 456
    /**
     * Filters the site_urls used to check if there is a protocol mismatch.
     */
    apply_filters( 'wpmdb_replace_site_urls', $wpmdb_home_urls );
  • class/Common/Filesystem/Filesystem.php line 863 · used in 3 places
    do_action( 'wpmdb_migration_complete' );
  • class/Common/Sql/Table.php line 249 · used in 2 places
    apply_filters( 'wpmdb_alter_table_name', $wpdb->base_prefix . 'wpmdb_alter_statements' );
  • class/Common/Http/Http.php line 95 · used in 2 places
    apply_filters( 'wpmdb_before_response', $return );
  • class/Common/Migration/MigrationManager.php line 489 · used in 2 places
    do_action( 'wpmdb_cancellation' );
  • class/Common/Filesystem/RecursiveScanner.php line 252 · used in 2 places
    apply_filters( 'wpmdb_recursive_scan_bottleneck', self::BOTTLENECK );
  • class/Common/Migration/MigrationHelper.php line 140 · used in 2 places
    apply_filters( 'wpmdb_theoretical_transfer_bottleneck', 0 );
  • react-wp-scripts.php line 21
    apply_filters( 'reactwpscripts.is_development', $env );
  • setup-mdb.php line 56
    do_action( 'wp_migrate_db_cli_after_load' );
  • setup-mdb.php line 52
    do_action( 'wp_migrate_db_cli_before_load' );
  • wp-migrate-db.php line 56
    do_action( 'wp_migrate_db_remove_compatibility_plugin' );
  • class/Common/Queue/QueueManager.php line 62
    apply_filters( 'wp_queue_connections', $connections );
  • class/Common/Queue/Cron.php line 154
    apply_filters( 'wp_queue_cron_memory_exceeded', $return );
  • class/Common/Queue/Cron.php line 193
    apply_filters( 'wp_queue_cron_time_exceeded', $return );
  • class/Common/Queue/Cron.php line 186
    apply_filters( 'wp_queue_cron_time_limit', 20 );
  • class/Common/Sql/TableHelper.php line 138
    apply_filters( 'wpmdb_abort_utf8mb4_to_utf8', $abort_utf8mb4 );
  • class/Common/FormData/FormData.php line 173
    apply_filters( 'wpmdb_accepted_profile_fields', $this->accepted_fields );
  • class/Common/Util/Util.php line 1331
    apply_filters( "wpmdb_addon_registered_{$addon}", false );
  • class/Common/Migration/FinalizeMigration.php line 150
    do_action( 'wpmdb_after_finalize_migration' );
  • class/Common/Replace.php line 744
    apply_filters( 'wpmdb_after_replace_custom_data', $data, $before_fired, $this );
  • class/Common/Http/RemotePost.php line 150
    apply_filters( 'wpmdb_after_response', trim($response['body'], "\xef\xbb\xbf") );
  • class/Common/Plugin/PluginManagerBase.php line 272
    do_action( 'wpmdb_after_schema_update', $schema_version );
  • class/Common/Db/MDBWPDB.php line 46
    apply_filters( 'wpmdb_after_strip_invalid_text_from_query', $query, $fallback );
  • class/Common/Util/Util.php line 1420
    apply_filters( 'wpmdb_ajax_cap', $cap );
  • class/Common/Sql/Table.php line 977
    apply_filters( 'wpmdb_alter_data_queries', $alter_data_queries, $table_to_stow, $state_data['intent'], $state_data['stage'] );
  • class/Common/Sql/Table.php line 2066
    apply_filters( 'wpmdb_backup_header_included_tables', $included_tables );
  • class/Common/Sql/Table.php line 2082
    apply_filters( 'wpmdb_backup_header_is_subsite_export', 'false' );
  • class/Common/Sql/Table.php line 2034
    apply_filters( 'wpmdb_backup_header_url', Util::home_url() );
  • class/Common/Migration/FinalizeMigration.php line 174
    apply_filters( 'wpmdb_before_finalize_migration', true, $this );
  • class/Common/Http/RemotePost.php line 143
    do_action( 'wpmdb_before_remote_post' );
  • class/Common/Replace.php line 663
    apply_filters( 'wpmdb_before_replace_custom_data', array( $data, $before_fired, $successive_filter, ), $this );
  • class/Common/Plugin/PluginManagerBase.php line 231
    do_action( 'wpmdb_before_schema_update', $schema_version );
  • class/Common/Db/MDBWPDB.php line 38
    apply_filters( 'wpmdb_before_strip_invalid_text_from_query', $query );
  • class/Common/Util/Util.php line 128
    apply_filters( 'wpmdb_bottleneck', $calculated_bottleneck );
  • class/Common/Filesystem/RecursiveScanner.php line 226
    apply_filters( 'wpmdb_bottleneck_dir_scan', false );
  • class/Common/Replace.php line 786
    apply_filters( 'wpmdb_check_table_column_for_reference', $table_column_for_check );
  • class/Common/Cli/Cli.php line 641
    do_action( 'wpmdb_cli_after_finalize_migration', $this->profile, $this->migration );
  • class/Common/Cli/Cli.php line 615
    do_action( 'wpmdb_cli_before_finalize_migration', $this->profile, $this->migration );
  • class/Common/Cli/Cli.php line 365
    do_action( 'wpmdb_cli_before_initiate_migration', $this->profile );
  • class/Common/Cli/Cli.php line 516
    do_action( 'wpmdb_cli_before_migrate_tables', $this->profile, $this->migration );
  • class/Common/Cli/Cli.php line 253
    do_action( 'wpmdb_cli_before_migration', $this->post_data, $this->profile );
  • class/Common/Cli/Cli.php line 276
    do_action( 'wpmdb_cli_during_cli_migration', $this->post_data, $this->profile );
  • class/Common/Cli/Cli.php line 216
    apply_filters( 'wpmdb_cli_filter_before_cli_initiate_migration', $this->profile, $this->post_data );
  • class/Common/Cli/Cli.php line 500
    apply_filters( 'wpmdb_cli_filter_before_migrate_tables', array( 'tables' => $tables, 'stage_iterator' => $stage_iterator, ) );
  • class/Common/Cli/Cli.php line 252
    apply_filters( 'wpmdb_cli_filter_before_migration', $this->profile, $this->post_data );
  • class/Common/Cli/Cli.php line 754
    apply_filters( 'wpmdb_cli_filter_get_extra_args', $known_args );
  • class/Common/Cli/Cli.php line 966
    apply_filters( 'wpmdb_cli_filter_get_profile_data_from_args', $profile, $args, $assoc_args );
  • class/Common/Cli/Cli.php line 224
    apply_filters( 'wpmdb_cli_filter_source_tables', $this->table->get_tables(), $this->profile );
  • class/Common/Cli/Cli.php line 621
    apply_filters( 'wpmdb_cli_finalize_migration', true, $this->profile, $this->migration );
  • class/Common/Cli/Cli.php line 626
    apply_filters( 'wpmdb_cli_finalize_migration_args', $this->post_data, $this->profile, $this->migration );
  • class/Common/Cli/Cli.php line 634
    apply_filters( 'wpmdb_cli_finalize_migration_response', null, $this->post_data );
  • class/Common/Cli/Cli.php line 481
    apply_filters( 'wpmdb_cli_get_row_counts_from_table_list', $local_table_rows, $stage );
  • class/Common/Cli/Cli.php line 378
    apply_filters( 'wpmdb_cli_initiate_migration_args', $migration_args, $this->profile );
  • class/Common/Cli/Cli.php line 386
    apply_filters( 'wpmdb_cli_initiate_migration_response', $initiate_migration_response );
  • class/Common/Cli/Cli.php line 539
    apply_filters( 'wpmdb_cli_migrate_table_args', $args, $this->profile, $this->migration );
  • class/Common/Cli/Cli.php line 549
    apply_filters( 'wpmdb_cli_migrate_table_response', $migrate_table_response, $_POST, $this->profile, $this->migration );
  • class/Common/Cli/Cli.php line 135
    apply_filters( 'wpmdb_cli_profile_before_migration', $profile );
  • class/Common/Cli/Cli.php line 433
    apply_filters( 'wpmdb_cli_progress_label', $progress_label, $stage, $tables );
  • class/Common/Cli/Cli.php line 405
    apply_filters( 'wpmdb_cli_tables_to_migrate', $tables_to_migrate, $this->profile, $this->migration );
  • class/Common/Compatibility/Compatibility.php line 75
    apply_filters( 'wpmdb_compatibility_enable_theme', false );
  • class/Common/Compatibility/Compatibility.php line 294
    apply_filters( 'wpmdb_compatibility_mode_api_endpoints', [ 'initiate-migration', 'verify-connection', 'finalize-migration', 'cancel-migration', 'mf-initiate-file-migration', 'mf-get-queue-items', 'mf-transfer-files', 'tpf-initiate-file-migration', 'tpf-get-queue-items', 'tpf-transfer-files', 'prepare-upload', 'upload-file', 'import-file', ] );
  • class/Common/Compatibility/Compatibility.php line 91
    apply_filters( 'wpmdb_compatibility_plugin_whitelist', array() );
  • class/Common/Sql/TableHelper.php line 120
    apply_filters( 'wpmdb_convert_to_520', true );
  • class/Common/Sql/Table.php line 1962
    apply_filters( 'wpmdb_create_alter_table_query', $this->create_alter_table_query );
  • class/Common/Sql/Table.php line 955
    apply_filters( 'wpmdb_create_table_query', $create_table[0][1], $table_to_stow, $this->dynamic_props->target_db_version, $state_data['intent'], $state_data['stage'] );
  • wpmdb_data

    filter
    class/Common/Plugin/PluginManagerBase.php line 312
    apply_filters( 'wpmdb_data', $site_details_extended );
  • class/Common/Http/RemotePost.php line 112
    apply_filters( 'wpmdb_default_remote_post_timeout', 60 * 20 );
  • class/Common/Error/ErrorLog.php line 391
    apply_filters( 'wpmdb_diagnostic_info', array(), $diagnostic_info );
  • class/Common/Sql/Table.php line 1639
    apply_filters( 'wpmdb_domain_replaces', $domain_replaces );
  • class/Common/Migration/MigrationManager.php line 436
    do_action( 'wpmdb_error_migration', $error_message );
  • class/Common/Sql/Table.php line 1342
    apply_filters( 'wpmdb_exclude_transients', true );
  • class/Common/Sql/Table.php line 304
    apply_filters( 'wpmdb_export_filename', sprintf('%s-%s',$dump_name, $datetime) );
  • class/Common/FullSite/FullSiteExport.php line 114
    apply_filters( 'wpmdb_export_honor_constant', $honor_const );
  • class/Common/FullSite/FullSiteExport.php line 82
    apply_filters( 'wpmdb_export_relative_path', $relative_path, $state_data );
  • class/Common/Util/Util.php line 374
    apply_filters( 'wpmdb_filtered_filters', array( 'nonce_life', ) );
  • class/Common/Migration/FinalizeMigration.php line 102
    apply_filters( 'wpmdb_finalize_key_rules', $key_rules );
  • class/Common/Migration/FinalizeMigration.php line 120
    do_action( 'wpmdb_finalize_migration', $state_data );
  • class/Common/Migration/FinalizeMigration.php line 206
    apply_filters( 'wpmdb_finalize_target_table_name', $table, $state_data );
  • class/Common/Replace.php line 351
    apply_filters( 'wpmdb_find_and_replace', $tmp_find_replace_pairs, $intent, $site_url );
  • class/Common/Plugin/Assets.php line 169
    apply_filters( 'wpmdb_frontend_assets_path', WP_PLUGIN_DIR . '/wp-migrate-db' . $is_pro . '/frontend' );
  • class/Common/Sql/Table.php line 1933
    apply_filters( 'wpmdb_get_alter_queries', $alter_queries, $state_data );
  • class/Common/UI/Notice.php line 20
    apply_filters( "wpmdb_hide_{$notice}", false );
  • template/options.php line 7
    apply_filters( 'wpmdb_hide_set_time_limit_warning', false );
  • class/Common/Util/Util.php line 783
    apply_filters( 'wpmdb_hosting_platform', null );
  • class/Common/Migration/InitiateMigration.php line 134
    apply_filters( 'wpmdb_initiate_key_rules', array( 'action' => 'key', 'intent' => 'key', 'url' => 'url', 'key' => 'string', 'form_data' => 'json', 'stage' => 'key', 'stages' => 'json', 'nonce' => 'key', 'temp_prefix' => 'string', 'site_details' => 'json_array', 'export_dest' => 'string', 'import_info' => 'array', ), __FUNCTION__ );
  • class/Common/Migration/InitiateMigration.php line 197
    do_action( 'wpmdb_initiate_migration', $state_data );
  • class/Common/Migration/InitiateMigration.php line 220
    apply_filters( 'wpmdb_initiate_push_pull_post', $data, $state_data );
  • class/Common/Plugin/Assets.php line 70
    apply_filters( 'wpmdb_js_strings', array( 'connection_info_missing' => __('The connection information appears to be missing, please enter it to continue.', 'wp-migrate-db'), 'connection_info_url_invalid' => __('The URL on the first line appears to be invalid, please check it and try again.', 'wp-migrate-db'), 'connection_info_key_invalid' => __('The secret key on the second line appears to be invalid. It should be a 40 character... );
  • class/Common/Replace.php line 902
    apply_filters( 'wpmdb_json_replace_columns', [ 'post_content', 'post_content_filtered', ] );
  • class/Common/Replace.php line 900
    apply_filters( 'wpmdb_json_replace_tables', $default_tables );
  • class/Common/Plugin/Assets.php line 63
    do_action( 'wpmdb_load_assets' );
  • class/Common/Plugin/Assets.php line 178
    do_action( 'wpmdb_load_frontend' );
  • class/Common/Error/ErrorLog.php line 137
    apply_filters( 'wpmdb_max_error_log_length', 1000000 );
  • class/Common/Error/ErrorLog.php line 138
    apply_filters( 'wpmdb_max_individual_error_log_length', $max_log_length / 2.2 );
  • class/Common/MF/MediaFilesLocal.php line 175
    apply_filters( 'wpmdb_mf_excludes', $excludes, $state_data );
  • class/Common/MF/MediaFilesLocal.php line 201
    apply_filters( 'wpmdb_mf_local_uploads_folder', $abs_path, $state_data );
  • class/Common/Transfers/Files/PluginHelper.php line 174
    apply_filters( 'wpmdb_mf_media_upload_path', WP_CONTENT_DIR . DIRECTORY_SEPARATOR . $uploads_name, $state_data );
  • class/Common/Transfers/Files/PluginHelper.php line 184
    apply_filters( 'wpmdb_mf_remote_uploads_folder', $folders, $state_data );
  • class/Common/MF/MediaFilesLocal.php line 196
    apply_filters( 'wpmdb_mf_remote_uploads_source_folder', $folder, $state_data );
  • class/Common/Sql/Table.php line 1604
    apply_filters( 'wpmdb_new_path_current_site', $new_path_current_site );
  • wpmdb_nonces

    filter
    class/Common/Plugin/PluginManagerBase.php line 299
    apply_filters( 'wpmdb_nonces', array( 'migrate_table' => Util::create_nonce('migrate-table'), 'flush' => Util::create_nonce('flush'), 'track_usage' => Util::create_nonce('track-usage'), 'rest_nonce' => Util::create_nonce('wp_rest'), ) );
  • wpmdb_notices

    action
    template/options.php line 6
    do_action( 'wpmdb_notices' );
  • class/Common/Plugin/Assets.php line 92
    apply_filters( 'wpmdb_notification_strings', [] );
  • class/Common/Profile/ProfileManager.php line 478
    apply_filters( 'wpmdb_overwrite_profile', $state_data['contents'] );
  • class/Common/Util/Util.php line 111
    apply_filters( 'wpmdb_post_max_upper_size', 26214400 );
  • class/Common/Sql/Table.php line 2131
    apply_filters( 'wpmdb_post_types', array_values(array_unique($return)) );
  • class/Common/Replace.php line 619
    apply_filters( 'wpmdb_pre_recursive_unserialize_replace', false, $data, $this );
  • class/Common/Sql/Table.php line 431
    apply_filters( 'wpmdb_preserved_options', $preserved_options, $intent );
  • class/Common/Sql/Table.php line 449
    apply_filters( 'wpmdb_preserved_options_data', $preserved_options_data, $intent );
  • class/Common/Sql/Table.php line 394
    apply_filters( 'wpmdb_preserved_sitemeta_options', $preserved_sitemeta_options, $intent );
  • class/Common/Sql/Table.php line 405
    apply_filters( 'wpmdb_preserved_sitemeta_options_data', $preserved_sitemeta_options_data, $intent );
  • class/Common/Sql/Table.php line 693
    apply_filters( 'wpmdb_process_column_as_binary', false, $struct );
  • class/Common/Sql/Table.php line 698
    apply_filters( 'wpmdb_process_column_as_bit', false, $struct );
  • class/Common/Profile/ProfileManager.php line 289
    apply_filters( 'wpmdb_recent_profiles_limit', 10 );
  • class/Common/Replace.php line 721
    apply_filters( 'wpmdb_replace_custom_data', array($data, true), $this );
  • class/Common/Replace.php line 729
    apply_filters( 'wpmdb_replace_json_encode_flags', 0, $data, $this );
  • class/Common/Sql/Table.php line 1431
    apply_filters( 'wpmdb_rows_join', $join, $table );
  • class/Common/Sql/Table.php line 1434
    apply_filters( 'wpmdb_rows_limit', $limit, $table );
  • class/Common/Sql/Table.php line 1433
    apply_filters( 'wpmdb_rows_order_by', $order_by, $table );
  • class/Common/Sql/Table.php line 172
    apply_filters( 'wpmdb_rows_per_segment', 100 );
  • class/Common/Sql/Table.php line 1437
    apply_filters( 'wpmdb_rows_sql', $sql, $table );
  • class/Common/Sql/Table.php line 1432
    apply_filters( 'wpmdb_rows_where', $where, $table );
  • class/Common/Http/Helper.php line 89
    apply_filters( 'wpmdb_sensible_pull_limit', min(26214400, $this->settings['max_request']) );
  • class/Common/Plugin/Assets.php line 67
    apply_filters( 'wpmdb_settings_js', $this->settings->get_settings_for_frontend() );
  • class/Common/Util/Util.php line 792
    apply_filters( 'wpmdb_site_details', $site_details, $state_data );
  • class/Common/Replace.php line 633
    apply_filters( 'wpmdb_skip_search_replace_tables', ['eum_logs'] );
  • class/Common/Replace.php line 373
    apply_filters( 'wpmdb_subdomain_replace', true );
  • class/Common/Sql/Table.php line 1527
    apply_filters( 'wpmdb_table_row', $row, $table, $state_data );
  • class/Common/Sql/Table.php line 232
    apply_filters( 'wpmdb_table_sizes', $return, 'regular' );
  • wpmdb_tables

    filter
    class/Common/Sql/Table.php line 2013
    apply_filters( 'wpmdb_tables', $clean_tables, $scope );
  • class/Common/BackupExport.php line 134
    apply_filters( 'wpmdb_tables_to_backup', $tables_to_backup, $profile );
  • class/Common/Sql/Table.php line 578
    apply_filters( 'wpmdb_target_table_name', $table, $state_data, $site_details, $subsite_migration );
  • class/Common/Addon/Addon.php line 89
    apply_filters( 'wpmdb_temporary_prefix', $this->props->temp_prefix );
  • class/Common/Transfers/Files/Chunker.php line 29
    apply_filters( 'wpmdb_tranfers_chunk_folder', WP_CONTENT_DIR . DIRECTORY_SEPARATOR );
  • class/Common/Queue/QueueHelper.php line 183
    apply_filters( 'wpmdb_tranfers_queue_batch_size', 1000 );
  • class/Common/Transfers/Files/Util.php line 790
    apply_filters( 'wpmdb_transfers_temp_dir', $temp_dir );
  • class/Common/Filesystem/Filesystem.php line 996
    apply_filters( 'wpmdb_upload_dir_name', 'wp-migrate-db' );
  • class/Common/Filesystem/Filesystem.php line 984
    apply_filters( 'wpmdb_upload_info', array() );
  • class/Common/MF/MediaFilesLocal.php line 261
    apply_filters( 'wpmdbmf_file_batch_size', 1000 );
  • class/Common/MF/MediaFilesLocal.php line 271
    do_action( 'wpmdbmf_file_transfer_complete' );
  • class/Common/MF/MediaFilesAddon.php line 162
    apply_filters( 'wpmdbmf_max_file_uploads', $max_file_uploads );
  • class/Common/TPF/ThemePluginFilesLocal.php line 287
    apply_filters( 'wpmdbtp_file_batch_size', 1000 );
  • class/Common/TPF/ThemePluginFilesLocal.php line 297
    do_action( 'wpmdbtp_file_transfer_complete' );
  • class/Common/TPF/ThemePluginFilesAddon.php line 260
    apply_filters( 'wpmdbtp_max_file_uploads', $max_file_uploads );
  • class/Common/TPF/ThemePluginFilesAddon.php line 490
    apply_filters( 'wpmdbtp_plugin_list', ['wp-migrate-db'] );

Generated from WP Migrate Lite's GPL-licensed source code. Hooks inside bundled third-party libraries are not listed.

Can't find the right hook?

We can build the customisation for you. Describe what you need: