Convert Existing Content into Blocks

What if your website has existing content which was written before the Block Editor came along? Or you have existing content and you want to migrate to a theme which supports the Block Editor.

Must You Convert Existing Content into Blocks?

You don’t HAVE to convert existing content into blocks – the page content will sit nicely protected within a Classic Block, and will continue to appear on the front end exactly as before.

It will look like this within the editor:-

Existing content in a classic block within the block editor

You can even edit the content within the classic block, without ever converting it into individual blocks. Just click into the Classic block and you will see the menu bar of the classic editor at the top of your block. You can add, delete and edit sentences and paragraphs, and use all of the classic formatting controls, just as before.

Editing existing content in a classic block within the block editor

How to Convert into Blocks

However, once you are familiar with the advantages in layout that come with using the block editor, you may well decide to convert a page into blocks before adding some new content.

Just click on the Convert to blocks option which appears when you click into that classic block. Conversion happens straight away, and you can usually see directly within the editor (before saving) whether the page content looks fine, or not.

Converting existing content into blocks within the block editor

Converting into blocks is a fairly simple process – however, be sure to look at the “converted” page in the front end, and be prepared to make some changes to correct any layout errors which may have cropped up.

A Few Gotchas

Even if it looks okay in the editor, it is always good practice to view the page on the front end to confirm that all is well.

Conversion to blocks is rarely troublesome, but there are some layouts which typically need a little correction, for example left- or right-aligned images, and galleries.

Left or Right Aligned Images

If you are inclined to include left- or right-aligned images within your content, these may well “fly off” to the side when converted into blocks.

Page with left-aligned image before converting to blocks, showing image sitting within the content width
BEFORE converting to blocks
Page with left-aligned image after converting to blocks, showing image sitting off to the left of the main content.
AFTER converting to blocks

Generally, if you don’t want the image to sit outside of your content flow, you will need to revisit this section. Insert a Group or Column block and move the image and its accompanying text inside, or perhaps rework the content into a Media & Text block.

Galleries and Other Specialised Content

Another potentially troublesome page is one which includes an image gallery, as the Block Editor gallery uses different HTML to produce the gallery layout. The most effective approach here is to recreate the gallery using the Gallery block, which offers a variety of additional layout and functional options and is likely to provide a superior result, as a reward for those efforts.

Converting into Blocks

In conclusion, converting page content into blocks is generally a quick and easy process. But always make sure to view the converted page, in the front end, in different browser sizes and on mobile. Occasionally, additional editing is needed to get the content looking right in blocks.