[WordPress] 外掛分享: MksDdn Migrate Content

首頁外掛目錄 › MksDdn Migrate Content
全新外掛
安裝啟用
尚無評分
4 天前
最後更新
問題解決
WordPress 6.2+ PHP 8.0+ v2.2.0 上架:2026-01-18

內容簡介

MksDdn Migrate Content 是一款專業的網站遷移外掛,能將您的網站打包成可預測的 .wpbkp 檔案,包含清單、檢查碼、資料庫片段及媒體檔案,確保遷移過程的安全與完整性。

【主要功能】
• 支援完整網站或選擇性內容的匯出模式
• 大檔案分段傳輸,支援恢復功能
• 用戶合併控制,解決衝突
• 主題匯入模式,選擇替換或合併
• 媒體掃描器,自動收集相關媒體
• 自訂的 .wpbkp 拖放上傳工具

外掛標籤

開發者團隊

⬇ 下載最新版 (v2.2.0) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「MksDdn Migrate Content」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

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/mu-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.
Theme import mode – when a theme archive is detected, choose replace vs merge before applying changes.
Integrity & safety – .wpbkp archives ship with manifests and checksums; imports verify capabilities, nonces, and disk space before touching data.
Import preflight – unified import is a two-step flow: run preflight (read-only report), then start the real import from the report without uploading the file again (browser uploads are staged server-side between steps).

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/mu-plugins, wp-content/themes with 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 .wpbkp drag-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 ServiceContainer manages 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 requests
ImportRequestHandler – delegates to specialized import services (supports unified import via UnifiedImportOrchestrator)
UserMergeRequestHandler – processes user merge operations
ThemePreviewRequestHandler – handles theme preview cancel operations
ChunkRestController – REST API controller for chunked upload/download operations
All handlers implement corresponding interfaces for testability

Service Layer

SelectedContentImportService – handles selected content imports
FullSiteImportService – manages full site imports
ThemeImportService – handles theme archive imports
UnifiedImportOrchestrator – orchestrates unified import with automatic type detection; step 1 is always preflight, step 2 runs the real import using a stored file reference
ImportPreflightService – read-only analysis for unified import preflight
PreflightReportStore – short-lived transient storage for preflight reports and follow-up import handles (staged browser uploads under wp-content/uploads/mksddn-mc/preflight/, or chunk/server identifiers)
ImportTypeDetector – detects import type (full site or selected content) from archive file
ImportFileValidator – validates uploaded files
ImportPayloadPreparer – prepares import payloads
ServerBackupScanner – scans and validates backup files on the server
ResponseHandler – manages redirects and status messages
NotificationService – handles user notifications
ProgressService – tracks operation progress
ErrorHandler – centralized error handling and logging
UserDiffBuilder – builds user difference comparison
UserMergeApplier – applies user merge operations
ThemePreviewStore – stores pending theme import previews
DeactivationCleanup – clears temporary upload state and service directories when the plugin is deactivated

Contracts (Interfaces)
All key components implement interfaces:
* ExporterInterface, ImporterInterface
* MediaCollectorInterface, ChunkJobRepositoryInterface
* UserPreviewStoreInterface, ThemePreviewStoreInterface, UserDiffBuilderInterface, UserMergeApplierInterface
* NotificationServiceInterface, ProgressServiceInterface
* ArchiveHandlerInterface, ValidatorInterface
* Request handler interfaces for all handlers
Error Handling

Specialized exceptions: ValidationException, FileOperationException, DatabaseOperationException, ImportException, ExportException
Centralized ErrorHandler for consistent error processing
Proper logging and user-friendly error messages
Validation classes: ArchiveValidator, ImportDataValidator, ExportDataValidator, FileValidator

Performance

BatchLoader for 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
FullArchivePayload for efficient archive payload handling
ContentCollector for 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)
Path traversal protection for archive extraction (full site + theme import)
SiteUrlGuard prevents accidental site URL changes during import
ImportLock prevents concurrent import operations
DomainReplacer safely handles URL replacement during migrations

延伸相關外掛

文章
Filter
Apply Filters
Mastodon