Description
BlockCode Exporter saves the block markup behind a WordPress post or page. A list export downloads the saved source unchanged, including block comments, settings, HTML, and whitespace.
Use Export block code in a Posts or Pages list to download the saved version. In the block editor, open the three-dot Options menu and choose Export block code to download what is currently in the editor, including unsaved changes. You can also copy the code to your clipboard.
For several posts or pages, select them in the list and choose Export block code from Bulk actions. The download is a ZIP with a separate file for each item.
Files use .html by default because WordPress block markup contains HTML. You can choose .md or .txt if those extensions suit your workflow. The content is the same in every format: choosing .md does not convert it to Markdown, and .html is not a complete rendered web page.
The plugin does not change your posts or send their content to another service. Exports include the block markup, not media files, theme styles, custom fields, or the content behind a synced-block reference.
Developed by George Zamfir.
Developer notes
List exports return the saved post_content unchanged unless a site uses the blockcode_exporter_content filter. Editor exports use the current block editor content and do not run that PHP filter. The blockcode_exporter_filename and blockcode_exporter_is_post_type_enabled filters apply to list exports. Filenames are sanitized after filtering, and list requests still require permission to edit each item.
Bulk exports are limited to 100 items and 20 MiB of source per request. ZIP filenames include post IDs to avoid collisions.
The GPL-licensed source and build instructions are included in the installation ZIP.
Screenshots





Installation
- In WordPress, go to Plugins > Add New > Upload Plugin and select the BlockCode Exporter ZIP.
- Install and activate the plugin.
- Open Posts or Pages and choose Export block code beneath an item, or open a post in the block editor and use its three-dot Options menu.
You need WordPress 6.6 or later and PHP 8.2 or later.
FAQ
-
What is in the downloaded file?
-
The file contains WordPress block markup, including block comments and HTML. It is not a rendered page. Open it in a text or code editor to inspect the source.
-
What is the difference between exporting from a list and from the editor?
-
The list action downloads the content last saved in WordPress. The editor action uses the content currently open in the editor, so it can include changes you have not saved yet. Bulk exports also use saved content.
-
Does the .md option create Markdown?
-
No.
.html,.md, and.txtcontain the same WordPress block markup. Only the filename extension changes. -
Can I use the file on another WordPress site?
-
You can paste the markup into the Code editor of another post or page. Check the result before saving: the destination site may use different blocks, styles, media URLs, or synced-block IDs. Those dependencies are not included in the file.
-
Which posts can I export?
-
Posts, pages, and supported custom post types are available when your account can edit the individual item. This includes drafts and private content you can edit. Attachments, revisions, and navigation items are excluded. A bulk export stops if the selection contains an item you cannot export.
-
Does the plugin keep a copy of my exports?
-
No. Downloads are sent to your browser. The plugin does not save an export history, change the original post, or contact an external service.
Reviews
There are no reviews for this plugin.
Contributors & Developers
“BlockCode Exporter” is open source software. The following people have contributed to this plugin.
ContributorsTranslate “BlockCode Exporter” into your language.
Interested in development?
Browse the code, check out the SVN repository, or subscribe to the development log by RSS.
Changelog
1.1.0
- Add an export dialog with filename, format, download, and clipboard options.
- Use
.htmlas the default extension;.mdand.txtremain available. - Export current content, including unsaved changes, from the block editor.
- Export several saved posts or pages as a ZIP from Bulk actions.
- Add interface translations for ten WordPress locales.
1.0.0
- First public release: download saved block markup from posts, pages, and supported custom post types.
