# denisluzin.com → New Design: Bricks Builder Migration Plan

**Scope:** Redesign denisluzin.com in place — same domain, same server (188.245.41.69). Animated landing page (home), blog, WooCommerce shop.
**Stack:** Bricks parent theme + Bricks child theme + ACF Pro (already licensed and active on source).
**One dev. Visual template management. Fast CWV. Full content editability.**

> Bricks is installed as a WordPress theme, not a plugin. Custom PHP/CSS/JS belongs in the Bricks child theme.

---

## Decisions (locked)

| Question | Decision |
|---|---|
| Domain | Same — denisluzin.com. Slugs preserved → **no path-level 301s needed**. |
| Migration method | **Clone DB + uploads, transform in place** — not XML/CSV export-import. Source is on this server; cloning keeps all users (752), orders (137), products (12), and Rank Math post meta with zero re-import risk. |
| Build location | New site at `bricks.denisluzin.com` on this server (fresh webroot + cloned DB). Cutover = nginx server_name/webroot swap. `dev.denisluzin.com` stays as the *old* site's staging — don't reuse it. |
| Header/footer | Bricks header/footer templates everywhere, **including the home page** via `get_header()`/`get_footer()`. One header, one source of truth. `site.js` selectors get adjusted to the Bricks header markup. |
| `site.js` | Kept — header scroll + mobile nav behavior, retargeted to Bricks header IDs/classes. Drop it only if Bricks interactions prove sufficient during build. |
| ACF Pro | Confirmed — already licensed and running on source (5.11.4). Repeaters on home page are fine. |
| WooCommerce Subscriptions | **Drop.** Zero subscription records exist. Also drop `woocommerce-subscription-downloads` (depends on it). Verify nothing references them, then deactivate. |
| Yandex Money gateway | **Drop** — service deprecated. 10 historical orders (kept as records, no live gateway). |
| Payment gateways | **Live at cutover = Stripe (83 orders) + BTCPay only.** Decided 2026-07-05: **WayForPay (31 orders) and LiqPay (8) are retired entirely** — deactivated in Phase 2, their historical orders kept as records only. BTCPay kept live per client despite **zero historical orders** (crypto option going forward). |
| WPBakery (js_composer) | Not installed on new site. The 38 vc-shortcode pages get triaged and rebuilt (see Phase 4). Same for `mpc-massive` and `LayerSlider`. |

---

## Source Site Facts (audited 2026-07-05)

From the live DB (`Intlab_den`, prefix `gp_`):

- **54 published pages**, **29 posts**, **12 products**, **137 orders** (last order 2023-01-29 — shop dormant), **752 users**
- **38 pages/posts contain `[vc_*` WPBakery shortcodes** — these render as raw shortcode text once js_composer is gone. Biggest single cost driver of the migration.
- **2 active memberships** (WooCommerce Memberships 1.10.1) — plugin must survive the migration; verify restricted content after theme switch.
- HPOS not enabled — orders live in `gp_posts`/`gp_postmeta`, clone carries them automatically.
- Active plugins to carry: WooCommerce, ACF Pro, Rank Math, **Schema Pro** (Rank Math addon), Redis Cache, cyr2lat, WP Mail SMTP, safe-svg, classic-editor, flying-scripts, GTM, OMGF, memberships, **WPS Hide Login**, Stripe + BTCPay gateways, amoCRM integration.
- Plugins to drop with the redesign: js_composer, mpc-massive, LayerSlider, subscriptions (+downloads), yandex-money, **wayforpay + liqpay gateways (retired 2026-07-05 — historical orders kept as records)**, wp-migrate-db (not needed same-server), **wp-smpt-php-5.6-fix** (dead — fixes a self-signed-cert TLS error from a mail setup that predates the current no-auth/no-TLS local Postfix relay on port 25), anycomment / abandoned-cart / admin-columns / others — audit each in Phase 2.
- Real gateway usage (`_payment_method` on orders): Stripe 83 (kept), WayForPay 31 (retired 2026-07-05), Yandex Money 10 (retired), LiqPay 8 (retired 2026-07-05), COD 1, **BTCPay 0 (kept live per client)**.
- **4 of the 12 published "products" are test junk** (`testovyj-1`, `testovyj-1-kopirovat`, `testovyj-s-redirektom-na-bdl`, `-kopirovat`; prices $0–$1) — exclude from migration, don't rebuild in Bricks WC templates. The 8 real products are mostly **dated cohort variants of the same confidence course** (Апрель 2022, Октябрь 2021, Декабрь 2022, Сентябрь 2022) — ask the client whether to consolidate into one evergreen product before rebuilding the shop archive/product templates.
- **`https://denisluzin.com/loading/` returns a live HTTP 500 on production right now** (WooCommerce order-processing interstitial) — pre-existing bug, unrelated to this migration, but confirm it's fixed or intentionally excluded before using it as a reference during checkout template rebuild.
- amoCRM integration: the gipnozbright.com copy of this plugin crashes on PHP 8.3 checkout when its custom-fields option is a non-array (see CLAUDE.md). Version here is 2.21.1 — test checkout, apply the same `is_array()` guards if it fires.

