Auto Activate a Bricks Builder Multisite

Tech Articles | February 22, 2025 | Bricks Builder, Coding, GridPane, Hosting, Plugins, Wordpress

While creating a sandbox environment for people to test Webhook for Bricks Forms, I kept coming across issues: first, getting bricks to auto-activate and second, getting bricks to be the default theme for the installation.

No bricks have no inbuilt WP-Config key setup, but it does activate if it’s not activated and the key is in the database, so I decided the safest way to do this would be to issue an MU plugin for all multi sites that do exactly this update_option was chosen because it will create and update not just create and then I used the option name for the licence key from one of my activated installs

I used the WP_DEFAULT_THEME constant to set bricks as the desired theme and my multisite was working precisely as intended.

The code for the MU plugin is below

<?php
/**
 * Plugin Name:       Bricks Multi-Site Activator
 * Plugin URI:        https://github.com/stingray82/
 * Description:       Bricks Activation Lincence Ky
 * Version:           1.0
 * Author:            Stingray82
 * Author URI:        https://github.com/stingray82/
 * License:           GPL-2.0+
 * License URI:       http://www.gnu.org/licenses/gpl-2.0.txt
 * Text Domain:       bricks-activator
 * 
 */
update_option( 'bricks_license_key', 'XXXXXXXX' );
define('WP_DEFAULT_THEME', 'bricks');
PHP

You can watch the video about this project below:

Support the Author

buy me a coffee
Really Useful Plugin Logo
Appoligies for any spelling and grammer issue. As a dyslexic i need to rely on tools for this they like me are not perfect but I do try my best