PHPackages                             hashtagcms/migration-tool - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. hashtagcms/migration-tool

ActiveLibrary[Database &amp; ORM](/categories/database)

hashtagcms/migration-tool
=========================

A production-grade, asynchronous migration tool for HashtagCMS to migrate data, media, and templates between installations.

v1.0.1(1mo ago)02↑2900%MITPHPPHP ^8.3

Since Mar 29Pushed 1mo agoCompare

[ Source](https://github.com/hashtagcms/migration-tool)[ Packagist](https://packagist.org/packages/hashtagcms/migration-tool)[ RSS](/packages/hashtagcms-migration-tool/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (6)Versions (3)Used By (0)

HashtagCMS Migration Tool
=========================

[](#hashtagcms-migration-tool)

[![PHP Version](https://camo.githubusercontent.com/b5d4f7901c58ad1ddfff679966f426cc25a9354bab763846b9a7276c2feab4e0/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d253545382e322d626c7565)](https://php.net)[![Laravel](https://camo.githubusercontent.com/46ba5f585d1974d556c84fc72969628686d2f4c85780e7bd3c041282517345a8/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c61726176656c2d31302e782532422d6f72616e6765)](https://laravel.com)[![License](https://camo.githubusercontent.com/f8df3091bbe1149f398a5369b2c39e896766f9f6efba3477c63e9b4aa940ef14/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d677265656e)](LICENSE)[![Package](https://camo.githubusercontent.com/97d38cef636fa3c8ff496077c6c19497e321f827829ab9723d020b63a65c113a/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7061636b6167652d68617368746167636d732532466d6967726174696f6e2d2d746f6f6c2d707572706c65)](https://github.com/hashtagcms/migration-tool)

[![Migration Tool](./docs/img/icon.png)](./docs/img/icon.png)

A production-grade, asynchronous database, media, and template migration tool for [HashtagCMS](https://hashtagcms.org). Move a complete CMS site — including all data layers, translations, media files, and relational graph — from a **source** database to a **target** installation with a beautiful guided wizard UI.

---

✨ Feature Highlights
--------------------

[](#-feature-highlights)

FeatureStatus7-Step ETL Pipeline (Context → Structural → Glue → Content → Media → Validation)✅**Legacy terminology support** (Auto-detect `tenants` vs `platforms`)✅**Smart Template Migration** (with automated namespace refactoring)✅**Pre-migration Package Audit** (Detect missing composer dependencies)✅Artisan CLI Interface (`cms:migrate-site` &amp; `cms:migrate-templates`)✅ID Mapping Engine (old\_id → new\_id across connections)✅Asynchronous Background Job Processing &amp; Progress Monitoring✅Auto-run one queue job on dispatch (`queue:work --once`)✅**Scale-ready Performance** (Chunked data processing for large sites)✅Conflict Resolution: Terminate / Overwrite / Rename✅Media &amp; Asset File Synchronization✅Automated Post-Migration Integrity Validation✅Staff-only access guard at controller level (`user_type = Staff`)✅Auto-create missing target tables from source schema (with permission checks)✅---

📋 Requirements
--------------

[](#-requirements)

- PHP `^8.2`
- Laravel `10.x`, `11.x`, or `12.x`
- HashtagCMS core package `hashtagcms/hashtagcms`
- A queue driver configured (e.g., `database`, `redis`, `sqs`)

---

🚀 Installation
--------------

[](#-installation)

1. **Require the package via Composer:**

```
composer require hashtagcms/migration-tool
```

2. **Publish configuration and run migrations:**

```
php artisan vendor:publish --tag="migration-tool-config"
php artisan migrate
```

3. **Run your queue worker (recommended for sustained migrations):**

```
php artisan queue:work
```

```
If `auto_queue_work_once` is enabled in config (default), each migration dispatch can auto-start a one-shot worker process.

```

---

💻 Usage
-------

[](#-usage)

### 📊 Migration Wizard (UI)

[](#-migration-wizard-ui)

Open the Migration Wizard in your browser for a guided experience: `https://your-app.com/cms-migration`

- **Discovery Phase**: Automatically identifies site statistics and **warns about missing composer packages** found in the source project.
- **Template Sync**: Independently migrate your theme and module blade files with real-time namespace refactoring (`MarghoobSuleman\HashtagCms` → `HashtagCms`).

### ⌨️ Artisan Commands (CLI)

[](#️-artisan-commands-cli)

#### 1. Full Data Migration

[](#1-full-data-migration)

```
php artisan cms:migrate-site {site_id} \
    --database="source_db" \
    --username="root" \
    --password="password" \
    --media --source-root="/var/www/old-site"
```

#### 2. Standalone Template Migration

[](#2-standalone-template-migration)

```
php artisan cms:migrate-templates {site_id} "/absolute/path/to/source"
```

---

🧠 Smart Migration Features
--------------------------

[](#-smart-migration-features)

### 🔄 Legacy Compatibility

[](#-legacy-compatibility)

The tool automatically detects if the source database uses the older `tenants` and `tenant_id` terminology. It transparently maps these to the modern `platforms` and `platform_id` structure in HashtagCMS V2+.

### 📝 Code Refactoring

[](#-code-refactoring)

During template migration, the tool processes all `.php` and `.blade.php` files. It automatically bridges the gap between legacy and modern namespaces:

- `MarghoobSuleman\HashtagCms` $\\rightarrow$ `HashtagCms`

### 📦 Dependency Audit

[](#-dependency-audit)

Before starting, the tool reads the `composer.json` of your legacy installation and compares it to your new one. It will provide a ready-to-use `composer require` command for any missing third-party packages.

---

📖 Documentation
---------------

[](#-documentation)

\#DocumentDescription01[Architecture Overview](docs/01-architecture.md)ETL design, layers, and class structure02[Installation &amp; Configuration](docs/02-installation.md)Full setup guide03[The ETL Pipeline](docs/03-etl-pipeline.md)Details on all 7 sync steps04[Migration Wizard UI](docs/04-wizard-ui.md)How the frontend wizard works05[API Reference](docs/05-api-reference.md)All backend endpoints06[Conflict Resolution](docs/06-conflict-resolution.md)Domain &amp; data conflict strategies07[Media Migration](docs/07-media-migration.md)File sync and path handling08[Queue &amp; Async Jobs](docs/08-queue-async.md)Background job and progress tracking09[ID Mapping Engine](docs/09-id-mapping-engine.md)How foreign keys are re-mapped10[Security](docs/10-security.md)CSRF, session, and connection safety11[Template Migration](docs/11-template-migration.md)Standalone file/namespace syncing12[Legacy &amp; Dependency Support](docs/12-legacy-support.md)Terminology and package audit13[Regression Smoke Checks](docs/13-regression-smoke-checks.md)Validate recent migration bug fixes---

🤝 Contributing
--------------

[](#-contributing)

See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.

---

📄 License
---------

[](#-license)

MIT © [Marghoob Suleman](mailto:marghoobsuleman@gmail.com)

###  Health Score

39

—

LowBetter than 86% of packages

Maintenance90

Actively maintained with recent releases

Popularity3

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

46d ago

PHP version history (2 changes)v1.0.0PHP ^8.2

v1.0.1PHP ^8.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/8133a51afec1397efda39c75b0977871089a845cff1944ca36d63312b7400689?d=identicon)[marghoobsuleman](/maintainers/marghoobsuleman)

---

Tags

laravelmigrationsynchronizationcmsHashtagCmsdata-transfer

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/hashtagcms-migration-tool/health.svg)

```
[![Health](https://phpackages.com/badges/hashtagcms-migration-tool/health.svg)](https://phpackages.com/packages/hashtagcms-migration-tool)
```

###  Alternatives

[tucker-eric/eloquentfilter

An Eloquent way to filter Eloquent Models

1.8k4.8M26](/packages/tucker-eric-eloquentfilter)[cybercog/laravel-clickhouse

ClickHouse migrations for Laravel

163166.8k](/packages/cybercog-laravel-clickhouse)[toponepercent/baum

Baum is an implementation of the Nested Set pattern for Eloquent models.

3154.7k](/packages/toponepercent-baum)[dragon-code/laravel-data-dumper

Adding data from certain tables when executing the `php artisan schema:dump` console command

3418.6k](/packages/dragon-code-laravel-data-dumper)[dragon-code/migrate-db

Easy data transfer from one database to another

15717.4k](/packages/dragon-code-migrate-db)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
