Scan after deploy
cURL
One HTTP request from any CI, script or host.
Integration guide
Add a few lines of PHP and Rookflare scans your WordPress site each time WordPress finishes updating core, plugins or themes.
Overview
Setup
Step 1
Open the website, go to the Settings tab and select “Create deploy hook” in the “Scan after deploy” card. Copy the token right away: this is the only time Rookflare shows it in full. The card keeps the endpoint and the last four characters of the token.
Step 2
Add this line above “That’s all, stop editing!”. Keeping the token in wp-config.php keeps it out of the plugin code and the database, and out of backups of the database.
Sample endpoint and placeholder token. The dashboard fills in yours.
Step 3
Put this in a small custom plugin, or as a single PHP file in wp-content/mu-plugins so nobody can deactivate it by accident. Your theme’s functions.php works too, but switching themes would drop the hook.
Sample endpoint and placeholder token. The dashboard fills in yours.
Step 4
Update any plugin from Dashboard → Updates, or run wp plugin update with a plugin name. When the update finishes, “Last used” changes on the Rookflare card and the website’s Scan history shows a scan with the trigger “After deploy”.
Troubleshooting
The ref is the WordPress version, and calls with the same ref within 24 hours return the scan that ref already started. A plugin update later on the same day therefore does not start another scan; the scheduled scans still cover it.
The hook reads the ROOKFLARE_DEPLOY_TOKEN constant. Install it only on the site whose wp-config.php defines that constant, such as production, and not on staging copies without it.
upgrader_process_complete only runs for updates through WordPress’s upgrader. If you ship theme or plugin code from a repository, call the deploy hook from that deploy script with the cURL request.
401 means a wrong, rotated or revoked token, 402 a plan or daily limit, 409 an unverified or paused website and 429 more than 30 calls a minute. The cURL guide explains each answer and what to do.
The first call starts a scan and the calls that arrive while it runs join it. The hook sends the WordPress version as the ref, so updates on the same day with the same version start one scan.
WordPress runs the old copy of a plugin during its own update, so the hook still fires. If you keep the hook in a must-use plugin, it is never part of a plugin update.
No. It runs after updates only. New content is covered by your scheduled scans.
Add your address, pick the pages and approve the first scan as your baseline.
Plans start at €19 per month. Prices are provisional.