Project: Varying Vagrant Vagrants (VVV) Type: WordPress Development Environment Infrastructure Repository: https://github.com/Varying-Vagrant-Vagrants/VVV
VVV is a local WordPress development environment using Vagrant. Think of it like Docker Compose for WordPress - it's infrastructure that hosts multiple WordPress sites, not a WordPress project itself.
Critical Concept: The www/ folder contains local development sites that are unique to each developer and should NEVER be committed to the VVV repository (similar to Docker volumes).
vvv-local/
├── Vagrantfile # Core Vagrant config (DO NOT MODIFY)
├── .gitignore # Git exclusions (DO NOT MODIFY)
├── config/
│ └── config.yml # USER SITE CONFIGURATION (gitignored)
├── provision/ # VVV provisioning scripts (modify only for VVV improvements)
├── www/ # LOCAL DEVELOPMENT SITES (gitignored except defaults)
│ ├── wordpress-one/ # User's site (gitignored)
│ ├── wordpress-two/ # User's site (gitignored)
│ └── default/ # VVV dashboard (tracked in git)
├── database/ # MySQL data (gitignored)
└── log/ # Logs (gitignored)
- NEVER modify
.gitignoreto allow committingwww/content - NEVER force commit using
--no-verify,-f, or bypass git hooks - NEVER commit files from
www/(except the specific defaults:www/vvv-hosts,www/default/) - NEVER create files directly in
www/- useconfig/config.ymlinstead - NEVER modify core files (
.gitignore,Vagrantfile,/provision/) without explicit permission - NEVER run
vagrant init
- ALWAYS check
git check-ignore <path>before committing files - ALWAYS review
git statusandgit diffbefore commits - ALWAYS ask yourself: "Is this VVV infrastructure or site-specific work?"
- ALWAYS edit
config/config.ymlfor site configuration, never create files directly - ALWAYS ask the user if uncertain whether something should be committed
Correct approach:
# Edit: config/config.yml
sites:
my-new-site:
repo: https://github.com/Varying-Vagrant-Vagrants/custom-site-template.git
php: 8.2
hosts:
- mynewsite.test
custom:
db_name: mynewsite_db
site_title: "My New Site"
install_plugins:
- query-monitor
wpconfig_constants:
WP_DEBUG: trueThen instruct user: vagrant up --provision
Incorrect approach:
- ❌ Creating
www/my-new-site/directory manually - ❌ Downloading WordPress files
- ❌ Modifying
.gitignoreto track the site - ❌ Modifying files inside the Virtual Machine to track the site
Correct approach:
- Ask: "Which site in
www/are you working on?" - Navigate to:
www/site-name/public_html/wp-content/themes/theme-name/ - Make changes within that directory
- DO NOT commit to VVV repository (site files are separate)
- Suggest user initializes git within their theme if they want version control
Incorrect approach:
- ❌ Committing theme changes to VVV repository
- ❌ Committing theme changes to custom site template repository
- ❌ Creating pull requests with site-specific code
Correct approach:
- Review files in
/provision/directory - Make improvements to VVV's core scripts
- These changes CAN be committed to VVV
- Create pull request with VVV improvements
When to commit to VVV:
- Bug fixes in provisioning scripts
- Documentation improvements
- New VVV features
- CI/CD improvements
sites:
site-name:
repo: <git-repo-url> # Template repository
branch: master # Git branch (optional)
php: 8.2 # PHP version
skip_provisioning: false # Skip on vagrant up
hosts: # Domains
- site.test
- www.site.test
custom:
# WordPress
wp_version: latest # Or specific: "6.4.2"
wp_type: single # Or: multisite
locale: en_US
site_title: "Site Title"
# Database
db_name: database_name
db_prefix: wp_
# Admin
admin_user: admin
admin_password: password
admin_email: admin@local.test
# Plugins & Themes
delete_default_plugins: true
install_plugins:
- query-monitor
- debug-bar
- https://github.com/user/plugin.zip
install_themes:
- twentytwentyfour
# Constants
wpconfig_constants:
WP_DEBUG: true
WP_DEBUG_LOG: true
SCRIPT_DEBUG: trueBefore any commit or pull request:
- Run
git status- nowww/files appear (except defaults) - Run
git diff- review ALL changes - Run
git check-ignore www/test-site- confirms sites are ignored - Verify
.gitignoreis unmodified - Ask: "Is this improving VVV or is it site-specific?"
- If uncertain, ask the user
Only these files in www/ are committed:
www/vvv-hosts- Default hostname mappingswww/default/index.php- VVV dashboardwww/default/phpinfo/index.php- PHP info pagewww/default/xdebuginfo/index.php- Xdebug info page
Everything else in www/ is gitignored.
- Infrastructure: Vagrant, VirtualBox/Docker/Parallels
- OS: Ubuntu Linux (in VM)
- Web Server: Nginx
- Database: MySQL/MariaDB
- Languages: PHP (multiple versions: 7.4, 8.0, 8.1, 8.2, 8.3), Bash
- Tools: WP-CLI, Composer, Node.js/npm, Git
# Provision sites
vagrant up --provision
# SSH into VM
vagrant ssh
# WP-CLI in VM
vagrant ssh -c "wp --info"
# Check if path is gitignored
git check-ignore <path>
# View site configuration
cat config/config.yml- VVV is infrastructure, not content - It provides the environment, not the sites
- Configuration over files - Use
config/config.yml, not manual file creation - Separation of concerns - VVV code vs. site code are completely separate
- Gitignore by default - User content stays local unless explicitly tracked
When making VVV improvements:
- Test in a local VVV environment
- Run
vagrant up --provisionto test provisioning changes - Verify changes work across different PHP versions
- Check that existing sites aren't affected
- Update documentation if adding features
- ❓ Am I modifying VVV infrastructure or site-specific content?
- ❓ Would this change benefit all VVV users or just one site?
- ❓ Should this file be in git history?
- ❓ Am I creating files manually when config.yml could do it?
- ❓ Have I checked what's actually going to be committed?
If you're unsure about any of the following, STOP and ask the user:
- Whether a file should be committed
- Whether a change is VVV core or site-specific
- Whether to modify
.gitignore,Vagrantfile, or provisioning scripts - Whether something should be in
config/config.ymlor created manually
Better to ask than to make an inappropriate commit.
| DO ✅ | DON'T ❌ |
|---|---|
Edit config/config.yml for sites |
Create files in www/ directly |
| Commit VVV infrastructure improvements | Commit site-specific code |
Use vagrant up --provision to create sites |
Manually download/install WordPress |
| Work within site directories for development | Commit theme/plugin changes to VVV |
| Ask when uncertain | Modify .gitignore to track www/ |
Check git status before committing |
Force commit with --no-verify |
See .github/CONTRIBUTING.md for contribution guidelines.
VVV uses:
- Google's Shell Style Guide for Bash scripts
- WordPress coding standards for PHP
All PRs should target the develop branch.
Remember: VVV is like Docker Compose. The www/ folder is like volumes - it's local data, not the application itself. Keep infrastructure changes separate from content changes.