---

## Why This Stack

- Bricks handles visual template building for all page types without hand-coding 25+ PHP templates
- Native WooCommerce elements (product grid, cart, checkout, mini-cart, account) — no template override maintenance
- CSS-first, Vue-based builder — no jQuery from Bricks itself, clean DOM (1–2 wrappers per element vs Elementor's 4–5), frontend JS ~15–20KB vs Elementor's ~200–300KB + jQuery
- Design system tokens (`--signal`, `--ink`, `--bg`, etc.) port directly as Bricks Global CSS — full CSS custom property support in all style fields
- GSAP on home page via child-theme conditional enqueue
- Templates exportable as JSON for version control (see Version Control rule below)
- Annual license + lifetime option; verify current pricing before purchase

---

## Performance Expectations

Target: 90+ desktop, comparable-or-better mobile vs current site on all page types. Don't publish per-page point predictions — mobile Lighthouse varies up to 28 points between runs on this server (median-of-3, per CLAUDE.md).

Assumptions:
- FastCGI page cache + Redis object cache enabled before measuring (server standard)
- Bricks Global CSS/classes instead of heavy per-element inline styling
- Theme assets versioned with `filemtime()`
- Hero preloads, dimensions, WebP, lazy loading preserved from the static design
- BricksExtras/Bricksforge added only after baseline CWV testing, if at all
- GSAP (114KB raw / ~34KB gzip) loads on home page only

---

## Architecture Overview

Two layers:

1. **Bricks canvas** — all visual templates (shop, blog, product, inner pages, header, footer)
2. **Custom code layer** — home page GSAP animations, design tokens, ACF data

```
bricks-child/
  style.css              ← child theme stylesheet + home-only styles
  functions.php          ← enqueue child assets, theme supports, WC support
  front-page.php         ← home page bypasses Bricks canvas: direct PHP/HTML + GSAP
  inc/
    acf-fields.php       ← ACF field group definitions (PHP export)
    woocommerce.php      ← WC theme support declarations
  js/
    site.js              ← header/mobile-nav behavior, retargeted to Bricks header
    front-page.js        ← home interactions/GSAP/news slider, with null guards
  vendor/
    gsap.min.js
    ScrollTrigger.min.js
  img/                   ← static assets
```

Everything except the home page = Bricks templates.

---

## Design Token Migration

The static design's `:root` block pastes directly into **Bricks → Settings → Custom CSS** (Global CSS):

```css
:root {
  --signal: #E5121F;
  --signal-deep: #B30E18;
  --signal-soft: #F9E6E7;
  --ink: #111318;
  --ink-soft: #3D4251;
  --mute: #8A8F9E;
  --bg: #FFFFFF;
  --bg-alt: #F7F8FA;
  --card: #FFFFFF;
  --dark: #111318;
  --dark-card: #1C1F2A;
  /* ... full token set ... */
  --ease: cubic-bezier(.22, 1, .36, 1);
}
```

Reference tokens in Bricks element styles with `var(--signal)` etc.

---

## functions.php — Child Theme Setup

```php
<?php
function bright_theme_setup() {
    add_theme_support('title-tag');
    add_theme_support('post-thumbnails');
    add_theme_support('custom-logo');
    add_theme_support('woocommerce');
    add_theme_support('wc-product-gallery-zoom');
    add_theme_support('wc-product-gallery-lightbox');
}
add_action('after_setup_theme', 'bright_theme_setup');

function bright_enqueue_scripts() {
    if (! function_exists('bricks_is_builder_main') || ! bricks_is_builder_main()) {
        wp_enqueue_style(
            'bright-child',
            get_stylesheet_uri(),
            ['bricks-frontend'],
            filemtime(get_stylesheet_directory() . '/style.css')
        );

        wp_enqueue_script(
            'bright-site',
            get_stylesheet_directory_uri() . '/js/site.js',
            [],
            filemtime(get_stylesheet_directory() . '/js/site.js'),
            true
        );
    }

    // GSAP — home page only
    if (is_front_page()) {
        wp_enqueue_script('gsap', get_stylesheet_directory_uri() . '/vendor/gsap.min.js', [], '3.12.7', true);
        wp_enqueue_script('gsap-st', get_stylesheet_directory_uri() . '/vendor/ScrollTrigger.min.js', ['gsap'], '3.12.7', true);
        wp_enqueue_script(
            'bright-front',
            get_stylesheet_directory_uri() . '/js/front-page.js',
            ['gsap', 'gsap-st'],
            filemtime(get_stylesheet_directory() . '/js/front-page.js'),
            true
        );
    }
}
add_action('wp_enqueue_scripts', 'bright_enqueue_scripts');
```

---

## Home Page: `front-page.php`

The home page **bypasses the Bricks canvas** but uses the **Bricks header/footer** via `get_header()`/`get_footer()` — one header site-wide, no divergence.

```php
<?php get_header(); ?>

<main id="main">
  <!-- Full index.html markup converted to PHP -->
  <!-- ACF get_field() calls for editable content -->
  <!-- All data-hero, data-reveal, data-stagger, data-count attributes preserved -->
  <!-- .hero-diamonds, .hero-man, #book-img, .hint-arrow, .doubt-video, .doubt-bg preserved -->
</main>

<?php get_footer(); ?>
```

Use the static `index.html` as the markup source of truth. Preserve preload-critical images, dimensions, `fetchpriority`, `loading`, ARIA relationships, inline SVG gradient definitions, and all JS/CSS hooks.

Escaping rules for all dynamic output (here and anywhere in the child theme):
- Plain text: `esc_html()` · URLs: `esc_url()` · HTML attributes: `esc_attr()`
- Trusted rich text from ACF textarea/WYSIWYG: `wp_kses_post()`
- Image fields: resolve ID/array safely; output `src`, `alt`, `width`, `height`, loading/fetch priority deliberately

**JS/GSAP selectors that must exist after migration:**

| Selector / ID | Notes |
|---|---|
| header scroll target + burger + nav | `site.js` retargeted to Bricks header markup — inspect rendered header, update selectors once |
| `.hero`, `.hero-diamonds`, `.hero-man` | GSAP trigger + parallax targets |
| `#news-track`, `#news-prev`, `#news-next`, `#news-dots` | news slider (if section kept) |
| `#book-img`, `.book-visual` | pointer tilt |
| `.hint-arrow path` | inline SVG |
| `.doubt`, `.doubt-video`, `.doubt-bg` | dark section parallax |
| `[data-hero]`, `[data-reveal]`, `[data-stagger]`, `[data-count]` | animation hooks |

Split existing `main.js` into:
- `site.js` — header/mobile nav, loaded site-wide
- `front-page.js` — stagger, hero reveal, counters, news slider, GSAP layer, loaded only on `is_front_page()`

All DOM lookups get null guards where a section may be removed or made conditional.

---

## Bricks Templates to Build

| Template | Type | Content source |
|---|---|---|
| Header | Header | Bricks nav element, logo, menu |
| Footer | Footer | Bricks content blocks |
| Blog archive | Archive (post) | Bricks query loop |
| Single post | Single (post) | `{post_content}` dynamic tag |
| Single page | Single (page) | Post content or ACF via dynamic tags |
| Shop archive | WC archive | Bricks WC product grid |
| Single product | WC single | Bricks WC product elements |
| Cart / Checkout / My Account | WC | Bricks WC elements (after checkout gate) |
| 404 | Error | Static Bricks layout |

All built visually in Bricks canvas. No PHP files for these.

---

## Bricks + ACF

Bricks has native ACF integration — dynamic data tags (`{acf_field:hero_headline}`, `{acf_image:hero_image}`) pull field values into any text/image element. Use ACF for structured custom pages; Bricks native content for blog posts and standard pages.

### ACF Fields (home page, via `front-page.php`)

Home page bypasses the canvas, so fields are read with plain `get_field()` in PHP. Attach all groups **only to the assigned static front page**. **All 11 `/15` sections are editable** (user decision 2026-07-05); field names below are finalized against the frozen `/15` markup in Phase 3. The closing section's footer nav (Система BRIGHT / Навигация / Полезное) belongs to the Bricks **footer template**, not this ACF set.

```
Group: Home — Hero
  hero_headline, hero_lead, hero_cta_text, hero_cta_url, hero_collage, hero_diamonds, hero_man

Group: Home — Features (pillars)
  features (repeater): feature_title, feature_text

Group: Home — News
  news_eyebrow, news_heading, news_link_text, news_link_url
  news_items (repeater): item_image, item_title, item_url, item_date

Group: Home — What is / Method  (+ stats)
  whatis_eyebrow, whatis_heading, whatis_body, whatis_image
  stats (repeater): stat_number, stat_label, stat_format   ← the 5 data-count values live IN this section, not standalone

Group: Home — Queries
  queries_heading
  queries (repeater): query_title, query_desc

Group: Home — Book  («Бог эмоций»)
  book_eyebrow, book_heading, book_subline, book_cta_text, book_cta_url, book_image

Group: Home — Course
  course_heading, course_body, course_cta_text, course_cta_url
  course_images (repeater): course_image

Group: Home — Science
  science_eyebrow, science_heading
  science (repeater): point_title, point_text, point_image

Group: Home — Doubt (dark parallax)
  doubt_heading, doubt_body, doubt_video

Group: Home — Imagine
  imagine_eyebrow, imagine_heading
  imagine_states (repeater): state_text

Group: Home — Closing CTA
  cta_headline, cta_button_text, cta_button_url
```

Export all groups to `inc/acf-fields.php` (or Local JSON — pick one, commit it). Never leave field definitions only in the DB.

---

## Bricks WooCommerce Elements

No template override PHP files. Build visually; do not mix Bricks cart/checkout templates with WooCommerce Cart/Checkout Blocks on the same pages.

Elements: WooCommerce Products (grid), Product Title/Price/Gallery/Rating, Add To Cart, Mini Cart, Cart, Checkout, My Account, Related Products. Style with `var(--signal)` etc.

**Checkout compatibility gate — required before cutover:**
- Test each live gateway end-to-end in the Bricks checkout: **Stripe + BTCPay** (WayForPay, LiqPay, Yandex Money all retired 2026-07-05)
- Test amoCRM checkout hook (known PHP 8.3 crash pattern — see Source Site Facts)
- Confirm required fields, taxes, shipping, coupons (`url-coupons`, percentage-coupon plugins), order emails, order notes, failed + successful payments, thank-you page
- Confirm the 2 active memberships still grant access and My Account customization (YITH) still works
- If any gateway fails in the Bricks checkout, fall back to classic WC shortcode checkout for cart + checkout until solved

---

## CSS Architecture

| Layer | Location | Scope |
|---|---|---|
| Design tokens | Bricks Global CSS (`:root` block) | All pages |
| Component styles | Bricks Global CSS (below tokens) | All pages |
| Home page styles | `style.css` in child theme | `front-page.php` only |
| Per-element overrides | Bricks element Custom CSS | That element only |

Rule: home-page-only styles → `style.css`; site-wide → Bricks Global CSS. Never duplicate between the two.

---

## Version Control (single canonical rule)

- Child theme lives in git from day one (repo pattern: `wp-content/` only, per server convention)
- Export Bricks templates/settings/classes as JSON after major changes → commit under `bricks-exports/`
- Export ACF field groups to PHP/Local JSON → commit
- Take a Bricks snapshot before any AI-driven template edit
- Never edit raw `_bricks_*` post meta manually unless there is no supported path and a DB backup exists

---

## Migration Plan

### Phase 0 — Audit ✅ (done 2026-07-05)

All 5 items complete. Full deliverables in `/home/bright/sites/docs/phase0-audit/` (mirrored at `https://bricks.denisluzin.com/docs/phase0-audit/`):

1. **WPBakery triage** — 38 pages/posts sorted into rebuild (15) / strip (17) / exclude (6) → `vc-pages-triage.md`
2. **Rendered HTML snapshots** — all 38 WPBakery pages captured while js_composer still renders them → `html-snapshots/` (6.4M)
3. **Plugin keep/drop list confirmed against real data** — corrected the gateway list (WayForPay had 31 real orders and was missing entirely; BTCPay has 0) and added `wp-schema-pro`/`wps-hide-login` to keep, `wp-smpt-php-5.6-fix` to drop. Folded into "Source Site Facts" and "Decisions" above.
4. **Nav menus documented** — real structure is 5 header items (not 6; `nav_menu_locations` is empty, theme hardcodes the menu reference), plus screenshots of desktop/mobile-closed/mobile-open → `nav-menus.md`, `screenshots/`
5. **SEO baseline crawl** — 97 URLs × status/title/meta description/canonical → `seo-baseline.csv`. One live bug surfaced: `/loading/` 500s on production right now (noted in Source Site Facts).

See `phase0-audit/README.md` for the full findings summary.

### Phase 1 — Build Site Setup (bricks.denisluzin.com)

1. Clone DB + uploads from production using the server's staging pattern (`wp-dev-site` skill): new DB `Intlab_den_bricks`, webroot `/var/www/bricks.denisluzin.com`, URL rewrite, nginx + SSL, staging protection (noindex + HTTP auth), `WP_CACHE_KEY_SALT`, safeguards mu-plugin **including mail/webhook kill-switch** — amoCRM, GTM, abandoned-cart must not fire from the build site
2. Install Bricks parent + child theme; activate child. Never edit parent files.
3. Paste design tokens into Bricks Global CSS
4. Add `front-page.php`, `functions.php`, `site.js`/`front-page.js`, GSAP vendor files, image assets
5. Disable WP-Cron spillover (`DISABLE_WP_CRON` is already the server pattern — keep real cron pointed only at production)

### Phase 2 — Plugin Transform (on bricks)

Deactivate + remove: `js_composer`, `mpc-massive`, `LayerSlider`, `woocommerce-subscriptions`, `woocommerce-subscription-downloads`, `yandex-money-for-wp_woocommerce`, **WayForPay (`Word-Press-Woocommerce-master`)**, **LiqPay gateway**, `wp-migrate-db`, `wp-smpt-php-5.6-fix`. Audit the rest (anycomment, abandoned-cart, admin-columns, ac-addon-woocommerce, paste-to-media, show-current-template, wp-mail-logging, duplicate-post, loco-translate) — default drop unless a concrete need survives.

Keep: WooCommerce, ACF Pro, Rank Math, **wp-schema-pro**, redis-cache, cyr2lat, wp-mail-smtp, safe-svg, classic-editor, flying-scripts, GTM, OMGF (host-webfonts-local), memberships, YITH my-account, **wps-hide-login**, **Stripe + BTCPay** (the two live gateways), amoCRM, coupon plugins (url-coupons, product-percentage-coupon-woo).

After deactivations: check for fatal errors, orphaned shortcodes on non-vc pages, and broken cron hooks.

### Phase 3 — Home Page (new design + existing content)

`front-page.php` + ACF fields:

Mapped to the frozen `/15` sections (source of truth), top to bottom:

| /15 Section | Content source | ACF group |
|---|---|---|
| Hero | "Система Bright" + "6–10 часов вместо 3–5 лет" lead, CTA "Начните здесь" | Hero |
| Features (pillars) | Four pillars (scientific, simple, emotions, rapid) | Features |
| News | "01 Новости" slider — current-site news | News |
| What is / Method | "Что такое Система Bright" + the 5 stats (5400+ ч · 92% · 400+) live here | What-is + Stats |
| Queries | "С какими запросами можно работать" cards (Уверенность, Отношения, Страхи…) | Queries |
| Book | **«Бог эмоций»** — swap in book image/title/copy; `/15` ships a «Нейрофизиология» placeholder | Book |
| Course | Course/product showcase | Course |
| Science | "06 Наука — Научный подход. Реальные результаты." points | Science |
| Doubt | Dark parallax section + video | Doubt |
| Imagine | "08 Состояние — А теперь представьте состояние…" states list | Imagine |
| Closing CTA | Course/product CTA | Closing CTA |

All output escaped per the rules in the Home Page section.

### Phase 4 — Templates + WPBakery Page Rebuild

The bulk of the work. Order:

1. Bricks header + footer templates; retarget `site.js`; assign menu locations (`primary`, `footer`); verify all 6 nav items
2. Single page / single post / archive templates → cover all non-vc pages and 29 posts automatically
3. WC templates (shop, product, cart, checkout, account)
4. **WPBakery triage execution** (from Phase 0 list):
   - Priority pages (start-here, treningi, free, coaching, denis-luzin, landing pages uverennost/money/power/motivation, book, testimonials): dedicated Bricks layouts, rebuilt from the saved rendered HTML
   - Long-tail pages: strip `[vc_*]` wrappers, keep text/images as clean content under the generic page template
   - Legal pages (oferta, delivery): plain content, generic template
5. Review every rebuilt page on mobile before calling it done

Nav menu items (all slugs preserved): Начните здесь `/start-here/` · Обучение `/treningi/` · Бесплатно `/free/` · Platinum `/coaching/` · О Денисе `/denis-luzin/` · Магазин `/shop/`

### Phase 5 — SEO Verification

Same domain, slugs preserved, Rank Math meta cloned with the DB — so this phase is *verification*, not reconstruction:
- Crawl bricks (with staging auth) and diff against the Phase 0 baseline: status codes, titles, descriptions, canonicals, headings, indexability
- Check canonical/OG URLs don't leak `bricks.` hostnames (search-replace was done in Phase 1 — verify)
- Regenerate Rank Math sitemap; check `/treningi/` page-vs-category slug collision
- Any page deliberately removed in the redesign → 301 to its successor

### Phase 6 — Prelaunch QA

- Export Bricks templates/classes to JSON, verify a restore path, commit
- Home page animations on desktop/mobile + `prefers-reduced-motion`
- Mobile navigation on home page and every Bricks template
- Blog archive, category archives (9), single post, search, 404
- Every WPBakery-rebuilt page: broken media, shortcode leftovers, CTA/form links, mobile layout
- Full checkout gate (see WooCommerce section): all 3 gateways, memberships, coupons, order emails
- Lighthouse median-of-3 (mobile) + desktop on home, blog post, shop, product, checkout — flush FastCGI cache first (server rule)
- Transactional email deliverability (server Postfix/DKIM stack — test to luzin.denis@gmail.com only)
- Backups configured, analytics/GTM firing, consent behavior if required

### Phase 7 — Cutover

Shop is dormant (last order 2023) and content changes are rare, so the window is low-risk:
1. Content freeze on production (no edits during final sync)
2. Final delta: re-sync `uploads/` and re-clone any content edited since Phase 1 (or, if none, skip)
3. Swap nginx: point `denisluzin.com` server block at the bricks webroot + DB (or rename webroots); keep the old site intact at a parked hostname for instant rollback
4. Remove staging protection, `noindex`, and the `bricks.` search-replace remnants; re-run search-replace bricks → production URL
5. Flush Redis + FastCGI cache; smoke-test home, checkout, login, wp-admin
6. Re-point real cron at the new webroot; verify certbot covers the swapped config
7. Submit sitemap in Search Console; watch crawl stats for a week
8. After 2 stable weeks: archive the old webroot + final DB dump, then remove

---

## Effort Estimate

| Phase | Est. time |
|---|---|
| 0 — Remaining audit + vc-page triage + HTML capture | 3h |
| 1 — Clone + build-site setup | 2h |
| 2 — Plugin transform + verification | 2h |
| 3 — Home page (`front-page.php` + ACF + GSAP) | 6–10h |
| 4 — Header/footer + base templates | 5–7h |
| 4 — WPBakery page rebuilds (≈10 priority pages + ~28 strip-downs) | 12–25h |
| 4 — WC templates | 4–6h |
| 5 — SEO verification | 2h |
| 6 — QA + checkout gate + CWV | 5–8h |
| 7 — Cutover | 2h |
| **Total** | **≈43–67h** |

The spread is almost entirely Phase 4: it depends on how many of the 38 WPBakery pages get full Bricks rebuilds vs content strip-downs. Triage in Phase 0 tightens this number before committing.

---

## MCP Integration (optional, post-setup tooling)

**Recommended: `bricks-mcp-open`** (`github.com/developer2013/bricks-mcp-open`) — free, MIT, ~105 Bricks tools (pages/templates editing, style tokens, global classes, snapshots, SEO audit). Two parts: Node MCP server + `bricks-api-bridge` WP plugin, auth via Application Passwords.

Setup: install bridge plugin → create Application Password → clone repo, `npm install`, fill `.env` → add to `~/.claude/.mcp.json`:
```json
{
  "mcpServers": {
    "bricks": { "command": "node", "args": ["/path/to/bricks-mcp-open/index.js"] }
  }
}
```

Rules of use:
- **Snapshot before every AI-driven template change** (`"Create a snapshot named 'before-hero-edit'"` → edit → verify → restore if wrong)
- **Security:** the bridge's `execute-php` tool is arbitrary remote code execution behind an Application Password. Disable that tool/endpoint on production, or restrict the bridge to the build site only.
- The HTML→Bricks converter tool is an *experiment aid* for rebuilding vc pages — review its output; it is not the plan of record for priority landing pages.
- For file-level work (CSS, tokens, `front-page.php`, JS) direct editing via Claude Code is faster than any MCP — use the MCP only for Bricks-internal operations (templates, classes, snapshots, SEO bulk).

Alternative: Novamira Pro (€49/yr) — fewer Bricks tools, tighter general-WP integration. Novamira Free has no real Bricks support — don't use it here.

---

## What to Avoid

- Loading GSAP globally — `is_front_page()` guard mandatory
- Putting the home page into the Bricks canvas — it fights GSAP; keep `front-page.php`
- Editing Bricks parent theme files — updates overwrite them
- Echoing ACF values raw — escape everything (rules in Home Page section)
- Field/template definitions living only in the DB — see Version Control rule
- Mixing builders — no Elementor, and js_composer is removed, not left dormant
- Heavy Bricks add-ons before baseline CWV testing
- Trusting the Bricks checkout before testing Stripe + BTCPay with real transactions
- Letting the build site send email or fire amoCRM/GTM/abandoned-cart webhooks — kill-switch in Phase 1
- Reusing `dev.denisluzin.com` for the bricks build — it's the old site's staging
