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
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
Plugin version Informational: shown when the plugin exposes it (Loopress Full)

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)
Authentication failed (401) on https://example.com/wp-json/wp/v2/users/me. Check your credentials with `lps project config`.
- Plugin version: not exposed by this plugin edition.
1 check failed.

lps doctor --json returns the same information as a structured {project, environment, url, checks, ok, pluginVersion} object instead, with one entry per check in checks.