Skip to content

lps doctor

When a push or pull fails, lps doctor tells you whether the problem is the network, the plugin, or the credentials, without opening a ticket.

Terminal window
lps doctor
lps doctor --env production

The command first prints the project, environment and URL it targets (the same resolution every other command uses, including --env), then runs the checks in order:

Check Failure means
WordPress REST API reachable The site is down, the URL is wrong, or a security plugin blocks /wp-json/
Loopress plugin installed The loopress/v1 endpoints are missing: the plugin is not installed, not active, or outdated
Credentials accepted The application password is rejected by an authenticated core endpoint. When WordPress answers application_passwords_disabled_for_user, the doctor says Application Passwords are disabled for this account (enable them for that user or use another account) instead of suggesting the credentials are wrong
Plugin recent enough for this CLI loopress/v1/capabilities is missing: the plugin predates this CLI, update it. When it passes, the doctor also prints the edition and version, the environment type, the ACF, form and snippet integrations, the active theme and the state of the Loopress child theme
No leftover temporary admin accounts An interrupted Loopress Full install (see project config) left its temporary administrator behind. Re-run lps project config to remove it, or delete it in wp-admin > Users. The check only reports, it never deletes. Skipped when the credentials are rejected, and informational when they can’t list users
Hooks load and run without errors A hook file failed to load, or one of its methods threw while running (the last error, until the file is pushed again). Skipped on Loopress Light, which has no hooks

When a check gets a 403 whose body is not a WordPress JSON error (no code/message), the doctor says a firewall or security plugin (ModSecurity, Imunify360, Wordfence) probably blocked the request, instead of blaming the credentials: allow-list the request or your IP in the firewall. A 403 that is a real WordPress error keeps the credentials message. Other commands print the same diagnosis.

Each check prints ✓ or ✗ with the cause and the corrective action. If the site is unreachable or no credentials are stored, the remaining checks are skipped instead of piling up timeouts.

lps doctor exits non-zero when at least one check fails, so it can guard a CI deploy:

Terminal window
lps doctor --env staging && lps snippet push --env staging --yes
Terminal window
Project: my-site
Environment: production
URL: https://example.com
✓ WordPress REST API reachable
✓ Loopress plugin installed (loopress/v1 endpoints)
✓ Credentials accepted (authenticated request)
✓ Plugin recent enough for this CLI (loopress/v1/capabilities)
- Plugin: Loopress Full 2026.17.1, environment type "production"
- Integrations: ACF active, forms none, snippets none
- Theme: twentytwentyfive (block theme)
- Loopress child theme: twentytwentyfive-loopress, not active, `lps theme activate`
✓ No leftover temporary admin accounts
✓ Hooks load and run without errors
All checks passed.

lps doctor --json returns the same information as a structured {project, environment, url, checks, ok, pluginVersion, capabilities} object instead, with one entry per check in checks and the site’s capabilities as capabilities (absent when they couldn’t be read).