<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Khokan Sardar</title>
    <description>The latest articles on DEV Community by Khokan Sardar (@itzmekhokan).</description>
    <link>https://dev.to/itzmekhokan</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4009568%2F88960db0-0dee-48f1-858a-cbdabec57c8e.jpg</url>
      <title>DEV Community: Khokan Sardar</title>
      <link>https://dev.to/itzmekhokan</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/itzmekhokan"/>
    <language>en</language>
    <item>
      <title>How to Know What Breaks Before You Upgrade WordPress to PHP 8.4</title>
      <dc:creator>Khokan Sardar</dc:creator>
      <pubDate>Tue, 30 Jun 2026 12:30:37 +0000</pubDate>
      <link>https://dev.to/itzmekhokan/how-to-know-what-breaks-before-you-upgrade-wordpress-to-php-84-1occ</link>
      <guid>https://dev.to/itzmekhokan/how-to-know-what-breaks-before-you-upgrade-wordpress-to-php-84-1occ</guid>
      <description>&lt;p&gt;Every WordPress developer knows the feeling. A host emails: &lt;em&gt;"PHP 7.4 reaches end of life — we're moving you to 8.x."&lt;/em&gt; Or you finally want the performance and security of PHP 8.4. You stage it, click upgrade, and… white screen. Somewhere in the 40 plugins and 3 themes on the site, something called a function PHP removed years ago — and now the whole site is down.&lt;/p&gt;

&lt;p&gt;The frustrating part: &lt;strong&gt;the broken code is almost never yours.&lt;/strong&gt; It's buried in third-party plugins and themes you didn't write and can't easily read. So how do you find out what breaks &lt;em&gt;before&lt;/em&gt; you upgrade, instead of after?&lt;/p&gt;

&lt;p&gt;This post walks through exactly that, using an open-source tool called &lt;a href="https://github.com/itzmekhokan/pressready" rel="noopener noreferrer"&gt;Pressready&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why "just test it on staging" isn't enough
&lt;/h2&gt;

&lt;p&gt;Staging tells you &lt;em&gt;that&lt;/em&gt; something broke, rarely &lt;em&gt;what&lt;/em&gt; or &lt;em&gt;where&lt;/em&gt; — and only for the code paths you happen to exercise. A fatal in an admin screen or a checkout edge case you didn't click won't surface until a real user hits it. You need something that reads &lt;strong&gt;all&lt;/strong&gt; the code statically and reports every risky symbol, whether or not that path runs during your manual test.&lt;/p&gt;

&lt;p&gt;That's a job for static analysis across the whole stack.&lt;/p&gt;

&lt;h2&gt;
  
  
  Two kinds of "breakage": PHP and WordPress
&lt;/h2&gt;

&lt;p&gt;Upgrades break sites along two axes, and a good audit covers both:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The PHP axis&lt;/strong&gt; — language features that get &lt;em&gt;removed&lt;/em&gt; (e.g. &lt;code&gt;create_function()&lt;/code&gt; is gone in PHP 8.0, &lt;code&gt;each()&lt;/code&gt; in 8.0) or change behaviour between versions.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The WordPress axis&lt;/strong&gt; — core APIs that WordPress deprecates or removes from one release to the next.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Pressready checks both in a single pass: it runs &lt;a href="https://github.com/PHPCompatibility/PHPCompatibility" rel="noopener noreferrer"&gt;PHPCompatibility&lt;/a&gt; for the PHP axis and a custom PHP_CodeSniffer sniff — driven by a generated dataset of WordPress core deprecations — for the WordPress axis.&lt;/p&gt;

&lt;h2&gt;
  
  
  Install it (pick whatever fits your setup)
&lt;/h2&gt;

&lt;p&gt;No Composer in the project? Use the standalone PHAR or Docker:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Standalone PHAR — single self-contained file, just needs PHP&lt;/span&gt;
curl &lt;span class="nt"&gt;-L&lt;/span&gt; https://github.com/itzmekhokan/pressready/releases/latest/download/pressready.phar &lt;span class="nt"&gt;-o&lt;/span&gt; pressready.phar
&lt;span class="nb"&gt;chmod&lt;/span&gt; +x pressready.phar

&lt;span class="c"&gt;# Or Docker — nothing to install at all&lt;/span&gt;
docker run &lt;span class="nt"&gt;--rm&lt;/span&gt; &lt;span class="nt"&gt;-v&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$PWD&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;:/src &lt;span class="nt"&gt;-w&lt;/span&gt; /src ghcr.io/itzmekhokan/pressready:1 &lt;span class="nt"&gt;--php&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;8.4 &lt;span class="nt"&gt;--path&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;wp-content

&lt;span class="c"&gt;# Or Homebrew&lt;/span&gt;
brew tap itzmekhokan/pressready &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; brew &lt;span class="nb"&gt;install &lt;/span&gt;pressready
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Prefer it as a project dev dependency?&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;composer require &lt;span class="nt"&gt;--dev&lt;/span&gt; itzmekhokan/pressready
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Run your first scan
&lt;/h2&gt;

