<?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: WPTOOLS</title>
    <description>The latest articles on DEV Community by WPTOOLS (@themagnetnicheplab).</description>
    <link>https://dev.to/themagnetnicheplab</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%2F4157014%2F94119223-749b-482a-ac71-5f9476c90211.png</url>
      <title>DEV Community: WPTOOLS</title>
      <link>https://dev.to/themagnetnicheplab</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/themagnetnicheplab"/>
    <language>en</language>
    <item>
      <title>What actually breaks in WordPress when you upgrade PHP (and how to check before your host does it)</title>
      <dc:creator>WPTOOLS</dc:creator>
      <pubDate>Fri, 02 Oct 2026 09:50:03 +0000</pubDate>
      <link>https://dev.to/themagnetnicheplab/what-actually-breaks-in-wordpress-when-you-upgrade-php-and-how-to-check-before-your-host-does-it-pme</link>
      <guid>https://dev.to/themagnetnicheplab/what-actually-breaks-in-wordpress-when-you-upgrade-php-and-how-to-check-before-your-host-does-it-pme</guid>
      <description>&lt;p&gt;PHP 8.2 reaches end of security support on &lt;strong&gt;31 December 2026&lt;/strong&gt; (&lt;a href="https://www.php.net/supported-versions.php" rel="noopener noreferrer"&gt;php.net&lt;/a&gt;). Your site won't switch off on January 1st, but many hosts will start moving sites to newer PHP versions around then, often with nothing more than an email you might skim.&lt;/p&gt;

&lt;p&gt;If you maintain WordPress sites, here's what's worth knowing before that happens.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Most "PHP 8 errors" aren't errors
&lt;/h2&gt;

&lt;p&gt;After an upgrade, most of what fills your log looks like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;PHP Deprecated: Creation of dynamic property My_Class::$foo is deprecated
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Deprecated&lt;/strong&gt; means "this will change in a future version". The site keeps working. It's a to-do item, not an emergency. The same goes for the PHP 8.1 notices about passing &lt;code&gt;null&lt;/code&gt; to built-in functions:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;PHP Deprecated: strlen(): Passing null to parameter #1 ($string) of type string is deprecated
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Fix them eventually. Don't panic about them.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. What actually takes a site down is a short list
&lt;/h2&gt;

&lt;p&gt;The real danger is &lt;strong&gt;fatal errors&lt;/strong&gt;. Coming from PHP 7.4, the classic ones are functions removed in PHP 8.0:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Removed in PHP 8.0: fatal "Call to undefined function"&lt;/span&gt;
&lt;span class="nv"&gt;$callback&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;create_function&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt; &lt;span class="s1"&gt;'$a'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'return $a * 2;'&lt;/span&gt; &lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="k"&gt;while&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt; &lt;span class="k"&gt;list&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt; &lt;span class="nv"&gt;$key&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;$value&lt;/span&gt; &lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;each&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt; &lt;span class="nv"&gt;$array&lt;/span&gt; &lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="c1"&gt;// ...&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Either of these, in any active plugin, gives you the famous white page:&lt;br&gt;
&lt;strong&gt;"There has been a critical error on this website."&lt;/strong&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  3. The sneaky one: old-style constructors
&lt;/h2&gt;

&lt;p&gt;Before PHP 8.0, a method named like its class acted as the constructor:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Old_Widget&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="n"&gt;Old_Widget&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;   &lt;span class="c1"&gt;// a constructor on PHP 7, a normal method on PHP 8&lt;/span&gt;
        &lt;span class="nv"&gt;$this&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;settings&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;array&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;On PHP 8.0+ this is just a regular method that never runs. There's &lt;strong&gt;no error on that line&lt;/strong&gt;: the object simply isn't set up, and something breaks much later, somewhere else. It's one of the hardest upgrade bugs to trace by hand.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Don't hide warnings on a broken site
&lt;/h2&gt;

&lt;p&gt;Turning off error &lt;em&gt;display&lt;/em&gt; is right for visitors. Turning off error &lt;em&gt;logging&lt;/em&gt; just hides the evidence. In &lt;code&gt;wp-config.php&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="nb"&gt;define&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt; &lt;span class="s1"&gt;'WP_DEBUG'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt; &lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="nb"&gt;define&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt; &lt;span class="s1"&gt;'WP_DEBUG_LOG'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt; &lt;span class="p"&gt;);&lt;/span&gt;      &lt;span class="c1"&gt;// writes to wp-content/debug.log&lt;/span&gt;
&lt;span class="nb"&gt;define&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt; &lt;span class="s1"&gt;'WP_DEBUG_DISPLAY'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt; &lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// visitors see nothing&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  5. The safe upgrade order
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Back up&lt;/strong&gt; the site.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Make a staging copy&lt;/strong&gt; (most hosts have a one-click button).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Switch the staging copy&lt;/strong&gt; to the new PHP version.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Check every plugin and theme&lt;/strong&gt; for the target version.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Update or replace&lt;/strong&gt; what will break.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Switch the live site&lt;/strong&gt;, then watch &lt;code&gt;debug.log&lt;/code&gt; for a few days.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Step 4 is the painful one. Clicking through pages only tests the pages you visit; code behind cron jobs, imports or payment callbacks can still fail later.&lt;/p&gt;

&lt;h2&gt;
  
  
  How I check step 4 now
&lt;/h2&gt;

&lt;p&gt;That gap is why I built a free plugin, &lt;strong&gt;&lt;a href="https://wordpress.org/plugins/compatnav-php-upgrade-checker/" rel="noopener noreferrer"&gt;CompatNav – PHP Upgrade Checker&lt;/a&gt;&lt;/strong&gt;. It reads the code of every installed plugin and theme, including custom ones, and reports:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;what &lt;strong&gt;will break&lt;/strong&gt; vs. what only shows &lt;strong&gt;deprecation notices&lt;/strong&gt;, for PHP 8.0 to 8.5&lt;/li&gt;
&lt;li&gt;only what changes between &lt;strong&gt;your current PHP version and the target&lt;/strong&gt;, so you get a short list, not thousands of warnings&lt;/li&gt;
&lt;li&gt;nothing for code that's already guarded by version checks like &lt;code&gt;PHP_VERSION_ID&lt;/code&gt; or &lt;code&gt;function_exists()&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It runs entirely on your own server: no external service, no tracking, read-only, and it never modifies code.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Honest limit:&lt;/strong&gt; it's static analysis. It reads code; it doesn't run it. Problems that depend on real data at runtime can still slip through, so step 6 (watching the log) still matters.&lt;/p&gt;

&lt;p&gt;I also write free, plain-English guides for the most common errors (the critical error after a PHP update, "Creation of dynamic property is deprecated", and more) at &lt;a href="https://compatnav.com/guides/" rel="noopener noreferrer"&gt;compatnav.com/guides&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Disclosure: I'm the developer. It's free, with no ads and no upsell inside the plugin. If it flags something wrong on your site, I'd really like to hear about it in the comments.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>wordpress</category>
      <category>php</category>
      <category>laravel</category>
      <category>devplusplus</category>
    </item>
  </channel>
</rss>
