Meta Box Lite
Meta Box

Meta Box Local JSON: Faster, Smarter Field Management and Synchronization

Meta Box Local JSON: Faster, Smarter Field Management and Synchronization

Are you ready to experience a truly optimized workflow with Meta Box Local JSON? The local JSON feature for the field group has been officially released from MB Builder 4.10. By loading field configurations from JSON files as a priority instead of the database, this game-changing feature makes field management and synchronization faster, easier, and more efficient than ever.

Along with this feature, the interface also gets a few updates. Try it today and feel the difference!

What is Local JSON?

Recognizing the power of JSON files for configuration and data management, we introduced the feature to register blocks using block.json files last year. Today, local JSON takes it further by boosting performance and synchronization for your custom fields in Meta Box.

Local JSON is a mechanism for saving field groups’ essential information and settings as JSON files within your theme. It helps to prioritize loading the field group information from your theme (also meaning your local) instead of the database.

This brings many benefits to your web management:

  • Faster loading time: Local JSON helps reduce database queries, so your website's performance will be improved.
  • Effortless version control: Data is stored in JSON files so you can easily track and manage changes using version control systems like Git or other version control tools.
  • Seamless environment synchronization: Simply copy the JSON files to move the configurations of fields between staging, production, or other environments. As well as any changes will be detected and overwritten just by clicking. As a result, sharing and syncing become hassle-free.

Local JSON is especially effective for web-building teams, ensuring data consistency at all times. Even if your team includes members who prefer coding or working with a visual UI, they can all create, edit, and manage field groups with ease.

Setup Local JSON

To start using the local JSON feature, you need to create a new folder in your theme, named mb-json. It has to be writable by the server.

Create the mb-json folder in your theme

A New Optimal Way to Create a Field Group

Previously, you had two methods to have a field group: using code or using MB Builder with an intuitive interface. With the local JSON feature, there’s one more way: create a JSON file for the field group, then import it into the database.

For instance, I have a field group called Event Information with several fields like the below image.

An example of JSON file for creating a field group

Recommend: You should set the modified time to a Unix timestamp, then the version recognition may be more accurate since the version of the field group is based on the timestamp too.

Right after having a file in the folder, there is a new tab on the MB Builder interface named Sync available includes the JSON files that haven’t synced along with their paths.

A new tab on the MB Builder interface lists JSON files along with their paths

For the first time you use the Local JSON fields for any field group, look for the status of the wanted field group. There will be a Sync button there if the JSON file is totally new. Click on it to sync data immediately. Or, you can review it via the Review button before syncing. Then, that field group will be added with all the fields and their settings as stipulated in the JSON file.

Sync a JSON file to database

In the opposite direction, after having mb-json in your theme, every field group you publish in the database will be generated as a new JSON file automatically in that folder.

So, what are the benefits of this approach?

As you may know, working with JSON lets you quickly bulk-import or bulk-edit fields, change settings, or copy configurations. Therefore, this method helps you save time and effort while still having a visual UI when needed. As a result, your team collaboration is better, especially if there are both developers and those who prefer working with the interface.

Directly loading data from the JSON file makes your custom fields and website run faster and more stable.

Easy and Seamless Synchronization

The JSON Sync feature is the most powerful and essential feature of Meta Box local JSON. It means that you can create, configure, and edit a field group in both the Meta Box admin and JSON file without hassle, and then, data will be saved in both places.

JSON syncing empowers you to import field groups, review the changes, and sync data between JSON files and the database with just one click. In the case that there are two different versions of a field group, the JSON files are always given loading priority for the best performance.

The JSON files are always given loading priority for the best performance

Pay attention to the new column named Sync status column. It indicates whether the version of the field group in the JSON file matches the database. So, there are two statuses for it:

Synced: The version of the field group in the JSON file is the same as in the database. This state appears even when you change the field settings in the JSON file, as long as the version remains unchanged. So, anytime you edit the JSON file, don’t forget to update its modified time.

Sync available: This status appears when the field group is in one of the three cases below:

  1. The JSON file hasn’t been imported to the database. Just sync as normal.
  2. The field group was created with MB Builder before creating mb-json in your theme.
  3. The versions in two storages are different. You should review the changes and sync them to have a consistent version. Therefore, you can see two quick actions below the status, they are Sync and Review. When clicking on the Review button, there is a popup showing the difference between the field group version and data of both storages.

Status of sync and quick actions

In summary, if you edit the field settings in the JSON file, Meta Box local JSON allows you to review and sync changes.

The changes in database are synced in JSON file

Conversely, when you edit the field group in the database (on the UI as well), the JSON file will be updated automatically.

The changes in JSON file are updated in database

So, from now on, the field configurations will remain consistent and easy to manage. Whether where you are pushing changes from, this seamless synchronization process helps prevent version conflicts and keeps your workflow efficient and organized. With the added ability to review and confirm changes before applying them, you gain full control over your data and version management.

