viget / wordpress-site-starter
A custom WordPress Site Starter Kit by Viget.
Package info
github.com/vigetlabs/wordpress-site-starter
Type:project
pkg:composer/viget/wordpress-site-starter
Requires
- php: >=8.2
Requires (Dev)
- composer/composer: ^2.10
- phpunit/phpunit: ^11.5
- symfony/console: ^7.0
Suggests
None
Provides
None
Conflicts
None
Replaces
None
- dev-main
- v1.1.0
- v1.0.24
- v1.0.23
- v1.0.22
- v1.0.21
- v1.0.20
- v1.0.19
- v1.0.18
- v1.0.17
- v1.0.16
- v1.0.15
- v1.0.14
- v1.0.13
- v1.0.12
- v1.0.11
- v1.0.10
- v1.0.9
- v1.0.8
- v1.0.7
- v1.0.6
- 1.0.5
- v1.0.4
- v1.0.3
- v1.0.2
- v1.0.1
- v1.0.0
- v0.1.7
- 0.1.6
- 0.1.5
- 0.1.4
- 0.1.3
- 0.1.2
- 0.1.1
- 0.1.0
- dev-bd/v1.1.0-prep
- dev-bd/nvmrc
- dev-bd/dependency-updates-1.1.0
- dev-bd/gitattributes-generated
- dev-bd/repo-hygiene-and-setup-fixes
- dev-am/updates-from-acit-experience
- dev-mf/vite-restart
- dev-bd/composer-require-php-version
- dev-bd/import-db
- dev-bd/docs-generator
- dev-ns/npm-package
- dev-ns/148-modal-block
- dev-ns/fixing-build-bugs
- dev-bd/wp-org-prep
- dev-bd/acf-update
- dev-ns/vite-config-fix
- dev-bd/acf-pro-instructions
- dev-bd/modal-dialog-module
- dev-bd/105-debug-block-styles
This package is auto-updated.
Last update: 2026-09-23 19:50:54 UTC
README
This is a WordPress starter project that includes a basic custom theme, including some essential custom components, and a project setup designed for fast local setup and development.
Requirements
- Composer - Installation
- DDEV - Installation
- Docker (or compatible container alternative like OrbStack)
- ACF Pro ships with the starter, so no license key is needed to run it. New projects switch it to Composer instead - see Licensed plugins.
Using this Project
To begin using this on a new project, simply call the following command from the root of your project:
composer create-project viget/wordpress-site-starter .
Follow the prompts to set up your project with the desired information. You will be asked:
- The name of the project (
My Project): This will serve as the name of the WordPress Theme. - The project slug (
my-project): This will be used as the directory name for the theme as well as the local DDEV site name. - The text domain (
my-project): This will be used for internationalization and localization and defaults to the project slug. - The project Package name (
MyProject): This is referenced in the PhpDoc blocks and default project namespace. It defaults to the project name. - The function prefix (
my_project_): This is used to prefix all custom theme functions and defaults to the project slug. - Twig templates (
Enabled): Disabling this removes Timber/Twig and leaves the blocks rendering throughrender.php. - Media proxy domain (blank): A domain to serve
wp-content/uploadsfrom when a file is missing locally, usually the live site. Leave it blank to skip. - Agency branding (
Viget):Viget,CustomorNone.Customthen asks for the agency name and website, which show in the WP Admin footer.
A summary is printed at the end, and answering no to Does everything look good? starts the prompts over.
ddev start then runs the install wizard, which asks for a database source (install WordPress, or import a file with a search-replace), the site title, tagline and URL, and the admin username, email and password.
Automated Setup
Following the series of prompts, the project will be set up with the following:
- Composer Dependencies: All necessary dependencies for WordPress and the theme.
- WordPress Core: The latest version of WordPress will be downloaded.
- Local Development Environment: A DDEV configuration file will be created and the local environment will be started.
- Theme Setup: The theme will be set up with the project name and slug.
- Licensed plugins: Any plugin registered in the theme's
extra.licensed-repositoriesthatauth.jsonhas credentials for is switched from the committed copy to a Composer dependency. See Licensed plugins. package.jsonDependencies: All necessary script and style build dependencies for the theme will be installed and initialized.- Cleanup: Any setup files will be removed and the project will be ready for development.
- Agent Skills Sync: WordPress Agent Skills are synced after
ddev startand can be refreshed at any time.
After the setup is complete, it is recommended to perform your initial commit and push to your project repository.
Licensed plugins
The starter ships ACF Pro in wp-content/plugins/, so it runs with no license key. A new project switches licensed plugins over to Composer instead, which keeps them out of the project repo and updatable.
Licensed plugins are registered in the theme's composer.json under extra.licensed-repositories, keyed by the repository host:
"extra": { "licensed-repositories": { "connect.advancedcustomfields.com": { "name": "ACF Pro", "package": "wpengine/advanced-custom-fields-pro", "secret": "ACF_LICENSE_KEY" } } }
name- what the prompt and log output call the plugin.package- the Composer package the repository serves. Credentials are only required once the package is, so the starter itself never prompts for a key it doesn't need.secret- the GitHub Actions secret holding the license key for CI builds.password- optional template for theauth.jsonpassword, defaulting to{site_url}.{key}is also available for repositories that expect the license key in both fields.
Three things read that one list:
ddev composer-authprompts for any license keyauth.jsonis missing and merges it in, leaving the rest of the file alone.--checkruns onddev startand reports what's missing;--forcereplaces a key that's already there.composer create-projectrequires each registered package thatauth.jsonhas credentials for, replacing the committed copy..github/workflows/build.yamlwritesauth.jsonfrom the matching secrets before installing, and removes it afterward.
Adding another licensed plugin means adding its repositories entry, its extra.licensed-repositories entry, and the matching GitHub Actions secret - nothing else.
Pushing to your Project Repository
After the project is set up, you can run the following commands to add your remote repository and push your initial commit:
git init -b main git add . git commit -m "Initial Commit" git remote add origin <git@github.com:YOURGITHUB/your-repo.git> git push -u origin main
Be sure to update the origin with the correct remote repository URL (and remove the <> brackets).
Information on developing the theme, styling, and building blocks can be found in the theme README.
Syncing a remote database
Projects hosted on WP Engine can pull an environment's database into their local install:
ddev db-sync
Install names live in wpengine.conf, which ships with them blank. ddev db-sync reports which ones are missing and stops. It authenticates with your own SSH key over WP Engine's SSH Gateway, so nothing sensitive is stored in the repo.
ddev db-sync --check runs the prerequisite and SSH checks without touching any database. Full usage is documented in README.dist.md, which is the README a new project keeps.
Agent Skills
WordPress Agent Skills sync on every ddev start. Run it manually any time to
refresh them:
ddev agent-skills-sync
Optional environment variables for pinning/customizing source:
AGENT_SKILLS_REF(default:trunk)AGENT_SKILLS_REPO_URL(default:https://github.com/WordPress/agent-skills.git)AGENT_SKILLS_TARGETS(default:codex,vscode,claude,cursor)
Development
The following command will create a directory (project-name) and run composer create-project using your local repository as the source. Be sure to replace the path with the correct path to your local repository.
Also, in packages.json, you can change the name of the branch from main to use your current working branch.
Note: Be sure to update the paths in packages.json as well as the command below to point to the location of your local repository. ~/ will not work, you must use the full path.
mkdir project-name && cd project-name && composer create-project --repository-url="/root/path/not/relative/path/to/wordpress-site-starter/packages.json" viget/wordpress-site-starter . --stability=dev --remove-vcs --no-install
You can quickly remove the project by using:
ddev stop && ddev delete project-name -O -y && cd ../ && rm -rf project-name
Versioning
packages.json and CHANGELOG.md are the only two places the starter's version is tracked. Both are removed during composer create-project.
The theme stays at 0.1.0. That's the version a generated project starts at, so style.css, readme.txt and package.json in wp-content/themes/wp-starter never get bumped with a starter release. The project sets its own version from there.
composer sync-version # report the current version and verify node bin/sync-version.mjs 1.1.0 # set a new version in packages.json
node bin/sync-version.mjs --check runs on every PR. It fails if the theme has drifted off 0.1.0, or if CHANGELOG.md has no entry for the current version.
License
MIT for the tooling and scaffolding - see LICENSE. The theme in wp-content/themes/wp-starter and the viget-wp mu-plugin are GPLv2 or later, since they ship WordPress-derived code.
Changelog
See CHANGELOG.md.