CLI Commands Reference
All available php spark commands in Pubvana, with options and usage notes.
TL;DR
Run any command from the project root: php spark <command>. All commands are safe to run manually and will not double-fire side effects that the cron job handles.
Details
The following commands are registered by Pubvana. Run php spark list to see all commands including those added by CodeIgniter 4 core.
php spark posts:publish
Publishes scheduled posts whose published_at timestamp has passed.
- No options.
- Intended to run every minute via cron (handled automatically when using
php spark cron minute). - Safe to run manually to force-publish any overdue scheduled posts.
- Each published post triggers
SocialSharingService::share()ifshare_on_publishis set.
php spark links:check
Scans all published posts and pages for broken external links.
- No options.
- Makes an HTTP HEAD request per URL (10-second timeout); falls back to GET if HEAD is refused.
- Results are stored in the database and viewable at Admin → Broken Links.
- Recommended: run weekly via cron (
0 2 * * 1 /usr/bin/php /path/to/spark links:check).
php spark marketplace:revalidate
Re-validates all premium marketplace license keys against pubvana.net.
- Option:
--force— bypasses the revalidation cache and checks all licenses immediately, regardless of when they were last validated. - Automatically skipped on localhost and dev environments.
- Useful after renewing or transferring a license.
php spark pubvana:backup
Creates a full site backup (all files + MySQL database dump) as a timestamped zip in writable/backups/.
- Option:
--trigger=manual|pre-update|pre-rollback|post-rollback— labels the backup with how it was initiated (default:manual). - Option:
--email=admin@example.com— records which admin initiated the backup in the activity log. - Backups older than the 15-backup retention limit are deleted automatically.
php spark pubvana:update
Downloads and applies the latest CMS update from GitHub.
- Creates a pre-update backup before touching any files.
- Option:
--dry-run— checks for updates and reports what would happen without making any changes. - Option:
--email=admin@example.com— records the initiating admin in the activity log. - Skipped on localhost/dev environments.
php spark pubvana:rollback <filename>
Restores the site from a backup zip.
- Argument: backup filename, e.g.
2026-03-29_143022-full.zip. The file must exist inwritable/backups/. - Creates a safety backup of the current state before restoring.
- Option:
--email=admin@example.com— records the initiating admin in the activity log. - Example:
php spark pubvana:rollback 2026-03-29_143022-full.zip
php spark wp:import <file>
Imports content from a WordPress WXR XML export file.
- Argument: path to the XML file, e.g.
/tmp/wordpress-export.xml. - Option:
--dry-run— previews what would be imported without writing to the database. - Imports: posts, pages, categories (with hierarchy), tags, comments (with threading and status).
- Author mapping: WordPress authors matched to Pubvana users by email; unmatched authors assigned to the importing admin.
php spark cron minute
The Pubvana Cron system entry point.
- Runs all registered tasks that are due at the moment of invocation.
- This is the recommended single crontab command — runs every registered task, including
posts-publishandpubvana-update-chain. - No options needed for normal operation.
php spark queue:work pubvana
Starts the queue worker for the pubvana queue.
- Processes backup, update, and rollback jobs asynchronously.
- Should be run as a long-running service (systemd, Supervisor) rather than directly from cron.
- Optional: without a running worker, Pubvana falls back to
exec()or synchronous execution.