PHPackages                             apermo/classic-to-gutenberg - 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. apermo/classic-to-gutenberg

ActiveWordpress-plugin[Database &amp; ORM](/categories/database)

apermo/classic-to-gutenberg
===========================

Batch migration from classic editor content to Gutenberg blocks.

v0.3.1(1mo ago)010[18 issues](https://github.com/apermo/classic-to-gutenberg/issues)GPL-2.0-or-laterPHPPHP &gt;=8.2CI passing

Since Mar 15Pushed 1mo agoCompare

[ Source](https://github.com/apermo/classic-to-gutenberg)[ Packagist](https://packagist.org/packages/apermo/classic-to-gutenberg)[ RSS](/packages/apermo-classic-to-gutenberg/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (4)Dependencies (8)Versions (7)Used By (0)

Classic to Gutenberg
====================

[](#classic-to-gutenberg)

[![PHP CI](https://github.com/apermo/classic-to-gutenberg/actions/workflows/ci.yml/badge.svg)](https://github.com/apermo/classic-to-gutenberg/actions/workflows/ci.yml)[![codecov](https://camo.githubusercontent.com/a6909df2db908759a3ab50a41a88445d3df3385c5ab0d09baeea483e90e4c98e/68747470733a2f2f636f6465636f762e696f2f67682f617065726d6f2f636c61737369632d746f2d677574656e626572672f67726170682f62616467652e737667)](https://codecov.io/gh/apermo/classic-to-gutenberg)[![Packagist Version](https://camo.githubusercontent.com/8bb8484870ef6522c3cb0b8778fae5b98bde91a4fddf7fc144a85222e04cd71a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f617065726d6f2f636c61737369632d746f2d677574656e62657267)](https://packagist.org/packages/apermo/classic-to-gutenberg)[![License: GPL v2+](https://camo.githubusercontent.com/996c3451ae01accccbdbaaa15299d3a015844792e6de4a884a5d12f1356bacd4/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d47504c76322b2d626c75652e737667)](LICENSE)

Batch migration of WordPress classic editor content to Gutenberg blocks.

Requirements
------------

[](#requirements)

- PHP 8.2+
- WordPress 6.2+
- Composer

Installation
------------

[](#installation)

This plugin uses Composer for autoloading. You must run `composer install` before activating:

```
composer install
```

If dependencies are missing, the plugin displays an admin notice and does not load.

Usage
-----

[](#usage)

### WP-CLI

[](#wp-cli)

```
# Show how many classic posts need conversion
wp classic-to-gutenberg status

# Preview conversion without saving
wp classic-to-gutenberg convert --dry-run

# Convert all classic posts
wp classic-to-gutenberg convert

# Convert specific post types
wp classic-to-gutenberg convert --post-type=post,page --batch-size=100

# Rollback a converted post
wp classic-to-gutenberg rollback 42
```

### Admin Row Actions

[](#admin-row-actions)

On the Posts/Pages list screen, classic posts (without block markup) show two additional row actions:

- **Convert to Blocks** — converts the post content and saves immediately
- **Preview Blocks** — shows a preview of the converted block markup without saving

### Supported Conversions

[](#supported-conversions)

Classic HTMLGutenberg Block```core/paragraph```–```core/heading```, ```core/list` with `core/list-item````core/quote` with inner `core/paragraph````core/table` (requires `` + ``)```core/image` (standalone, linked, or in ``)```core/preformatted````core/separator````core/more````core/nextpage``[caption]``core/image` with caption`[gallery]``core/gallery` with inner `core/image`Other shortcodes`core/shortcode`Unrecognized HTML`core/html` (fallback)### Hooks

[](#hooks)

#### Filters

[](#filters)

- `classic_to_gutenberg_converters` — register custom block converters
- `classic_to_gutenberg_pre_convert` — filter content before conversion
- `classic_to_gutenberg_post_convert` — filter content after conversion
- `classic_to_gutenberg_finder_args` — filter post finder query arguments
- `classic_to_gutenberg_shortcode_handlers` — extend shortcode handler registry

#### Actions

[](#actions)

- `classic_to_gutenberg_post_converted` — fired after each post conversion
- `classic_to_gutenberg_post_rolled_back` — fired after rollback
- `classic_to_gutenberg_batch_started` — fired before batch conversion
- `classic_to_gutenberg_batch_completed` — fired after batch conversion

Development
-----------

[](#development)

```
composer cs               # Run PHPCS
composer cs:fix           # Fix PHPCS violations
composer analyse          # Run PHPStan
composer test             # Run all tests
composer test:unit        # Run unit tests only
composer test:integration # Run integration tests only
```

### Local WordPress Environment

[](#local-wordpress-environment)

```
ddev start && ddev orchestrate
```

### Git Hooks

[](#git-hooks)

Enable the pre-commit hook (PHPCS + PHPStan on staged files):

```
git config core.hooksPath .githooks
```

Contributing
------------

[](#contributing)

Contributions are welcome! See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.

Acknowledgements
----------------

[](#acknowledgements)

Development of this plugin is supported by

- [Coding Pioneers](https://coding-pioneers.com)
- [Thomann](https://www.thomann.de)

License
-------

[](#license)

[GPL-2.0-or-later](LICENSE)

###  Health Score

39

—

LowBetter than 85% of packages

Maintenance96

Actively maintained with recent releases

Popularity7

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity40

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

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 ~1 days

Total

4

Last Release

52d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/910b8010a35a86821d0b90d645374f5ae484513f2c195818e4c54bc0175d12e1?d=identicon)[apermo](/maintainers/apermo)

---

Top Contributors

[![apermo](https://avatars.githubusercontent.com/u/4695889?v=4)](https://github.com/apermo "apermo (150 commits)")

---

Tags

wordpressmigrationblocksgutenbergclassic-editor

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/apermo-classic-to-gutenberg/health.svg)

```
[![Health](https://phpackages.com/badges/apermo-classic-to-gutenberg/health.svg)](https://phpackages.com/packages/apermo-classic-to-gutenberg)
```

###  Alternatives

[dbout/wp-orm

WordPress ORM with Eloquent.

1279.6k1](/packages/dbout-wp-orm)[infinum/eightshift-libs

WordPress libs developed by Eightshift team to use in modern WordPress.

63118.9k3](/packages/infinum-eightshift-libs)

PHPackages © 2026

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