- Home
- Skills
- APIs & Backend
- WordPress PHP Upgrade Preflight
WordPress PHP Upgrade Preflight
Your host says PHP 7.4 / 8.0 / 8.1 is going away, or a PHP security release means you must move to a supported branch.
Free
Works with the AI Agents you already use
WordPress PHP Upgrade Preflight
Example session with this skill installed
Our host says PHP 7.4 will be retired next month. Before we switch our WordPress shop to PHP 8.3, check what will break. Production is /var/www/shop, and there is a staging copy at /var/www/staging-shop.
- Read your context and instructions
- Compiled the wordpress php upgrade
Summary
Example site (sample output). Web PHP
7.4.33, CLI PHP 8.1, target
8.3. Verdict:
ready after fixes - 2 blockers, 5 warnings, 11 deprecations. A full backup from today exists; PHP can be switched back from the host panel in about 5 minutes.
Blockers (fix before switching)
| Component | Version | Problem | Evidence | Fix |
|---|---|---|---|---|
| shop-child (theme) | custom | create_function() removed in PHP 8.0 | functions.php:212 | Replace with an anonymous function |
| legacy-contact-form (plugin) | 2.1.0, no release since 2019 | each() removed in PHP 8.0; fatal on form submit | includes/mailer.php:88, debug.log on staging | Replace with a maintained form plugin |
Warnings and deprecations
| Component | Problem | Evidence | Fix |
|---|---|---|---|
| shop-child | Dynamic properties (8.2) | debug.log, 6 entries | Declare properties |
| invoice-pdf (plugin) | utf8_encode() deprecated (8.2) | lib/pdf.php:41 | Update to 3.4 (available) |
| shop-child | strftime() deprecated (8.1) | inc/dates.php:17 | Use wp_date() |
Upgrade plan
- Take a fresh backup and confirm the restore steps.
- On staging: update invoice-pdf, replace legacy-contact-form, patch shop-child.
- Switch staging to PHP 8.3 and retest home, product, cart, checkout, contact and admin screens.
- Switch production in a quiet hour, purge the page cache, retest the same pages.
- Keep the rollback ready for 24 hours.
Not checked
Premium plugin payment-gateway-x is encoded, so it was not scanned. Ask the vendor to confirm PHP 8.3 support.
Connects securely to your tools. The creator never sees your data.
About this skill
Your host says PHP 7.4 / 8.0 / 8.1 is going away, or a PHP security release means you must move to a supported branch. The hard part is not clicking the PHP switch. It is knowing what will break before you click it.
This skill makes your agent do the preflight a WordPress maintenance engineer would do, and hand you a report you can act on.
What it does
- Finds the PHP version the site really runs on (web vs CLI are often different) and any
.htaccess/.user.inipins that override the control panel. - Inventories core, themes, plugins, must-use plugins and drop-ins with WP-CLI, including declared
Requires PHPheaders and pending updates. - Scans code for incompatibilities: uses
phpcs+PHPCompatibilityWPif you already have it, otherwise the bundled read-only grep triage script. - Guides a runtime check on a staging copy: what to enable, which pages to hit, and how to classify
debug.logentries into blockers, warnings and deprecations (null-to-string calls and dynamic properties only show up here). - Checks backup and rollback: today's backup, how to switch PHP back, which caches to purge.
- Writes the report: verdict, blockers with file:line evidence, warnings, an ordered upgrade plan, and an explicit "not checked" list.
Safety
- Read-only. It never updates plugins, never edits
php.ini,.htaccessorwp-config.php, never switches the PHP version. - Never prints
wp-config.phpcontents. Database passwords, keys and salts stay out of the output. - No network calls. Nothing is installed without your approval.
What's inside
SKILL.md- the step-by-step workflow and report templatereferences/php-version-changes.md- PHP 7.0 to 8.4 changes that break WordPress code, each with the usual fixscripts/scan-php-compat.sh- read-only grep triage scan (bash + grep), tested against sample code for false positives
Requirements
Shell access to the site files (ideally a staging or local copy) and WP-CLI. PHP_CodeSniffer with PHPCompatibilityWP is optional but recommended.
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for APIs & Backend.
Read-only: does not edit files or change PHP versions. Requires WP-CLI. Patterns may miss logic errors that only occur at runtime. Staging environment needed for full log analysis.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
This skill has been used 5 times.
Trust & safety
Security scan
Security scan passed 21 days ago
- Free with an Agensi account
Permissions
File Scopes
Shell is used only for read-only commands: php -v, WP-CLI list/get commands, grep and the bundled scan script. The skill does not write files, change settings or make network requests.