Convert to Blocks

Description

Convert to Blocks is a WordPress plugin that transforms classic editor content to blocks on-the-fly. After installing Gutenberg or upgrading to WordPress 5.0+, your content will be displayed in “Classic Editor Blocks”. While these blocks are completely functional and will display fine on the frontend of your website, they do not empower editors to fully make use of the block editing experience. In order to do so, your classic editor posts need to be converted to blocks. This plugin does that for you “on the fly”. When an editor goes to edit a classic post, the content will be parsed into blocks. When the editor saves the post, the new structure will be saved into the database. This strategy reduces risk as you are only altering database values for content that needs to be changed.

Note that Inner Blocks Transforms is only supported with the Gutenberg Plugin 10.9.0+.

Screenshots

  • Bulk migration using the wp convert-to-blocks start WP-CLI command that converts posts iteratively in the browser without requireing any manual input.

Installation

Manual Installation

  1. Upload the entire /convert-to-blocks directory to the /wp-content/plugins/ directory.
  2. Activate Convert to Blocks through the ‘Plugins’ menu in WordPress.

FAQ

How Do I Know It’s Working?

Find a classic editor in the post, try to navigate away from the page. You will get an error saying your changes will be discarded. This is because Convert to Blocks converted your content to blocks on the fly and those changes will be saved when you update the post.

Will Convert to Blocks Handle My Custom Blocks?

By default it will not.

Will Convert to Blocks Handle Nested Blocks?

Nested / Inner Block support does not work with Gutenberg bundled with WordPress Core <=5.7.2. This feature needs the Gutenberg Plugin >=10.9.0.

Reviews

أبريل 9, 2024 1 reply
Saves me a lot of time. Used it two times on large projects. I did not try the bulk option, but I just read that it can have bugs or crashes. Probably due to server load or unusual post content? What I did instead was create a button that that when pressed automatically opens in a new tab the 20 posts from the Posts Table view. I then waited for them to load. After they were all loaded I went to each page and updated the page. I then waited a while for all of them to be saved and double checked in the Posts Table if all the posts were converted to the Block editor. The little icon showing if the post is Classic or Block comes very handy! Once I confirmed that all 20 posts from the Posts Table view were converted I moved to the next page and repeated the process. This semi-automated process helps prevent "bugs" or perhaps random server spikes. I was running this on my own private cloud server with little resources. Surprisingly saving 20 posts at once was possible without any crashes. I did not have any bugs or issues. Thank you for creating this plugin!
أبريل 2, 2024 2 replies
I have a load of old posts and pages done in the original WP editor which desperately needed converting to blocks in order to play nicely with a child theme I was working on. We know the block editor has the facility to go through posts/pages one-by-one and convert to blocks - but this is painful.... This plugin seems to do that job for you, but silently in the background. Once I'd activated it and saved the settings, nothing happened....at least, not visually. It was only when I started to look at the entries made in the legacy editor that I could see they had been converted to block format - silently! The only improvement I can suggest is a message on the plug-in interface page which says something like, "when you have ticked the checkboxes, press the save button and your conversion will commence as a background task." I don't know if that would make sense in keeping with the way the plug-in works. I only have a couple of hundred posts so it did the job quickly. I don't know how it would perform on a site with thousands of old posts in legacy editor format. Either way, thanks to the author for saving me the time.
نونبر 6, 2023 2 replies
Very good plugin, which helps to migrate a lot of posts. We have a project with ~8000 posts, which needs to be converted. Only standard text and images... Unfortunatly WordPress itself is pushing Gutenberg, but not providing tools for this task. This plugin is helping a lot. Basically it opens the browser, clicks the button, saves the post, opens the next post ... A quite clever solution, which unfortunately is slow and sometimes breaks.. Means you have to monitor the task and reload the tab from time to time...
يونيو 8, 2023 1 reply
This is the only plugin that is actively maintained and gets the job done. I see that in the next revision it will receive basic settings on which post types it works on, but until then, read the support for the solution to the problem that you have lost Gutenberg on all custom post types.
Read all 7 reviews

Contributors & Developers

“Convert to Blocks” is open source software. The following people have contributed to this plugin.

Contributors

“Convert to Blocks” has been translated into 3 locales. Thank you to the translators for their contributions.

Translate “Convert to Blocks” into your language.

