How to Export and Import WordPress Gutenberg Blocks

Ever since its inception, WordPress has been constantly changing in order to provide a better experience to its users. While a lot of those changes were met with praise, some changes were less popular. Upon its release, the new Gutenberg Editor was met with mixed reception from the WordPress community, to say the least. Many found it inconvenient to use and a poor substitute for the Classic Editor. As controversial as it was, Gutenberg also has features such as HTML blocks and Table of Contents that can make your WordPress experience much easier. One of the lesser known features that came with the new editor is the ability to export and import WordPress Gutenberg blocks.
With this feature, you can create your own custom blocks that can be reused, exported, and imported to your heart’s content. You can, for example, create a WordPress Gutenberg block containing a Disclaimer and just insert it whenever you need one. This way, you won’t have to rewrite it again and again. It is extremely easy to use and can save you a ton of time when done effectively.
1. How to Export WordPress Gutenberg Blocks?
It’s actually really easy to add a Gutenberg block to Reusable Blocks. Just click on the three vertical dots to bring up the ‘More Options’ menu and click on ‘Add to Reusable Blocks’.
In order to export the block, you will first need to click on the ‘Add Block’ icon on the top-right. Scroll down from here to open the option labeled Reusable. From here, simply click on ‘Manage All Reusable Blocks’ which brings you to the Blocks page where all the saved reusable blocks are listed.
All you need to do to export a block is to hover your mouse over it and click on ‘Export as JSON’. Afterward, just save the .json file where you want it. This file basically contains all the information from that block. Now that you have this file, it can be used to import WordPress Gutenberg blocks.
2. How to Import WordPress Gutenberg Blocks?
Now you can easily import this block from any WordPress site you want. To import it, you’ll first have to navigate to the blocks page from the other site. From there, just click on the ‘Import from JSON’ button at the top. Now navigate to where your file was saved and upload it. Finally, click on Import and wait for WordPress to finish importing your block. If you reload the page, you will see it listed among the other reusable blocks here.
This way, you can export your reusable blocks anywhere you want. Now you can insert this block into your posts like any other reusable block.
To Conclude
As you can see, the new block editor does have its advantages and can be quite helpful in certain cases. It is actually quite easy to export and import WordPress Gutenberg Blocks. With just a few clicks, you can save yourself the trouble of typing an entire block from scratch. Not only that, you can do it across multiple sites as well. Once you start using this feature, you won’t have to face the hassle caused by repetitive content ever again. If you have any further questions, please leave us a comment to let us know.
If you found this article helpful, why not take a look at more of our useful guides?
- How To Disable Gutenberg and Switch To The Classic WordPress Editor?
- Beginner’s Guide To Create a WordPress Helpdesk on Your Website!
- How To Upload PDF files on your WordPress website?