The WordPress Full Site Editor provides a powerful way to customize your site’s appearance and functionality. However, understanding where these changes are stored can be a bit confusing. In this guide, we’ll break down the storage of modifications made in the Full Site Editor, addressing concerns raised in a recent discussion.

Where Are the Settings Stored?

The original question in the discussion raised concerns about the storage location of changes made in the Full Site Editor. Contrary to common belief, the settings are not directly stored in the theme.json file. Let’s clarify how modifications are stored based on different types of changes.

Template Modifications

When you make changes to templates in the Full Site Editor, the new HTML of the template is saved as a custom post type with the name wp_template. This post type is then used instead of the version stored in the theme directory. Similarly, modifications to template parts are stored as a custom post type with the name wp_template_part.

Global Styles Modifications

For changes to global styles, specifically the styles and settings properties in theme.json, they are copied to the database. This information is stored as a post with the wp_global_styles post type. Your modifications are applied to this copy, ensuring that your global styles persist across the site.

A user in the discussion also pointed out that they found these changes by searching for wp_global_styles in phpMyAdmin, a popular database management tool.

The Reason for Database Storage

One user in the discussion asked why global styles changes are written to the database and not directly to the theme.json file. There are a few reasons for this approach:

  1. Performance: Reading and writing from files can be slower compared to database operations. Storing changes in the database allows for quicker retrieval and application of styles.
  2. Theme Updates: Theme files are often overwritten during updates. Storing modifications in the database ensures that your changes persist even after a theme update.
  3. Resetting to Defaults: Storing in the database makes it possible to reset styles to defaults if needed, providing flexibility for site administrators.

Additional Insight from Comments

The discussion’s comments provided some additional helpful information:

Understanding where and how modifications are stored in WordPress can empower users to make informed decisions when customizing their sites through the Full Site Editor.

Leave a Reply

Your email address will not be published. Required fields are marked *