WP Manifestindependent plugin directory
manifest / updates / data-machine-migration

Data Machine Migration

WordPress plugin for migrating Data Machine from dm_ to datamachine_ prefixes for WordPress repository compliance

★ 0stars

Install

Download source zip No release zip yet

This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.

Install straight from GitHub with WP-CLI:

wp plugin install https://github.com/chubes4/data-machine-migration/archive/refs/heads/main.zip
No built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.

Data Machine Migration Plugin

A standalone WordPress plugin to migrate Data Machine from dm_ prefixes to datamachine_ prefixes for WordPress repository compliance.

Overview

This plugin provides a safe, step-by-step migration process to convert:

  • Database table names: wp_dm_* → wp_datamachine_*
  • Meta keys: dm_* → datamachine_*
  • WordPress options: Any serialized data containing dm_ references
  • Custom post types: dm_events → datamachine_events
  • Gutenberg blocks: dm-events/* → datamachine-events/*

Migration Status

Current Phase: Phase 2 Complete

  • Phase 1: ✓ Complete (migration plugin ready)
  • Phase 2: ✓ Complete (core plugin fully migrated to datamachine_ prefixes)
  • Phase 3: ✓ Complete (database tables migrated to wpdatamachine*)
  • Phase 4: ✓ Complete (extension migrations deployed and verified)

Status: Migration complete across all Data Machine Ecosystem components. Plugin v1.0.0 available for production deployment on existing installations. See ecosystem root MIGRATION-PLAN.md file for full migration details.

Installation

  1. Download or clone this plugin to your wp-content/plugins/ directory
  2. Activate the plugin through WordPress admin (Plugins → Installed Plugins)
  3. Navigate to Tools → Data Machine Migration

Migration Process

Phase 1: Preparation

  • Install this migration plugin alongside your existing Data Machine plugins
  • Ensure you have complete database backups (server-level)
  • Run pre-flight checks

Phase 2: Execute Migration Steps

Step 1: Database Tables

Renames core Data Machine tables:

  • wp_dm_pipelines → wp_datamachine_pipelines
  • wp_dm_flows → wp_datamachine_flows
  • wp_dm_jobs → wp_datamachine_jobs
  • wp_dm_processed_items → wp_datamachine_processed_items

Step 2: Meta Keys

Updates all post and user meta keys:

  • Post meta: dm_* → datamachine_*
  • User meta: dm_* → datamachine_*
  • Handles serialized data recursively

Step 3: Options

Updates WordPress options containing old prefixes:

  • Option names: dm_* → datamachine_*
  • Option values: Any serialized data with dm_ references

Step 4: Post Types

Migrates custom post types in wp_posts table:

  • dm_events → datamachine_events
  • Batch processing for large datasets
  • Verifies zero posts remain with old type

Step 5: Block Content

Updates Gutenberg block references in post content:

  • dm-events/event-details → datamachine-events/event-details
  • dm-events/calendar → datamachine-events/calendar
  • dm-recipes/recipe-schema → datamachine-recipes/recipe-schema
  • Includes reusable blocks

Step 6: Validation

Comprehensive checks to ensure migration success:

  • Verifies all tables exist and are accessible
  • Confirms no old prefixes remain
  • Validates data integrity

Phase 3: Completion

  • Review migration logs
  • Test Data Machine functionality
  • Remove this migration plugin

Safety Features

Backups

  • Server-level backups are your responsibility
  • Plugin creates detailed migration logs
  • Rollback capabilities for each migration step

Validation

  • Pre-migration checks for system readiness
  • Post-migration validation of all changes
  • Detailed error reporting and logging

Error Handling

  • Graceful failure handling
  • Partial rollback options
  • Logging via PHP error_log() function

Usage Instructions

For Each Site Migration

  1. Install Plugin

    # Upload to wp-content/plugins/datamachine-migration/
    # Activate via WordPress admin
  2. Access Migration Interface

    • Go to Tools → Data Machine Migration
    • Review the migration overview
  3. Run Migration Steps

    • Click "Start Migration"
    • Execute steps in order: Database → Meta → Options → Post Types → Block Content → Validation
    • Monitor progress and resolve any errors
  4. Verify Completion

    • Check validation results
    • Test Data Machine functionality
    • Review migration logs
  5. Cleanup

    • Deactivate and delete this migration plugin
    • Remove migration log files if desired

Troubleshooting

Common Issues

"Table does not exist"

  • Ensure Data Machine plugins are installed and activated
  • Check database prefix settings

"Permission denied"

  • Verify user has database modification permissions
  • Check file system permissions for log files

"Timeout errors"

  • Large datasets may require batch processing adjustments
  • Check PHP max_execution_time settings

Recovery Options

If Migration Fails:

  1. Check WordPress debug.log or server error logs for detailed error information
  2. Use server backups to restore database
  3. Contact support with log entries

Partial Rollback:

  • Some steps support individual rollback
  • Full rollback requires server backup restoration

Technical Details

Database Operations

  • Uses RENAME TABLE for atomic table renames
  • Maintains foreign key relationships
  • Batch processes large meta datasets

Data Handling

  • Recursive processing of serialized arrays/objects
  • Preserves data structure and types
  • Handles nested key replacements

Logging

  • Logging via PHP error_log() function
  • Messages appear in WordPress debug.log or server error logs
  • Error details for troubleshooting

Requirements

  • WordPress 5.0+
  • PHP 7.4+
  • MySQL 5.6+
  • Data Machine plugins installed
  • Database backup available

Support

For issues with this migration plugin:

  1. Check migration.log for error details
  2. Verify all requirements are met
  3. Test on staging environment first
  4. Include log files when reporting issues

Changelog

1.0.0

  • Initial release
  • Database table migration
  • Meta key migration
  • Options migration
  • Validation system
  • Admin interface
  • Comprehensive logging