Title: Remove broken gutenberg code from posts?
Last modified: June 22, 2019

---

# Remove broken gutenberg code from posts?

 *  [Treebeard](https://wordpress.org/support/users/malawimama/)
 * (@malawimama)
 * [6 years, 10 months ago](https://wordpress.org/support/topic/remove-broken-gutenberg-code-from-posts/)
 * We imported blog posts into a new site using the Tools > Export WordPress option,
   and when we imported it to the new site the posts were blank on the Categories
   pages – no excerpts at all.
 * Checked the posts, and it shows all these weird div tags and comments that shouldn’t
   be there – so we then realized the old site must have been using Gutenberg editor.
   So we don’t like Gutenberg, we only use Classic.
 * How do we get all this code out of the database easily?
 * <!– wp:paragraph –>
    <!– wp:image {“id”:5439,”align”:”center”,”width”:594,”height”:
   297,”linkDestination”:”media”} –> <div class=”wp-block-image”>
 * etc. etc. etc.
 * Want it all GONE.
 * Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Thread Starter [Treebeard](https://wordpress.org/support/users/malawimama/)
 * (@malawimama)
 * [6 years, 10 months ago](https://wordpress.org/support/topic/remove-broken-gutenberg-code-from-posts/#post-11665013)
 * Update – I think the import broke all the posts somehow because I tried deactivating
   Classic editor, and testing using Twenty Nineteen theme, and they’re still blank.
   Titles are there, but no excerpts. And the full articles are there too, so it’s
   just the blog categories that have this issue.
 *  Thread Starter [Treebeard](https://wordpress.org/support/users/malawimama/)
 * (@malawimama)
 * [6 years, 10 months ago](https://wordpress.org/support/topic/remove-broken-gutenberg-code-from-posts/#post-11665196)
 * Solved: replaced my old get_the_excerpt code with wp_trim_words but it was very
   strange since the Twenty Nineteen theme should have loaded all those excerpts.
   Anyway, if anyone does know of a way to delete those weird comments and divs 
   from the database, that would be cool.
 *  [taratabrizi](https://wordpress.org/support/users/taratabrizi/)
 * (@taratabrizi)
 * [6 years, 10 months ago](https://wordpress.org/support/topic/remove-broken-gutenberg-code-from-posts/#post-11697931)
 * Hi there,
 * Glad to see that you were able to solve some of the issues you were dealing with.
 * Unfortunately, there isn’t really a quick way to remove the Gutenberg comment
   tags. You’d have to remove them post by post. They’re simply present to let the
   software know that those posts were created with Gutenberg blocks. Therefore,
   they are going to continue to be a part of the code even if you switch to the
   Classic Editor. Because of this, they would have to be manually removed one by
   one in the HTML tab of each post.
 * Additionally, if any of this is showing on the front-end, that means those particular
   Gutenberg blocks aren’t compatible with the Classic Editor. You would need to
   re-add the content and remove the broken code.
 * Sorry that was probably not the solution you were hoping for, but I hope it helps
   answer your question!

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Remove broken gutenberg code from posts?’ is closed to new replies.

 * ![](https://ps.w.org/gutenberg/assets/icon-256x256.jpg?rev=1776042)
 * [Gutenberg](https://wordpress.org/plugins/gutenberg/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/gutenberg/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/gutenberg/)
 * [Active Topics](https://wordpress.org/support/plugin/gutenberg/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/gutenberg/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/gutenberg/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [taratabrizi](https://wordpress.org/support/users/taratabrizi/)
 * Last activity: [6 years, 10 months ago](https://wordpress.org/support/topic/remove-broken-gutenberg-code-from-posts/#post-11697931)
 * Status: not resolved