owenmedia / setup-doctor
Detects WordPress/Laravel dev-environment issues and explains fixes in plain English via Claude.
Requires
- php: >=7.4
- ext-curl: *
- ext-json: *
- ext-mysqli: *
README
A one-command dev-environment checker for WordPress and Laravel projects.
Detects the project type, runs a checklist (PHP version, .env/wp-config.php,
DB connection, folder permissions, dependencies), then asks Claude to turn
the raw results into a plain-English diagnosis with exact fix commands.
Installable as a Composer package, so anyone on the team can pull it down with one command instead of copy-pasting a script file.
Step 1 — Install PHP (if you don't have it)
Check first:
php -v
If that prints a version, skip to Step 2.
- Mac:
brew install php - Windows: install via XAMPP or
choco install php - Linux (Ubuntu/Debian):
sudo apt install php-cli php-mysqli php-curl
Step 2 — Install Composer (PHP's package manager)
Check first:
composer -v
If missing, install from https://getcomposer.org/download/ (one script, works on all OSes).
Step 3 — Get the package onto your machine
This isn't on the public Packagist registry (it's an internal tool), so it installs straight from the private GitHub repo. Ask the repo owner to add you as a collaborator first, then run:
composer global require --repository='{"type":"vcs","url":"https://github.com/parmjeet-cloud/setup-doctor"}' owenmedia/setup-doctor
That installs it globally — the setup-doctor command becomes available
from any folder, not just this one.
First time using composer global require? Add Composer's global bin
folder to your system PATH so the command is recognized:
# find the path composer global config bin-dir --absolute # then add that folder to your shell's PATH (varies by OS/shell — # usually ~/.bashrc, ~/.zshrc, or Windows Environment Variables)
Step 4 — (Optional) Set your Claude API key
Only needed for the AI-written summary — the tool fully works without it, falling back to a plain pass/fail list.
export ANTHROPIC_API_KEY="sk-ant-..."
Step 5 — Run it
From inside any WordPress or Laravel project:
cd ~/projects/my-laravel-app setup-doctor
Or point it at a project from anywhere:
setup-doctor --path=~/projects/my-wordpress-site
Alternative: install per-project instead of globally
If you'd rather keep it scoped to one project (e.g. it becomes a
composer require --dev dependency of that project):
composer require --dev owenmedia/setup-doctor vendor/bin/setup-doctor
Alternative: no Composer, just run the file directly
For a quick test without installing anything as a package:
php bin/setup-doctor --path=/path/to/project
Publishing this so composer global require owenmedia/setup-doctor works without the --repository flag
Right now teammates need the --repository=... VCS flag every time. To make
it a clean one-liner:
- This repo is already pushed to GitHub (private) ✅
- Register it once on packagist.com (private Packagist), or add the
repo URL to each teammate's global
composer.jsonunder"repositories"so they never need the flag either.
This is a follow-up step, not required to get this working today.
What it checks
Laravel
- PHP version
.envexists, andAPP_KEY/DB_HOST/DB_DATABASE/DB_USERNAMEare set- Database connection actually works
vendor/exists (composer installed)storage/andbootstrap/cache/are writable
WordPress
- PHP version
wp-config.phphas DB credentials filled in- Database connection actually works
wp-content/uploads/andwp-content/themes/are writable.htaccesspresent
Demo idea
Break something on purpose beforehand (delete an .env value, chmod 000
a folder), run setup-doctor, watch it catch and explain it, fix it live,
re-run to show green. Under two minutes, clear before/after.