Interested in development?

Browse the code, check out the SVN repository, or subscribe to the development log by RSS.

Changelog

1.2.2 – 2023-10-16

1.2.1 – 2023-07-26

1.2.0 – 2023-06-27

Note that this release bumps the WordPress minimum version from 5.7 to 6.1 and the PHP minimum version from 7.4 to 8.0.

1.1.1 – 2023-01-05

Note that this version bumps the minimum PHP version from 7.0 to 7.4 and the minimum WordPress version from 5.4 to 5.7.

  • Added: Bulk migration demo to readme (props @jeffpaul, @dsawardekar via #79).
  • Added: Release build GitHub Action to build a release zip used for testing (props @dkotter via #98).
  • Changed: Bump WordPress minimum version from 5.4 to 5.7 and PHP minimum version from 7.0 to 7.4 (props @zamanq, @jeffpaul, @faisal-alvi, @mehul0810 via #80).
  • Changed: Bump WordPress “tested up to” version to 6.1 props @peterwilsoncc, @faisal-alvi, @cadic via #88, #91).
  • Removed: is-svg as it is no longer used after updating ancestor dependency postcss-svgo (props @dependabot via #85).
  • Fixed: WP-CLI helptext that is causing an unknown parameter error (props @dsawardekar, @jeffpaul, @norcross via #78).
  • Security: Bump socket.io-parser from 3.2.0 to 4.2.1 and browser-sync from 2.26.7 to 2.27.10 (props @dependabot via #81).
  • Security: Bump minimatch from 3.0.4 to 3.1.2 (props @dependabot via #82).
  • Security: Bump nth-check from 1.0.2 to 2.1.1 and cssnano from 4.1.10 to 5.1.14 (props @dependabot via #84).
  • Security: Bump postcss-svgo from 4.0.2 to 4.0.3 (props @dependabot via #85).
  • Security: Bump minimist from 1.2.0 to 1.2.7 and mkdirp from 0.5.1 to 0.5.6 (props @dependabot via #86).
  • Security: Bump loader-utils from 1.2.3 to 1.4.2 and webpack-cli from 3.3.10 to 3.3.12 (props @dependabot via #89).
  • Security: Bump glob-parent from 5.1.0 to 5.1.2 and watchpack from 1.6.0 to 1.7.5 (props @dependabot via #90).
  • Security: Bump kind-of from 6.0.2 to 6.0.3 (props @dependabot via #93).
  • Security: Bump serialize-javascript from 2.1.2 to 4.0.0 and terser-webpack-plugin from 1.4.3 to 1.4.5 (props @dependabot via #94).
  • Security: Bump engine.io from 6.2.0 to 6.2.1 (props @dependabot via #95).
  • Security: Bump decode-uri-component from 0.2.0 to 0.2.2 (props @dependabot via #97).

1.1.0 – 2022-07-27

1.0.2 – 2021-07-12

  • Changed: Bump WordPress version “tested up to” 5.8 (props @psorensen, @BBerg10up, @jeffpaul).
  • Changed: Documentation updates (props @hashimwarren).
  • Fixed: Transform Classic Editor blocks nested inside other blocks recursively (props @dsawardekar, @MadtownLems, @dinhtungdu, @jeffpaul).
  • Fixed: Add Editor column to all supported post types (props @dinhtungdu, @scarne).
  • Fixed: Display current editor for hierarchical posts (props @kreppar).
  • Security: Bump elliptic from 6.5.3 to 6.5.4 (props @dependabot).
  • Security: Bump y18n from 3.2.1 to 3.2.2 (@dependabot](https://github.com/apps/dependabot)).
  • Security: Bump ssri from 6.0.1 to 6.0.2 (props @dependabot).
  • Security: Bump lodash from 4.17.20 to 4.17.21 (props @dependabot).
  • Security: Bump hosted-git-info from 2.7.1 to 2.8.9 (props @dependabot).
  • Security: Bump browserslist from 4.8.3 to 4.16.5 (props @dependabot).
  • Security: Bump postcss from 7.0.14 to 7.0.36 (props @dependabot).
  • Security: Bump color-string from 1.5.3 to 1.5.5 (props @dependabot).

1.0.1 – 2021-02-08

1.0.0 – 2020-09-23

  • Initial release of Convert to Blocks.