The Downsides Of Block Themes

This article is part of the WordPress guide. Read the introduction.

Table of Contents

Block themes may seem pretty great, but they are not all rainbows and sunshine. They are brilliant if you’re a blogger and want to have a simple, static site, but they break down on more complex projects.

The most obvious problem is the loss of direct programmatic control. Templates are not PHP files, they are HTML markup. With classic themes, if you want to display some text dynamically based on whether the user is logged in, you just use if ( is_user_logged_in() ). You can’t use that in HTML.

Adding any dynamic data is complex. Achieving what used to take a few lines of PHP, now usually requires developing a custom dynamic block. That’s a plugin you have to create (or install) to display a stupid “Hi, {name}.”. The WordPress team is actively trying to solve this problem, with the Block Bindings API being a recent major step forward. However, the functionality is arguably not yet mature enough for complex commercial use.

A few issues spring up from the increased importance of the database. It used to be the case that the database was meant to store the data and the theme was responsible for displaying that data. This is not the case anymore, as Full Site Editing means the templates are stored in the database.

This proves problematic, especially in professional settings. How do you version control a database? It’s not like you can use it with git to track your changes. You’re stuck with the built-in revision system. An even better question is: how do you push your changes from staging to production?

You can copy the modified markup and manually paste it in the code editor on the production site, but that’s brittle and annoying. You can export your theme every time you make a change and install it on production, but then you’re overriding the base theme, and you better pray your user(s) don’t make any changes in the Site Editor. You can try syncing the database, maybe even partially, but that’s dangerous and creates a whole new set of data syncing problems.

Last but not least, you have to remember that block themes and FSE are still under heavy development. The ecosystem is less mature than that of classic themes. Not all plugins are compatible. Major architectural changes can happen with every update, while the best practices are constantly being redefined. It’s an immature ecosystem, not fit for a project requiring stability.

Table of Contents