Convert to Blocks

Description

Convert to Blocks est une extension WordPress qui transforme le contenu de l’éditeur classique en blocs à la volée. Après avoir installé Gutenberg ou mis à jour vers WordPress 5.0+, votre contenu sera affiché dans des « Blocs de l’Éditeur Classique ». Bien que ces blocs soient entièrement fonctionnels et s’affichent correctement sur l’interface publique de votre site, ils ne permettent pas aux éditeurs de profiter pleinement de l’expérience de modification par blocs. Afin de le faire, vos publications de l’éditeur classique doivent être converties en blocs. Cette extension le fait pour vous « à la volée ». Lorsqu’un éditeur modifie une publication classique, le contenu sera analysé en blocs. Lorsque l’éditeur enregistre la publication, la nouvelle structure sera enregistrée dans la base de données. Cette stratégie réduit le risque car vous ne modifiez que les valeurs de la base de données pour le contenu qui doit être changé.

Notez que les transformations des blocs internes sont uniquement prises en charge avec l’extension Gutenberg 10.9.0+.

Captures d’écrans

  • La migration en masse Ă  l’aide de la commande WP-CLI wp convert-to-blocks start qui convertit les publications de manière itĂ©rative dans le navigateur sans nĂ©cessiter d’intervention manuelle.

Installation

Installation manuelle

  1. Téléversez l’intégralité du répertoire /convert-to-blocks dans le répertoire /wp-content/plugins/.
  2. Activez Convert to Blocks via le menu « Extensions » dans WordPress.

FAQ

Comment savoir si ça fonctionne ?

Trouvez un éditeur classique dans la publication, essayez de naviguer loin de la page. Vous recevrez une erreur indiquant que vos modifications seront perdues. Cela est dû au fait que Convert to Blocks a converti votre contenu en blocs à la volée et ces modifications seront enregistrées lorsque vous mettrez à jour la publication.

Est-ce que Convert to Blocks gère mes blocs personnalisés ?

Par défaut, il ne le fera pas.

Est-ce que Convert to Blocks gère les blocs imbriqués ?

Le support des blocs imbriqués/internes ne fonctionne pas avec Gutenberg inclus dans le cœur de WordPress <=5.7.2. Cette fonctionnalité nécessite l’extension Gutenberg >=10.9.0.

Avis

14 mai 2025 1 réponse
You might wonder why you need this plugin when the « Convert to blocks » button is right there at the top of every Classic block. Well, click that and it will eff up any images you had using the <figure class= »alignleft »> (or alignright) code. The default WP « convert to blocks » strips out the figure code entirely and POOF your alignment class is gone and your caption is off god knows where. But not this plugin! Add this and when you open your classic page in the block editor, it preserves the figure tag and alignment class. Saved me having to redo image settings on 600 post. Thank you 10up.
12 mars 2025 1 réponse
All this does is convert posts into HTML blocks, same as happens if you manually tell WordPress to convert a classic HTML post to blocks. Ok, it saves a single mouse click… why install a plugin to save one mouse click?
20 mai 2024 1 réponse
When you run a command and open a URL, the browser opens articles one after another and converts them into blocks. It magically automatically converts blocks quickly and accurately.
9 avril 2024 1 réponse
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 avril 2024 2 réponses
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 novembre 2023 2 réponses
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…
Lire les 10 avis

Contributeurs/contributrices & développeurs/développeuses

« Convert to Blocks » est un logiciel libre. Les personnes suivantes ont contribué à cette extension.

Contributeurs

“Convert to Blocks” a Ă©tĂ© traduit dans 7 locales. Remerciez l’équipe de traduction pour ses contributions.

Traduisez « Convert to Blocks » dans votre langue.

Le développement vous intéresse ?

Parcourir le code, consulter le SVN dépôt, ou s’inscrire au journal de développement par RSS.

Journal des modifications

1.3.4 – 2025-07-15

1.3.3 – 2025-07-14

  • Added: Link to settings page from the plugin list page (props @badasswp, @dkotter via #195).
  • Changed: Bump WordPress « tested up to » version 6.8 (props @jeffpaul via #199, #200).
  • Changed: Bump WordPress minimum supported version to 6.6 (props @jeffpaul via #199, #200).
  • Fixed: Fix PHP warning due to undefined array key (props @sksaju, @dkotter via #202).
  • Fixed: i18n functions being called too early, causing PHP Notices (props @stormrockwell, @dkotter, @dsawardekar via #203).
  • Security: Bump cookie from 0.4.2 to 0.7.1, express from 4.21.0 to 4.21.2, @wordpress/e2e-test-utils-playwright from 1.7.0 to 1.18.0, serialize-javascript from 6.0.0 to 6.0.2 and mocha from 10.4.0 to 11.1.0 (props @dependabot, @Sidsector9 via #194).
  • Security: Bump axios from 1.7.4 to 1.8.3 (props @dependabot, @iamdharmesh via #196).
  • Security: Bump http-proxy-middleware from 2.0.6 to 2.0.9 and tar-fs from 3.0.8 to 3.1.0 (props @dependabot, @dkotter via #206).

1.3.2 – 2025-02-03

1.3.1 – 2024-08-20

1.3.0 – 2024-05-14

View historical changelog details here.