Importing Blocks
Import a block definition JSON file on any WordPress site running BF Blocks. Existing blocks with the same slug can be selectively overwritten or kept.
UI Import
- Navigate to BF Blocks → Import.
- Click Choose File and select your JSON file.
- Review the list of blocks in the file.
- Choose which blocks to import (or select all).
- Click Import Blocks. Imported blocks appear in your BF Blocks library immediately.
Conflict Resolution
If a block in the import file has the same slug as an existing block, BF Blocks will prompt you to:
- Overwrite — replaces the existing block definition with the imported one.
- Keep existing — skips that block and keeps what's already on the site.
- Import as new — imports the block with a new slug (e.g. appends
-2).
CLI Import
# Import a single block wp bf-blocks import ./blocks/testimonial.json # Import all blocks in a directory wp bf-blocks import ./blocks/ # Import and overwrite existing blocks without prompting wp bf-blocks import ./blocks/ --force
Existing page content is unaffected
Importing a block (even with overwrite) only updates the block definition. Any pages already using the block will continue to use it — they won't be affected unless the field structure changes in a breaking way.