2.5 KiB
2.5 KiB
Easy WordPress Bootstrap (Herd + DBngin) — Windows Edition
This kit lets Windows devs spin up a new local WordPress project using PowerShell only.
Includes
wp-bootstrap.ps1— main PowerShell scriptbootstrap.bat— one-click launcherplugins.json— minimal default plugin list (use file from repo root)
Prerequisites
- PHP installed and in PATH
- MySQL client (
mysql.exe) in PATH (DBngin/MySQL installed and running) - Git installed (for cloning the starter theme)
- WP-CLI: either installed globally as
wp, or putwp-cli.pharnext to this script and call with:-WpCliPath "php .\wp-cli.phar"
Quick Start
-
Right-click PowerShell → Run as Administrator (first run only):
Set-ExecutionPolicy RemoteSigned -Scope CurrentUser -
Open a normal PowerShell in this folder and run:
.\wp-bootstrap.ps1 -ProjectName "Client Site"or double-click
bootstrap.batand enter the project name when prompted.
Optional parameters
-AdminUser(default:vdidev)-AdminEmail(default:dev@vincentdesign.ca)-ThemeStarterRepo(default: VDI starter theme)-HerdWorkspace(default:"$HOME\Herd")-LocalTld(default:test)-MysqlHost/-MysqlPort/-MysqlRootUser/-MysqlRootPass-WpCliPath(set to"php .\wp-cli.phar"if not installed globally)
What it does
- Creates project folder under your Herd workspace
- Downloads WordPress core
- Creates database + user with random password
- Generates
wp-config.php, shuffles salts - Installs WordPress and sets the site/home URLs
- Creates Home and News pages, sets front page/posts page
- Sets permalinks to
/%postname%/and flushes - Clones the starter theme, strips history, re-initializes a clean repo, and activates it
- Installs and (optionally) activates plugins from
plugins.json - Prints and saves a summary (
bootstrap-summary.txt)
Troubleshooting
- WP-CLI not found: pass
-WpCliPath "php .\wp-cli.phar"(placewp-cli.pharbeside this script). - MySQL not found: ensure
mysql.exeis in PATH. With DBngin, add the MySQL bin folder to PATH. - Access denied creating DB: verify
-MysqlRootUser/-MysqlRootPass, or create a dev-only MySQL user withCREATEprivileges. - Herd not serving: Add/link the folder in Herd and browse to
http://<slug>.test(or your chosen TLD).
Philosophy
DIY-first: keep plugins.json minimal. Only add big off‑the‑shelf stacks (e.g., ecomm) when warranted.