BricksSync documentation

Description

BricksSync is a powerful tool for synchronizing and migrating Bricks Builder global settings and templates between different WordPress installations. It uses Git-friendly JSON files, making it ideal for team development, staging/production workflows, and robust backup strategies. BricksSync supports both manual and automated sync via WP Cron, and integrates with WP-CLI for advanced or scripted workflows.

Features

  • Export Bricks Builder global settings to a JSON file for backup or migration.
  • Import Bricks Builder global settings from a JSON file.
  • Export Bricks Builder templates (individually or all) to JSON files.
  • Import Bricks Builder templates from JSON files.
  • Choose where JSON files are stored: Child Theme, Uploads Folder, or a custom path.
  • Multiple sync modes:
    • Manual Only: No automatic import/export.
    • Automatic Import Only: Automatically imports if files change.
    • Automatic Export Only: Automatically exports when changes occur.
    • Full Automatic Sync: Imports then exports (use with caution).
  • Granular configuration for file naming, subdirectories, and exclusion options.
  • WP-CLI integration for automated, repeatable, or advanced workflows.
  • Debug tab with real-time log viewer, log clearing, and logging toggle.
  • Option to disable licensing checks via constant (for development or testing).
  • Cron support for scheduled sync and automation.
  • Automatic creation of .htaccess to block direct JSON access (for Apache).
  • Security recommendations for Nginx and lighttpd.
  • Troubleshooting and detailed logging for all major operations.

Requirements

  • WordPress (latest version recommended)
  • Bricks Builder Theme (latest version recommended)
  • PHP 8.0 or higher

Recommended

  • Use a Child Theme for best results and Git-based workflows.

Installation

  1. Download the BricksSync plugin .zip file from BricksSync.com.
  2. Log in to your WordPress admin area.
  3. Go to Plugins > Add New.
  4. Click “Upload Plugin” and select the brickssync.zip file.
  5. Click “Install Now” and then “Activate Plugin”.

Configuration

After activation, go to “Bricks > BricksSync” in your WordPress admin menu.

Templates Tab

  • Export Templates: Export all or selected templates to JSON files.
  • Import Templates: Import all or selected templates from JSON files (may update existing templates; always backup first!).

Bricks builder settings Tab

  • Export Settings: Save current global settings to JSON.
  • Import Settings: Load global settings from JSON (overwrites current settings; always backup first!).

Configuration Tab

  • Choose JSON storage location: Child Theme, Uploads Folder, or Custom Path.
  • Set file naming options for settings and templates.
  • Define JSON subdirectory name.
  • Exclude specific options from export (e.g., bricks_license_key).
  • Select sync mode:
    • Manual Only: No auto actions (default).
    • Automatic Import Only: Imports from storage path if files change.
    • Automatic Export Only: Exports current data to storage path.
    • Full Automatic Sync: Imports THEN Exports.
  • Enable or disable settings sync automation (useful if you want to automate template sync but manage settings manually).

Licensing Tab

  • Enter your license key and click “Activate License”.
  • View masked license details and activation status.
  • Deactivate license if needed.
  • If you want to disable licensing checks (for local development or secure environments), define the constant BRICKSSYNC_DISABLE_LICENSING in your wp-config.php.

Debug Tab

  • View the debug log in real-time.
  • Clear the debug log.
  • Toggle logging on or off for troubleshooting.

WP-CLI Integration

BricksSync provides a set of WP-CLI commands for managing Bricks Builder settings and templates from the command line.

Overview

  • Export/Import Bricks Builder settings
  • Export/Import Bricks templates
  • Configuration management
  • Status checking

Requirements

  • WP-CLI must be installed and available
  • Active BricksSync license for most operations
  • Appropriate file permissions for import/export

Available Commands

Settings Management

Export Settings

wp brickssync settings export [--output-file=<path>]

Exports all Bricks Builder settings to a JSON file. The file can be saved to a custom location or use the configured path.

  • --output-file: Path to export the JSON file. If not provided, uses the configured path and filename.

Examples:

wp brickssync settings export
wp brickssync settings export --output-file=/path/to/my-settings.json

Import Settings

