Helper for resetting the dev environment by deleting the LocalWP site and
creating a fresh one (cleaner than wiping pages/options/transients in place).
tools/fresh-setup-mu-plugin.php
Drop into wp-content/mu-plugins/ of a brand-new LocalWP install named
"Asterion 2026". On first hit it:
- sets siteurl/home to http://localhost:10004 (override AV_TARGET_HOME
if LocalWP allocates a different port)
- sets pretty permalinks (/%postname%/)
- timezone Europe/Paris
- activates the Bricks parent + asterion-bricks child theme (assumes
the Junction has been re-made and the Bricks ZIP unpacked)
- activates WPML core
- sets Bricks Builder Access postTypes to page/post/case_study/scenario
- flushes rewrite rules
- self-deletes
tools/README.md
Step-by-step procedure for the LocalWP delete → recreate → junction →
unpack ZIPs → drop mu-plugin → first-hit flow. Plus the manual follow-up
for Bricks license, WPML wizard, Bricks Theme Styles.
This file path (tools/) is a deliberate sibling of content-source/ and
ThirdParty/, all of them used during setup or migration but never loaded
by the site at runtime.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2.3 KiB
2.3 KiB
Tools
One-shot scripts and helpers used during project setup or migrations. They are NOT part of the published site.
fresh-setup-mu-plugin.php
Drop into wp-content/mu-plugins/ of a freshly created LocalWP site to auto-configure WordPress for the Asterion VR project. Read its inline header for the full procedure.
Quick recap :
- Delete the old LocalWP site (right-click → Delete site, optionally move folder to trash).
- Create a new LocalWP site named "Asterion 2026", mode
localhost, default credentials. - Note the allocated port — likely
10004again. If different, editAV_TARGET_HOMEinfresh-setup-mu-plugin.phpfirst. - Junction the child theme into the new site:
New-Item -ItemType Junction ` -Path "C:\Users\j_foucher\Local Sites\asterion-2026\app\public\wp-content\themes\asterion-bricks" ` -Target "C:\ASTERION\GIT\WP2026\wp-content\themes\asterion-bricks" - Extract the Bricks parent theme:
Expand-Archive ThirdParty\bricks.2.3.4.zip "<NEW_SITE>\app\public\wp-content\themes\" - Extract WPML:
Expand-Archive ThirdParty\sitepress-multilingual-cms.4.9.3.zip "<NEW_SITE>\app\public\wp-content\plugins\" - Copy
tools/fresh-setup-mu-plugin.php→<NEW_SITE>\app\public\wp-content\mu-plugins\fresh-setup-mu-plugin.php - Visit
http://localhost:10004/once. The plugin runs atinitpriority 50, configures everything, and self-deletes after success. - Verify by hitting
http://localhost:10004/wp-admin— login, then check that:- Theme : Asterion Bricks active (parent: Bricks)
- Plugins : WPML active
- Settings → Permalinks : Post name (
/%postname%/) - Bricks → Settings → Builder access : Page + Post + case_study + scenario checked
Then activate the Bricks license (Bricks → License) and run the WPML setup wizard manually — those need your license keys and an interactive choice flow that's safer to do in admin.
What's missing — manual follow-up after fresh setup
- Bricks license key activation (Bricks → License)
- WPML setup wizard (WPML → Setup) : EN default + FR secondary, URL strategy = "Different languages in directories"
- Bricks → Theme Styles : align colors with
tokens.css(Brand Navy#0B1F3A, Brand Gold#C9A45A, etc.) - Build the Header and Footer Bricks Templates (per RESTART-PLAN.md Phase 4)