Skip to navigation
Block themes flow
20.10.26
If you stay file-first and don't edit anything in the Site Editor, you do not need to touch the database at all. How this works For block themes, WordPress has a simple resolution order: Theme files are the default - If your theme has templates/index.html, templates/single.html, templates/page.html, etc., WordPress will load those directly from disk. Database only comes into play if you customize - The wp_template and wp_template_part post types are only populated when you create or edit templates/parts in Appearance > Editor and save them. Those DB entries will override the theme file for that specific site. No automatic DB writes - Just installing a fresh block theme and creating pages/posts will not write templates to the database. It will just use the files that come with your theme. What this means for you New + unedited = file-based. You can build your entire theme in files (templates/, parts/, theme.json) and ship/distribute it without worrying about database state. No overwrites needed. You don't have to "export" anything or sync DB changes if you never use the editor to override templates. Caution only if you edit. The moment you go into the Site Editor and hit save on a template, WordPress will clone that template to the DB and from then on use that DB copy instead of your file. If you want to go back to the file version, you'd need to clear that DB override (e.g. via Create Block Theme or manually deleting the wp_template post). So for a clean start where you want to keep everything version controllable, the plan is simple: define everything in theme files and avoid saving overrides in the Site Editor. That's perfectly fine and is the intended workflow for distributing themes.
Reply
Anonymous
Information Epoch 1792686588
Data dominates.
Home
Notebook
Contact us