Other Improvements

Besides the highlight feature, Meta Box also supports JSON schema. It provides an even more optimized and developer-friendly workflow. In detail, JSON schema helps ensure data validity through suggestions and supporting autocompletion. Thanks to that, you can save time and effort significantly.

Moreover, we also simplified the JSON file format. It’s the same with field group registration. Improved readability and quicker editing are the key strengths of this format.

The JSON file format is simplified

All of these features are available in the MB Builder 4.10 version. You can update and experiencing the local JSON feature right now.

Last Words

Meta Box Local JSON is more than just a performance boost. It’s a game-changer for how you manage and synchronize custom field configurations. Our purpose is to improve for a better experience. This is also the request that we received from users.

You also can explore the sync feature of block.json to create, register, and sync your custom blocks.

Now, let’s update the newest version and explore this powerful feature. Feel free to comment on your thoughts or any requests you want. Thanks for reading.

How to Show Events on Calendar - Using MB Views

How to Show Events on Calendar - Using MB Views

If you're looking for a way to track and manage important events such as meetings, conferences, holidays, or personal tasks, showing them on the calendar is a brilliant idea. It is also an incredibly useful feature in many applications and information management systems. When events are visually displayed on a calendar, users can plan more efficiently and avoid redundancy or missing important activities.

Instead of adding a new plugin that can reduce the performance of the website, MB Views from Meta Box can help you display events on a calendar effortlessly and effectively.

Continue reading "How to Show Events on Calendar - Using MB Views"

How To Create A Custom 404 Page In Wordpress P5 Using Meta Box And Oxygen

How to Create a Custom 404 Page in WordPress - P5 - Using Meta Box and Oxygen

I noticed that some users would leave the site immediately after encountering the default error message, feeling frustrated. To improve their experience, I focused on designing a more user-friendly 404 page with helpful links and a friendly message to guide them back to the main content. This change led to increased on-site time and a more positive perception of my website.

Continue reading "How to Create a Custom 404 Page in WordPress - P5 - Using Meta Box and Oxygen"

New Dashboards - Better Experience

New Dashboard - Better Experience

During the product development process, the Meta Box team realized that the dashboard could make you feel overwhelmed and difficult to get on board with.

To enhance your experience with Meta Box, we want to bring a clearer and more effective admin dashboard. And today, a brand-new Meta Box dashboard is ready to make your workflow more convenient with:

  • Quickly find anything you need.
  • Effortlessly start creating dynamic content.
  • Instantly access helpful video tutorials.

Continue reading "New Dashboard - Better Experience"

How to Create a Bio Page - Using MB Settings Page and MB Views

How to Create a Bio Page - Using MB Settings Page and MB Views

A bio page is useful for personal websites, portfolios, and sponsor information. It not only provides information fully but also shows them in the cleanest way to catch everything. So, let’s figure out how to create it showing the contact information of someone. It’s a piece of cake if you use the MB Settings Page and MB Views from Meta Box.

Continue reading "How to Create a Bio Page - Using MB Settings Page and MB Views"

Meta Box Aio Includes Framework One Plugin, Full Power

Meta Box AIO Now Includes Meta Box - One Plugin, Full Power!

The launch of Meta Box Lite marks a major step forward in the development of Meta Box. This product combines both the framework and essential features into an easy installation step.

Understanding the convenience of this all-in-one solution, today we’re thrilled to announce that the Meta Box framework is included in Meta Box AIO now.

Continue reading "Meta Box AIO Now Includes Meta Box - One Plugin, Full Power!"

How To Create A Pricing Table Page P1 Using Meta Box And Breakdance

How to Create a Pricing Table Page - P2 - Using Meta Box and Bricks

If your products come with multiple pricing plans rather than just one, a well-structured pricing table page is a smart way to showcase your offerings.

You can also separate the pricing table into a dedicated page or make it to be a section of any page. It’s a piece of cake with the help of a combination of Meta Box and Bricks.

Continue reading "How to Create a Pricing Table Page - P2 - Using Meta Box and Bricks"

A New UI is Coming - MB Builder 5.0.0 Alpha

A New UI is Coming - MB Builder 5.0.0 Alpha

New year, new experiences!

We (Meta Box team) heard whispers many times that you want a more intuitive and modern UI. Over the past year, we've been thinking, researching, and figuring out ways to have a new layout for the Meta Box's interface. The most important thing is how the interface can help you interact in the most efficient way while keeping the native and minimalist style.

Although we did some changes in the UI in the past year, that's some small things and is not all. We’ve prepared for this big move for a long time!

A totally new UI which is completely different from the old one is coming in an alpha version!

Continue reading "A New UI is Coming - MB Builder 5.0.0 Alpha"