---
title: Auto Activate a Bricks Builder Multisite
date: 2025-02-22T07:57:22Z
modified: 2026-09-22T19:51:44Z
permalink: "https://techarticles.co.uk/auto-activate-a-bricks-builder-multisite/"
type: post
status: publish
excerpt: ""
wpid: 4559
categories:
  - Bricks Builder
  - Coding
  - GridPane
  - Hosting
  - Plugins
  - Wordpress
timestamp: 2026-09-22T19:51:44Z
tags:
  - 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

```
<span class="line"><span style="color: #F97583"><?</span><span style="color: #79B8FF">php</span></span>
<span class="line"><span style="color: #6A737D">/**</span></span>
<span class="line"><span style="color: #6A737D"> * Plugin Name:       Bricks Multi-Site Activator</span></span>
<span class="line"><span style="color: #6A737D"> * Plugin URI:        https://github.com/stingray82/</span></span>
<span class="line"><span style="color: #6A737D"> * Description:       Bricks Activation Lincence Ky</span></span>
<span class="line"><span style="color: #6A737D"> * Version:           1.0</span></span>
<span class="line"><span style="color: #6A737D"> * Author:            Stingray82</span></span>
<span class="line"><span style="color: #6A737D"> * Author URI:        https://github.com/stingray82/</span></span>
<span class="line"><span style="color: #6A737D"> * License:           GPL-2.0+</span></span>
<span class="line"><span style="color: #6A737D"> * License URI:       http://www.gnu.org/licenses/gpl-2.0.txt</span></span>
<span class="line"><span style="color: #6A737D"> * Text Domain:       bricks-activator</span></span>
<span class="line"><span style="color: #6A737D"> * </span></span>
<span class="line"><span style="color: #6A737D"> */</span></span>
<span class="line"><span style="color: #B392F0">update_option</span><span style="color: #E1E4E8">( </span><span style="color: #9ECBFF">'bricks_license_key'</span><span style="color: #E1E4E8">, </span><span style="color: #9ECBFF">'XXXXXXXX'</span><span style="color: #E1E4E8"> );</span></span>
<span class="line"><span style="color: #79B8FF">define</span><span style="color: #E1E4E8">(</span><span style="color: #9ECBFF">'WP_DEFAULT_THEME'</span><span style="color: #E1E4E8">, </span><span style="color: #9ECBFF">'bricks'</span><span style="color: #E1E4E8">);</span></span>
```PHP

You can watch the video about this project below:

![](https://i.ytimg.com/vi/nlUiuJgJfZw/maxresdefault.jpg)