ACF Blocks moving to JSON for much better performance.

Overview

Since ACF 6.0, ACF Blocks are registered by using the standard native WordPress function, register_block_type() which loads a block.json file containing all your configuration. ACF hooks into block.json by reading the acf key in the JSON which should be an object of ACF specific configuration. The main configuration keys for block.json are described in the WordPress documentation, but our specific ACF configuration is detailed below.

The move to JSON storage for ACF blocks in WordPress was done to improve the performance and flexibility of the blocks.

Prior to the move to JSON storage, ACF blocks were stored as post meta in the database, which could become cluttered and slow down the site over time. Storing blocks as JSON in the WordPress post content allows for faster and more efficient data retrieval, as well as improved version control and collaboration.

Additionally, JSON storage allows for more flexible and scalable data structures, making it easier to manage and manipulate block data. This can be especially useful for complex blocks with multiple fields and nested data structures.

Overall, the move to JSON storage for ACF blocks provides a more efficient and flexible way to store and retrieve block data, leading to improved performance and a better user experience for WordPress sites using ACF blocks.

Important Steps after update Scripts Organizer – ACF Gutenberg Addon to 1.4.0

Go to the Scripts Organizer > ACF Blocks > Press “Regenerate All ACF Blocks”

This is a huge update so we are recommending to do backup before update.

acf regenerate

After process is done you will get confirmation message

acf blocks notification

And you are done.

You don’t need to do anything else as we done everything for you. Inside wp-content/upload/scripts-organizer/ we created new folder called blocks. All ACF blocks are regenerated and got their own JSON file.

screenshot 2023 02 28 at 10.49.00

Still don’t have ACF Blocks Addon?