Site for codecharmer.io — a custom WordPress block theme + core plugin monorepo. Every section is a server-rendered Gutenberg block; the site converted from (and stays pixel-faithful to) the original static Astro build, which lives in git history.
wp-content/themes/codecharmer/ Block theme — presentation only
wp-content/plugins/codecharmer-core/ Engine: blocks, CPTs, REST, SEO, seeder
- Node.js ≥ 20 (pinned via
.nvmrc— runnvm use) - Composer (PHP tooling; code targets PHP 8.3 / WP 6.8+)
- Docker (for
wp-envlocal WordPress)
nvm use
npm install # workspaces: theme + plugin (+ @wordpress/scripts)
composer install # phpcs (WordPress + WordPress VIP standards), phpstan
npm run build # compile the Gutenberg blocks into the plugin's build/
npm run env:start # boot local WordPress (wp-env)Then activate and seed:
npm run env:cli -- theme activate codecharmer
npm run env:cli -- plugin activate codecharmer-core
npm run env:install-content # wp codecharmer install — pages, projects, mediaLocal site: http://localhost:8888 (admin: admin / password).
composer run lint # PHPCS: WordPress-Core/Extra/Docs + WordPress-VIP-Go — must be clean
composer run analyze # PHPStan level 6 (advisory)
npm run lint # eslint + stylelint (@wordpress presets)
npm run build # blocks must compileCI (.github/workflows/ci.yml) enforces the same on every push and PR.
Pages are seeded once by wp codecharmer install from wp-content/plugins/codecharmer-core/data/*.php (block-grammar heredocs — the "brand layer"). After the first deploy the marker file .wp-content-seeded prevents re-seeding, so owner edits are never overwritten. Projects are cc_project posts; services are pages under /services carrying cc_icon / cc_descriptor / cc_thesis meta that the mega-menu and services blocks query.
Pushing wp-content/** (or the manifests) to master triggers .github/workflows/deploy.yml:
- Build blocks (npm workspaces).
- Bootstrap WordPress core on the VPS if absent (first deploy only).
rsync --deletescoped to the theme + plugin directories — core,wp-config.php, and uploads are never touched.- Activate theme + plugin, seed once, flush object + cPanel NGINX caches.
Deploy plumbing is generated by ~/setup-vps-deploy.sh (see that script's --help for the WordPress mode flags, including --wp-reseed).

