تفصیل
MksDdn Migrate Content is a clean-room migration suite that packages your site into deterministic .wpbkp archives. Each bundle contains a manifest, checksum, database segments, media, selected files, and user decisions, so imports stay predictable.
Why MksDdn Migrate Content?
- Dual export modes – choose Full Site (database + uploads/plugins/themes) or Selected Content (multi-select posts/pages/CPTs) with or without referenced media.
- Chunked pipeline – large archives stream through REST API endpoints with resume tokens, so multi‑GB transfers survive flaky networks.
- User merge control – compare archive vs current users and decide how to merge conflicts.
- Integrity & safety –
.wpbkparchives ship with manifests and checksums; imports verify capabilities, nonces, and disk space before touching data.
Feature Highlights
- Archive format with manifest, checksum, and payload folders (
content.json,media/,options/, filesystem slices). - Media scanner that collects featured images, galleries, attachments referenced inside blocks or shortcodes.
- File-system coverage for
wp-content/uploads,wp-content/plugins,wp-content/themeswith filters to skip VCS/system files. - Chunked upload/download JS client with live progress, auto-resume, and graceful fallback to direct transfer.
- Server file import – select backup files directly from
wp-content/uploads/mksddn-mc/imports/directory without browser uploads. - Custom
.wpbkpdrag-and-drop uploader with checksum guardrails (UI polish deferred to next milestone, functionality already complete).
Architecture
The plugin follows SOLID principles and WordPress Coding Standards with a clean, modular architecture:
Service Container & Dependency Injection
- Centralized
ServiceContainermanages all dependencies - Service Providers (
CoreServiceProvider,AdminServiceProvider,ExportServiceProvider,ImportServiceProvider,ChunkServiceProvider) register services - All dependencies resolved through container, eliminating direct instantiation
- Full support for interface-based dependency injection
Request Handlers
ExportRequestHandler– handles export requestsImportRequestHandler– delegates to specialized import services (supports unified import viaUnifiedImportOrchestrator)UserMergeRequestHandler– processes user merge operationsChunkRestController– REST API controller for chunked upload/download operations- All handlers implement corresponding interfaces for testability
Service Layer
SelectedContentImportService– handles selected content importsFullSiteImportService– manages full site importsUnifiedImportOrchestrator– orchestrates unified import with automatic type detection and routingImportTypeDetector– detects import type (full site or selected content) from archive fileImportFileValidator– validates uploaded filesImportPayloadPreparer– prepares import payloadsServerBackupScanner– scans and validates backup files on the serverResponseHandler– manages redirects and status messagesNotificationService– handles user notificationsProgressService– tracks operation progressErrorHandler– centralized error handling and loggingUserDiffBuilder– builds user difference comparisonUserMergeApplier– applies user merge operations
Contracts (Interfaces)
All key components implement interfaces:
* ExporterInterface, ImporterInterface
* MediaCollectorInterface, ChunkJobRepositoryInterface
* UserPreviewStoreInterface, UserDiffBuilderInterface, UserMergeApplierInterface
* NotificationServiceInterface, ProgressServiceInterface
* ArchiveHandlerInterface, ValidatorInterface
* Request handler interfaces for all handlers
Error Handling
- Specialized exceptions:
ValidationException,FileOperationException,DatabaseOperationException,ImportException,ExportException - Centralized
ErrorHandlerfor consistent error processing - Proper logging and user-friendly error messages
- Validation classes:
ArchiveValidator,ImportDataValidator,ExportDataValidator,FileValidator
Performance
BatchLoaderfor optimized database queries (prevents N+1 problems)- Efficient media collection with batch processing (
AttachmentCollector) - Chunked transfer for large files via REST API (
ChunkRestController) - Memory-efficient streaming for large archives
FullArchivePayloadfor efficient archive payload handlingContentCollectorfor filesystem content collection
Security
- All admin operations check
current_user_can('manage_options') - Nonce verification for all forms and AJAX requests
- REST API endpoints protected with permission callbacks
- Input sanitization using WordPress sanitization functions
- Output escaping with
esc_html(),esc_attr(),esc_url() - File upload validation with MIME type checking
- Path traversal protection for server file access (
ServerBackupScanner) SiteUrlGuardprevents accidental site URL changes during importImportLockprevents concurrent import operationsDomainReplacersafely handles URL replacement during migrations
انسٹالیشن
- Upload the
mksddn-migrate-contentfolder to the/wp-content/plugins/directory, or install via the Plugins page in WordPress. - Activate the plugin through the ‘Plugins’ menu in WordPress.
- Go to Tools Migrate Content to run exports and imports.
عمومی سوالات
-
What is inside a `.wpbkp` archive?
-
Each archive stores a manifest (checksums, metadata, timestamps), JSON payloads for selected entities, optional filesystem slices (uploads/plugins/themes), media binaries, and user-merge selections. Imports verify the manifest before processing.
-
How is `.wpbkp` different from `.json` exports?
-
.json exports are lightweight (content only) and convenient for quick edits.
.wpbkpadds media, filesystem slices, and checksums. Use.wpbkpfor full fidelity. -
Does it support ACF and custom post types?
-
Yes. Any public post type plus Advanced Custom Fields metadata is exported/imported. Taxonomies, menus, widgets, and serialized options are also covered.
-
How do chunked uploads resume?
-
The JS client splits files into 5–10 MB chunks (auto-tuned by server limits). Each chunk is hashed and acknowledged via REST API endpoints (
mksddn/v1/chunk/*). If the browser reloads, the resume token restarts from the last confirmed chunk. -
How do I import a backup file from the server?
-
You can import backup files directly from the server without uploading them through the browser. Place your
.wpbkpor.jsonarchive files in thewp-content/uploads/mksddn-mc/imports/directory (the plugin will create this directory automatically if it doesn’t exist). Then, in the import form, toggle the "Select from server” option instead of "Upload file”. The plugin will scan the imports directory and display available files with their size and modification date. Select the desired file and proceed with the import. This method is especially useful for large files or when you have direct server access via FTP/SFTP. -
Can I merge users without overwriting existing accounts?
-
Yes. The user merge dialog shows archive/current rows with conflict indicators. You can keep current roles, replace metadata, or skip entire accounts.
-
Does it touch production files directly?
-
Filesystem operations run through
WP_Filesystem, honor capability checks, and avoid.git,.svn, and OS temp files. Full-site imports stage files before replacing anything critical.
جائزے
There are no reviews for this plugin.
شراکت دار اور ڈیویلپرز
“MksDdn Migrate Content” اوپن سورس سافٹ ویئر ہے۔ مندرجہ ذیل لوگوں نے اس پلگ ان میں حصہ لیا:
شراکت دار“MksDdn Migrate Content” کا اپنی زبان میں ترجمہ کریں۔
ڈویلپمینٹ میں دلچسپی ہے؟
کوڈ براؤز کریں، ایس این وی ریپوزیٹری کو چیک کریں یا ڈویلپمینٹ لاگ کو سبسکرائب کریں بذریعہ آر ایس ایس۔
چینج لاگ
2.0.1
- Enhanced: FullDatabaseImporter type safety with integer casting for batch offsets.
- Enhanced: UserMergeApplier recursive validation for incomplete objects in user meta, preventing import errors.
2.0.0
- Added: Unified import feature with automatic type detection – single import form automatically detects and routes full site or selected content imports.
- Added: Import locking mechanism to prevent concurrent import operations and ensure data integrity.
- Added: AJAX search functionality for post selection, improving usability when selecting content for export.
- Enhanced: Download progress handling in chunked transfers for better user experience.
- Enhanced: Security with improved nonce verification in unified import orchestrator.
- Refactored: Import handling architecture with unified orchestrator for cleaner code organization.
1.4.0
- Added: Post-import maintenance tasks (cache flushing, WooCommerce maintenance, plugin reactivation hooks).
- Enhanced: SQL safety with improved sanitization and escaping for database operations.
- Enhanced: Memory management with adaptive strategies to prevent exhaustion during large imports.
- Enhanced: Error handling and logging throughout import processes.
- Added: RedirectTrait for streamlined HTTP redirect handling during background imports.
- Refactored: Database row insertion logic for improved performance.
1.3.2
- Enhanced: Improved memory management in FullArchivePayload – original memory limit is now stored and restored during JSON decoding for large files, ensuring efficient resource handling.
- Enhanced: Enhanced domain signature collection in DomainReplacer to include port and scheme information, improving URL replacement accuracy during migrations.
1.3.1
- Fixed: Improved compliance with WordPress.org plugin guidelines – all scripts/styles now properly enqueued, conditional loading for admin files, removed inline code.
- Enhanced: Real-time import progress tracking via REST API polling without page refresh.
- Enhanced: Improved background import execution with fastcgi_finish_request() support for uninterrupted processing.
1.3.0
- Added MKSDDN_MC_BASENAME constant for plugin path management.
- Introduced dedicated CSS file for import progress styling.
- Added user warnings to prevent accidental lockouts when deselecting all users.
- Enhanced user selection handling to preserve current admin user during imports.
- Improved data sanitization across handlers.
- Added import completion notices in NotificationService.
- Implemented backup and restore of critical options during full database imports.
- Enhanced file verification in FullContentImporter.
- Refactored FilesystemHelper to initialize permissions dynamically.
- Enhanced ImportProgressPage with static CSS/JS generation methods.
1.2.5
- Refactored BatchLoader to enhance database query efficiency by replacing placeholder-based queries with sanitized ID strings, improving security and performance.
- Implemented dedicated admin styles and scripts with separate CSS and JavaScript files for better code organization and maintainability.
- Added CSS for progress bars, sections, grids, and cards to enhance the admin interface.
- Introduced JavaScript for progress bar functionality with dynamic updates during content migration.
- Refactored code to remove deprecated inline styles and scripts, promoting better separation of concerns.
- Updated comments for clarity on caching and sanitization practices.
- Added PHPCS ignore comments for specific cases to address coding standards compliance.
1.2.4
- Enhanced ACF field export and import support for groups and repeaters.
- Improved ACF field handling in BatchLoader by using get_fields() directly for better efficiency.
- Enhanced link field processing in repeaters and groups during import operations.
- Refactored ACF field retrieval in WpFunctionsWrapper to ensure consistent array return types.
- Improved data integrity during ACF imports with better field value handling and recursive media remapping.
1.2.3
- Enhanced FilesystemHelper with dynamic definition of FS_CHMOD_FILE and FS_CHMOD_DIR based on existing WordPress file permissions, improving filesystem operations compatibility.
- Added ensure_directory() method to FilesystemHelper for consistent directory creation with proper error handling.
- Refactored directory creation logic in ChunkJobRepository, ChunkRestController, and FullContentExporter to utilize FilesystemHelper for improved error handling and consistency.
- Improved file permissions handling in put_stream() method to ensure proper chmod after streaming operations.
1.2.2
1.2.1
- Updated PHPCS ignore comments for set_time_limit and ini_set to current standards.
1.2.0
- Added real-time progress tracking for import operations with visual progress bar.
- Implemented incremental database import to optimize memory usage for large backups.
- Enhanced memory and time limit management based on file size to prevent failures.
- Added output flushing for better responsiveness during import.
- Improved error handling and logging for large file imports.
- Removed unused auto-increment key handling code for cleaner codebase.
1.1.0
- Added server file import feature – users can now select backup files directly from the server imports directory.
- Introduced ServerBackupScanner service for scanning and validating backup files on the server.
- Added JavaScript module (server-file-selector.js) for dynamic file selection with AJAX loading.
- Updated import forms (full site and selected content) with source toggle (upload vs server).
- Enhanced FullSiteImportService and SelectedContentImportService to support server file imports.
- Added AJAX endpoint (mksddn_mc_get_server_backups) for retrieving available backup files.
- Implemented file caching via WordPress transients to improve performance.
- Added path traversal protection for secure server file access.
- Server file selector displays file size and modification date for better user experience.
1.0.1
- Fixed duplicate PRIMARY KEY errors during full site import (wp_postmeta, wp_actionscheduler_actions).
- Auto-increment PRIMARY KEY fields are now excluded from inserts to let database generate new values.
- Added INSERT IGNORE fallback for handling duplicate key conflicts during import.
1.0.0
- Clean-room
.wpbkparchive format with manifest + checksum validator. - Full-site export/import (database + uploads/plugins/themes) with streaming chunked transfer.
- Selected content export with multi-select CPT picker, media toggle, and JSON fallback.
- Media collector/restorer for featured images, galleries, and inline attachments.
- Chunked upload/download pipeline with resume tokens, progress UI, and safe fallbacks.
- User merge matrix covering new, conflicting, and existing accounts with role/metasync choices.
- Refactored architecture following SOLID principles with Service Container and Dependency Injection.
- All components use interfaces (Contracts) for improved testability and maintainability.
- Separated concerns: Request Handlers, Services, and Views are clearly divided.
- Specialized exception handling for better error management.
- Optimized database queries using BatchLoader to prevent N+1 problems.