How to Batch Convert Gutenberg post to Classic post?

You probably can’t, or at least it is not going to be easy and will not result with the savings you want.

As gutenberg do not have separation between content and meta data about the content you will have to parse the current content to strip the meta data from the content and store it in some other place, but even then you will still need to do some output based on the meta data and since the document was editted with gutenberg based front end effects the most likely result will be the same “bloated” HTML CSS and JS as gutenberg does.

The right way to think about gutenber is as a fancy UI to manage shortcodes in documents. Any one that has any experiance with documents which have an excessive number of shortcodes know that it is not trivial to remove them. Maybe if you have mostly text you can remove the gutenberg dependencies but if you have many article it is probably hard to be sure which ones do not use any gutenberg features.

The way forward:

  1. Call the posts that were already done with gutenberg as a “sunk cost” admit to yourself you will keep editting them with gutenberg until the end of time.
  2. Use some taxonomy term or add meta field to all those posts. Write a plugin that disables gutenberg for all posts that do not have that term associated with them
  3. Rewrite the content of the posts in which the bloat actually matters (can’t be that all your posts have to have a score of 90+) and remove the association with the term from them