How To Convert Blocks In WordPress

Convert blocks in WordPress

WordPress blocks are a great way to add custom content to your website. In this article, we’ll show you how to convert certain types of block content from one form to another. This will allow you to add and mix different types of content in WordPress, regardless of the origin.

Convert To Blocks

Whether you have recently switched from the classic editor to the Gutenberg editor, or you are editing content that was written previously in the classic editor, you can easily convert content into blocks.

This is extremely useful if you prefer to write in HTML, Markdown, or something outside of the WordPress editor. There is an easy “convert to blocks” option you can use for this. By converting into blocks, you can ensure consistency. Read to learn how this conversion process works.

Convert Classic Editor To Blocks

If you have an existing classic editor block in use in a post or page, you can easily and quickly convert that classic editor to blocks following the steps below:

  1. Log in to the WordPress dashboard
  2. Select a post to edit or create new content
  3. Select the area of text you want to convert to blocks
  4. Click the Convert to blocks button in the toolbar
    Convert to blocks

Troubleshooting Problems When Converting from Classic to Blocks

In some cases, you may be trying to convert blocks, but it will report that there were problems and the block conversion may not work. The easiest way to resolve this is to convert your old post by simply copying out pieces of the post a little bit at a time.

Eventually, you may find the cause of the block conversion conflict, and then you will need to decide what block the content will need to fit into. In many cases, you may have to manually add the content using a block or add-on block.

In rare cases, you may need to re-build or re-create the content into something that works with the blocks in your WordPress site.

Steps to Convert Large Classic Blocks Using Pieces

Before you convert a large post into the Block format, it is important that the overall WordPress version that you’re working in is up-to-date. Also, make sure that you have a backup of the post before making any changes.

  1. Open the post that you want to convert.
  2. Create a block at the top of the article.


    Add block to start

    You may need to use list view to help you see the blocks in place. Since the article is still mostly in the classic format, then you should see mainly the classic block.

    The screenshot above shows the paragraph block added before the classic block.
  3. Copy the content into the block. Your block should match the content you’re copying.

    You should do this piece-by-piece depending on the content you’re copying. If your first content item is a heading, then you should copy the heading into the paragraph block and covert the block into a header. You can also add the block type before you paste the content.

    Converting classic content to block format

  4. Add a block immediately after your last one. In the screenshot above you can see a paragraph, then a heading, then a paragraph in the list view.
  5. Copy the next paragraph or content type in the classic format into your block. Keep repeating this process until you have completely finished converting the entire post.
  6. When you’re done, go into the list view and find the classic block. Click on the vertical 3-dot menu and then click on Remove Block.
  7. Save your changes by clicking on Save as Draft, Publish, or Update.

Convert Blocks to Classic

Now we’re going to go in the opposite direction. What if you have a series of blocks and you want to convert them to the classic editor. There are a few different ways to do this. Two methods are described below:

Install The Classic Editor Plugin

If you have a lot of block content on your site and want a grand solution to convert all of it to the classic editor, the easiest way to accomplish that is to use a plugin. Check out our full guide on how to install the classic editor plugin.

Paste Blocks Into Classic Editor

Another easy way to get blocks into the classic editor on a single post basis is to easily copy and paste blocks into a classic editor block.

You create a classic editor block in the same way that you can create any other block. This block gives you a complete classic editor with the toolbar. Once you have created this block, all you need to do is paste the block content into it:

Add classic block

Convert HTML To Blocks

If you prefer to compose in HTML, or your text editor exports content as HTML, you can easily convert this raw code into convenient, easily editable WordPress blocks following the steps below:

  1. Select a post or page to edit
  2. Create an HTML block (if you don’t have one already)
  3. Select convert to blocks under the dropdown menu
    Convert HTML to blocks

Convert Blocks To HTML

Now, in the reverse of the above, you can also convert block content into HTML. Why would you want to do this? If your origin platform, wherever you like to compose content, only accepts plain text, it helps to be able to get your block content in text form. This way you can easily retrieve and edit the content for future posts and make the conversion to block process smoother.

In order to get the plain text version of your WordPress block, all you need to do is compose your block in the WordPress editor and copy it. When you pass the text into any plain text editor you will see the raw block code, which you can save and reuse in your local editor.


Well done! You now know a few different ways to convert various blocks into other kinds of blocks. If you have any questions or comments about these procedures feel free to drop a comment below or reach out to our live support team 24/7. We’re always happy to help.

If you’re looking for tutorials like this one, check our articles on WordPress Blocks!

Looking for more guides? We have over 400 WordPress How To Articles to help you!

CM
Christopher Maiorana Content Writer II

Christopher Maiorana joined the InMotion community team in 2015 and regularly dispenses tips and tricks in the Support Center, Community Q&A, and the InMotion Hosting Blog.

More Articles by Christopher

Was this article helpful? Join the conversation!