&lt;p&gt;Point it at &lt;code&gt;wp-content&lt;/code&gt; and tell it the PHP (and optionally WordPress) version you're targeting:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;vendor/bin/pressready &lt;span class="nt"&gt;--php&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;8.4 &lt;span class="nt"&gt;--wp&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;6.9 &lt;span class="nt"&gt;--path&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;wp-content
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You get a report grouped by component (plugin/theme), with a &lt;code&gt;file:line&lt;/code&gt; and a severity for every finding:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;✗ FATAL (1) — these break on upgrade; fix first:
    wp-content/plugins/legacy-forms/forms.php:88  Function create_function() — removed PHP 8.0

⚠ RISKY (3) — review the behaviour changes before upgrading
…
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Reading the severity model
&lt;/h2&gt;

&lt;p&gt;Pressready grades findings so you can triage instead of drowning in noise:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Severity&lt;/th&gt;
&lt;th&gt;What it means&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;fatal&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;A symbol the target version &lt;strong&gt;removed&lt;/strong&gt; — this white-screens on upgrade. Fix first.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;risky&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Behaviour changed but still runs; may produce wrong results.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;php / wp&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Deprecated (still works for now). Clear at your leisure.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The mental model: &lt;strong&gt;fix every fatal before you upgrade&lt;/strong&gt;, schedule the risky ones, and burn down deprecations over time.&lt;/p&gt;

&lt;h2&gt;
  
  
  The question you actually have: "how far can I safely go?"
&lt;/h2&gt;

&lt;p&gt;Most upgrade decisions aren't "does PHP 8.4 break this?" — they're &lt;em&gt;"how far can I move right now, and what's the first thing that stops me?"&lt;/em&gt; That's what &lt;code&gt;--matrix&lt;/code&gt; answers, grading every version in a range from a single scan:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;vendor/bin/pressready &lt;span class="nt"&gt;--php&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;7.4-8.4 &lt;span class="nt"&gt;--matrix&lt;/span&gt; &lt;span class="nt"&gt;--path&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;wp-content
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;PHP
  7.4   ✓ clear
  8.0   ✗ 1 fatal
  8.1   ✗ 1 fatal
  …
Safe through PHP 7.4 · first break: PHP 8.0
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now you know: this site can't move past 7.4 until that one plugin is fixed — and you know exactly which one.&lt;/p&gt;

&lt;h2&gt;
  
  
  Adopting it on a messy legacy site
&lt;/h2&gt;

&lt;p&gt;Inheriting a site with hundreds of pre-existing warnings? Don't try to fix them all on day one. Snapshot the current state as a &lt;strong&gt;baseline&lt;/strong&gt; and only fail on &lt;em&gt;new&lt;/em&gt; problems going forward:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;vendor/bin/pressready &lt;span class="nt"&gt;--php&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;8.4 &lt;span class="nt"&gt;--generate-baseline&lt;/span&gt;
&lt;span class="c"&gt;# later, in CI:&lt;/span&gt;
vendor/bin/pressready &lt;span class="nt"&gt;--php&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;8.4 &lt;span class="nt"&gt;--baseline&lt;/span&gt; &lt;span class="nt"&gt;--fail-on&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;fatal
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Put it in CI so it never regresses
&lt;/h2&gt;

&lt;p&gt;Pressready is built to gate pull requests. A whole GitHub Actions check is two lines:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;uses&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;actions/checkout@v4&lt;/span&gt;
&lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;uses&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;itzmekhokan/pressready@v1&lt;/span&gt;
  &lt;span class="na"&gt;with&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;php&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;8.4"&lt;/span&gt;
    &lt;span class="na"&gt;wp&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;6.9"&lt;/span&gt;
    &lt;span class="na"&gt;fail-on&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;fatal&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It also speaks SARIF (GitHub code scanning), a GitLab Code Quality report, and runs under Bitbucket, Jenkins, pre-commit, or &lt;code&gt;wp pressready&lt;/code&gt; via WP-CLI — same engine everywhere.&lt;/p&gt;

&lt;h2&gt;
  
  
  Honest limitations
&lt;/h2&gt;

&lt;p&gt;It's static analysis, so it catches &lt;strong&gt;symbol-level&lt;/strong&gt; removals and deprecations across the stack — not runtime logic regressions or data issues. PHP 8.2–8.4 detection rides on a pre-release of PHPCompatibility (a one-time opt-in during install). And the WordPress dataset is only as current as its last regeneration — it warns you on stderr if you target a newer WordPress than it knows about. For "is this site safe to move to PHP 8.4," though, it covers the scary 90% that actually takes sites down.&lt;/p&gt;

&lt;h2&gt;
  
  
  Wrapping up
&lt;/h2&gt;

&lt;p&gt;PHP upgrades don't have to be a roll of the dice. Scanning the whole stack first turns "let's hope" into a concrete punch list: &lt;em&gt;here are the fatals, here's the plugin causing them, here's how far you can safely go today.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Pressready is free and open source (GPL-2.0). If you try it on a real site, I'd love to hear what it caught — and what you wish it caught that it doesn't yet.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;⭐ GitHub: &lt;a href="https://github.com/itzmekhokan/pressready" rel="noopener noreferrer"&gt;https://github.com/itzmekhokan/pressready&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;📖 Docs &amp;amp; examples: &lt;a href="https://itzmekhokan.github.io/pressready/" rel="noopener noreferrer"&gt;https://itzmekhokan.github.io/pressready/&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;`&lt;/p&gt;

</description>
      <category>wordpress</category>
      <category>php</category>
      <category>opensource</category>
      <category>devops</category>
    </item>
  </channel>
</rss>
