The “Export” feature in the Site Editor has been improved so that now you can export your whole theme, including all the edits you have made to your templates and styles. Previously the export function only gave you access to your template files. This change makes it possible to build a block Block is the abstract term used to describe units of markup that, composed together, form the content or layout of a webpage using the WordPress editor. The idea combines concepts of what in the past may have achieved with shortcodes, custom HTML, and embed discovery into a single consistent API and user experience. theme using the site editor and easily share the zip file with anyone.
The Export process
The export process copies all files from the current theme into a zip file. Then it extracts the template changes that are stored in the database to files and adds them to the zip file. If these templates have the same names as those in the theme, they will be overwritten, so that the database version takes precedence. The same process happens for the
theme.json file. There are three directories that are excluded from the export:
- The output of template files from the database will be sanitized for security reasons. You’re most likely to notice this with any CSS Cascading Style Sheets. variables in your template files: e.g.
--wp--custom--spacing--outer would become
- The properties in
theme.json are now sorted alphabetically, so the first time you export you might notice some of the objects in your
theme.json move position. This now gives us a standard order for these properties so in future it will be easy to know where everything should go.
- The schema may be updated – the export will update your
theme.json schema to match the version of WordPress you are using, so if you theme was created with an older version of WordPress, the schema will be updated to match the version you are on.
How to submit a theme
Once you have your exported theme, you may need to make several changes before you can submit it to the theme repository.
- The screenshot will need to be updated, if you’ve made any visual changes to the homepage.
- You will have to add a changelog entry to the
- You must update the version number of the theme in
- If this is a new theme, based on an existing theme, you will also need to update the name.
- If the theme doesn’t have a license file already you will need to add one.
- You will then need to rezip the theme with these changes.
- You can now submit the new zip file to https://wordpress.org/themes/getting-started/.
For more info see: