Data Patch Creator
The Data Patch Creator streamlines one of the most error-prone parts of Magento 2 development: creating PHP data patch files. Instead of manually writing patch classes, this module lets you generate them directly from the Admin Panel with a few clicks.
This is especially valuable in large teams where content changes (CMS blocks, product attributes, store configs) need to be version-controlled and deployed consistently across environments. Without data patches, these changes live only in the database and get lost during deployments — the Data Patch Creator ensures they're captured as code.
GitHub: qoliber/m2-datapatchcreator
Installation
composer require qoliber/module-datapatchcreator
bin/magento setup:upgradeFeatures
- One-click patch generation — Select any supported entity in the Admin Panel and export it as a PHP data patch file
- Bulk export — Generate patches for multiple entities at once, downloaded as a ZIP file ready to drop into your module
- Image synchronization — Syncs images across Magento instances using
ImageSyncInterface, ensuring media is consistent between environments - Custom sync methods — Implement your own image sync strategy via dependency injection (S3, CDN, shared storage)
- Broad compatibility — Works with PHP 7.3+ and Magento 2.3.x through 2.4.x
Supported Entity Types
| Entity | What gets patched |
|---|---|
| Product attributes | Attribute definition, options, labels, sort order |
| CMS pages | Title, content, layout, stores, URL key |
| CMS blocks | Identifier, title, content, stores |
| Store configurations | Config path, value, scope |
The main module is not compatible with PageBuilder for Magento 2.4.3+. Install the companion package for PageBuilder support:
composer require qoliber/m2-datapatchcreator-pagebuilderHow It Works
- Navigate to the entity you want to patch in the Magento Admin
- Click the "Create Data Patch" button (available on supported entity edit pages)
- The module generates a properly structured PHP data patch class
- Download the file and place it in your module's
Setup/Patch/Data/directory - Run
bin/magento setup:upgrade— the patch executes and your content is now version-controlled