wp brickssync settings import [--file=<path>]

Imports Bricks Builder settings from a JSON file. The file can be read from a custom location or the configured path.

  • --file: Path to the JSON file to import. If not provided, uses the configured path and filename.

Examples:

wp brickssync settings import
wp brickssync settings import --file=/path/to/import-settings.json

Template Management

List Templates

wp brickssync templates list [--format=<format>]

Displays a list of all Bricks templates with their details.

  • --format: Output format (tablejsoncsvyamlcount). Default: table.

Examples:

wp brickssync templates list
wp brickssync templates list --format=csv

Export Templates

wp brickssync templates export [--output-dir=<path>] [--templates=<ids>]

Exports selected or all Bricks templates to JSON files.

  • --output-dir: Directory to export templates to. If not provided, uses the configured path.
  • --templates: Comma-separated list of template IDs to export. If not provided, exports all templates.

Examples:

wp brickssync templates export
wp brickssync templates export --output-dir=/path/to/templates
wp brickssync templates export --templates=123,456

Import Templates

wp brickssync templates import [--input-dir=<path>]

Imports Bricks templates from JSON files in a directory.

  • --input-dir: Directory containing template JSON files. If not provided, uses the configured path.

Examples:

wp brickssync templates import
wp brickssync templates import --input-dir=/path/to/templates

Configuration

Show Configuration

wp brickssync config show [--format=<format>]

Displays the current BricksSync configuration settings.

  • --format: Output format (tablejsonyaml). Default: table.

Examples:

wp brickssync config show
wp brickssync config show --format=json

Status

Check Status

wp brickssync status [--format=<format>]

Displays the current status of BricksSync, including license status, storage path validation, and sync status.

  • --format: Output format (tablejsonyaml). Default: table.

Examples:

wp brickssync status
wp brickssync status --format=json

Features

  • Multiple output formats (table, JSON, CSV, YAML)
  • Custom file path support for imports/exports
  • License validation integration
  • Detailed status reporting
  • Error handling and logging
  • Automatic directory creation
  • Permission validation
  • Progress reporting

Error Handling

All commands include error handling and will display appropriate error messages if:

  • The license is inactive
  • File permissions are insufficient
  • Required files or directories are missing
  • Invalid parameters are provided

Notes

  • Most commands require an active BricksSync license
  • File paths should be absolute
  • The plugin must be properly configured before using these commands
  • Debug logging can be enabled for troubleshooting

Usage Scenarios

Manual Development GIT Workflow (Local → Staging → Production):

  1. Use Child Theme storage.
  2. Use Manual Only mode.
  3. Export locally.
  4. Commit generated JSON files to Git.
  5. Pull on Staging/Production.
  6. Import on Staging/Production and test.

Partially Automated GIT Workflow:

  1. Use Child Theme storage.
  2. Use Export Only on Local, Import Only on Staging/Production.
  3. Exports on template saving.
  4. Commit JSON files to Git.
  5. Pull and import automatically on Staging/Production when you are ready

Simple Backup:

  1. Use Uploads Folder storage.
  2. Use Manual or Auto Export mode.
  3. Export settings/templates to uploads folder.

Security

  • For Apache: .htaccess is created automatically to block direct access to JSON files.
  • For Nginx/lighttpd: Follow provided recommendations to secure JSON directories (see documentation).
  • For maximum security, consider storing JSON files outside the web root.
  • Never commit sensitive data (like license keys) to your repository.

Plugin Updates

  • BricksSync supports updates via the standard WordPress plugin updater when a valid license is active.
  • Always backup your settings and templates before updating.

Troubleshooting

  • Use the Debug tab to view and clear logs.
  • Ensure correct permissions for storage directories.
  • If licensing fails, check your key and internet connection.
  • If sync is not working, check the selected storage location and file permissions.

Changelog (Summary)

  • Security enhancements for JSON storage (including .htaccess and server recommendations).
  • Unified admin UI and improved error handling.
  • WP-CLI support for advanced workflows.
  • Option to disable licensing checks via constant.
  • See the full changelog in the plugin files for more details.
Review Your Cart
0
Add Coupon Code
Subtotal