<?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: FatalGuard</title>
    <description>The latest articles on DEV Community by FatalGuard (@fatalguard).</description>
    <link>https://dev.to/fatalguard</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%2F4250651%2Fe4c4452b-a9e7-4dda-97b5-af127a6f1477.png</url>
      <title>DEV Community: FatalGuard</title>
      <link>https://dev.to/fatalguard</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/fatalguard"/>
    <language>en</language>
    <item>
      <title>WordPress 'There Has Been a Critical Error': How to Recover</title>
      <dc:creator>FatalGuard</dc:creator>
      <pubDate>Thu, 19 Nov 2026 06:22:11 +0000</pubDate>
      <link>https://dev.to/fatalguard/wordpress-there-has-been-a-critical-error-how-to-recover-25jl</link>
      <guid>https://dev.to/fatalguard/wordpress-there-has-been-a-critical-error-how-to-recover-25jl</guid>
      <description>&lt;p&gt;&lt;em&gt;Disclosure: I build &lt;a href="https://wordpress.org/plugins/fatalguard/" rel="noopener noreferrer"&gt;FatalGuard&lt;/a&gt;, a free plugin for this problem. The steps below work without it.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;You open your site and see this:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;There has been a critical error on this website.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That page hides a PHP fatal error. Most of the time a plugin or theme caused it. Here is how to get your site back, from the easiest route to the most manual one.&lt;/p&gt;

&lt;h2&gt;
  
  
  First: do not panic, do not delete
&lt;/h2&gt;

&lt;p&gt;Nothing is lost. Your posts and settings are in the database. A broken plugin only stops PHP from running. Switch it off and the site returns. Do not delete anything yet.&lt;/p&gt;

&lt;h2&gt;
  
  
  Method 1: the recovery mode email
&lt;/h2&gt;

&lt;p&gt;Since WordPress 5.2, a fatal error sends an email to the site admin address. The subject says your site has a technical issue. The email names the plugin or theme that failed and has a &lt;strong&gt;recovery mode link&lt;/strong&gt;.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Open the email. Check spam if you do not see it.&lt;/li&gt;
&lt;li&gt;Click the link and log in.&lt;/li&gt;
&lt;li&gt;WordPress puts you in recovery mode. The broken plugin or theme is paused for you only. Visitors may still see the error.&lt;/li&gt;
&lt;li&gt;Go to &lt;strong&gt;Plugins&lt;/strong&gt; and deactivate the plugin named in the email. Or switch theme if it is a theme.&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Exit Recovery Mode&lt;/strong&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The email goes to the address in &lt;strong&gt;Settings → General&lt;/strong&gt;. If that address is old, you will not get it. The recovery link is valid for 1 day, and WordPress sends at most one such email per day. If you deleted the first one, you may have to wait or use Method 2. WordPress documents this in its &lt;a href="https://make.wordpress.org/core/2019/04/16/fatal-error-recovery-mode-in-5-2/" rel="noopener noreferrer"&gt;fatal error recovery mode&lt;/a&gt; post.&lt;/p&gt;

&lt;h2&gt;
  
  
  Method 2: rename the plugin folder over SFTP
&lt;/h2&gt;

&lt;p&gt;No email? Use SFTP, FTP, or the file manager in your host panel.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Go to &lt;code&gt;wp-content/plugins/&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Find the plugin named in the error. If you do not know, see Method 4.&lt;/li&gt;
&lt;li&gt;Rename its folder. For example &lt;code&gt;acme-shop&lt;/code&gt; becomes &lt;code&gt;acme-shop-off&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Reload your site.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;WordPress cannot find the plugin under its old name. It deactivates it. Log in, go to &lt;strong&gt;Plugins&lt;/strong&gt;, and you will see a notice that the plugin is gone. Rename the folder back to the old name and the plugin returns, deactivated.&lt;/p&gt;

&lt;p&gt;Not sure which plugin? Rename the whole &lt;code&gt;plugins&lt;/code&gt; folder to &lt;code&gt;plugins-off&lt;/code&gt;. All plugins turn off. Log in and open &lt;strong&gt;Plugins&lt;/strong&gt; once. WordPress then deactivates them all. Only after that, rename the folder back and activate them one at a time. If you rename it back before opening Plugins, the crash returns. The broken one fails when you activate it.&lt;/p&gt;

&lt;p&gt;For a theme, rename the active theme folder in &lt;code&gt;wp-content/themes/&lt;/code&gt;. WordPress falls back to a default Twenty-something theme, if one is installed. If none is installed, there is no fallback.&lt;/p&gt;

&lt;h2&gt;
  
  
  Method 3: WP-CLI
&lt;/h2&gt;

&lt;p&gt;With SSH and &lt;a href="https://developer.wordpress.org/cli/commands/" rel="noopener noreferrer"&gt;WP-CLI&lt;/a&gt; you can do it in seconds. Run these in the site root:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;wp plugin list
wp plugin deactivate acme-shop
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If WP-CLI itself crashes because of the fatal error, skip plugins for that call:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;wp --skip-plugins --skip-themes plugin deactivate acme-shop
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To change theme:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;wp theme list
wp theme activate THEME-SLUG
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Method 4: read the real error
&lt;/h2&gt;

&lt;p&gt;If you do not know the cause, read it. Add these lines to &lt;code&gt;wp-config.php&lt;/code&gt;, above the line &lt;code&gt;That's all, stop editing!&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="nf"&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="p"&gt;;&lt;/span&gt;
&lt;span class="nf"&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="p"&gt;;&lt;/span&gt;
&lt;span class="nf"&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="p"&gt;;&lt;/span&gt;
&lt;span class="nd"&gt;@ini_set&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt; &lt;span class="s1"&gt;'display_errors'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;0&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;Reload the broken page once. Open &lt;code&gt;wp-content/debug.log&lt;/code&gt;. The last lines look 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;[19-Nov-2026 09:14:02 UTC] PHP Fatal error:  Uncaught Error: Call to undefined function acme_get_price() in /var/www/html/wp-content/plugins/acme-shop/includes/cart.php:88
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Read it in three parts:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Message:&lt;/strong&gt; &lt;code&gt;Call to undefined function&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;File and line:&lt;/strong&gt; &lt;code&gt;cart.php:88&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Folder:&lt;/strong&gt; &lt;code&gt;plugins/acme-shop/&lt;/code&gt;. That is your culprit.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Now use Method 2 or 3 on that plugin. When the site is back, turn &lt;code&gt;WP_DEBUG&lt;/code&gt; off. The &lt;a href="https://developer.wordpress.org/advanced-administration/debug/debug-wordpress/" rel="noopener noreferrer"&gt;Debugging in WordPress&lt;/a&gt; page covers the constants.&lt;/p&gt;

&lt;h2&gt;
  
  
  If a core file or a theme is the cause
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Theme:&lt;/strong&gt; switch theme as above.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Core:&lt;/strong&gt; a failed update can leave files half written. Download WordPress again from wordpress.org and copy over &lt;code&gt;wp-admin&lt;/code&gt; and &lt;code&gt;wp-includes&lt;/code&gt;. Do not touch &lt;code&gt;wp-content&lt;/code&gt; or &lt;code&gt;wp-config.php&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Memory:&lt;/strong&gt; an "Allowed memory size exhausted" message means a script hit the memory limit. Raise &lt;code&gt;WP_MEMORY_LIMIT&lt;/code&gt; in &lt;code&gt;wp-config.php&lt;/code&gt; if your host allows it, otherwise in the host panel. Find which plugin uses so much.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;PHP version:&lt;/strong&gt; a new PHP version can break an old plugin. Most host panels let you switch PHP version while you update.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  After the site is back
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Update the plugin, or find a replacement. Check its support threads.&lt;/li&gt;
&lt;li&gt;Take a backup before you update again.&lt;/li&gt;
&lt;li&gt;Test updates on a staging copy when you can.&lt;/li&gt;
&lt;li&gt;Check the admin email in &lt;strong&gt;Settings → General&lt;/strong&gt; so recovery emails reach you.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Where FatalGuard helps
&lt;/h2&gt;

&lt;p&gt;The steps above need the right email, or a login to your files. &lt;a href="https://wordpress.org/plugins/fatalguard/" rel="noopener noreferrer"&gt;FatalGuard&lt;/a&gt; is a free plugin that adds a second route, if you set it up before the crash.&lt;/p&gt;

&lt;p&gt;It catches the fatal error and shows the message, file and line. With Telegram connected, it sends you an alert. Telegram alerts are free. Email alerts are in the Pro version. The alert holds a recovery link. Open it on your phone and tap once to deactivate only the crashing plugin, even when wp-admin is down and you cannot log in. Nothing is deleted. You re-enable the plugin once it is fixed.&lt;/p&gt;

&lt;p&gt;Some limits you should know:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Security plugins such as Wordfence or Jetpack are excluded on purpose. Use Recovery Mode or Method 2 for them.&lt;/li&gt;
&lt;li&gt;It is for a crash caused by a &lt;strong&gt;plugin&lt;/strong&gt;. For a theme or WordPress core, use Recovery Mode above.&lt;/li&gt;
&lt;li&gt;Telegram must be connected before the crash.&lt;/li&gt;
&lt;li&gt;The link uses a small file in &lt;code&gt;wp-content/mu-plugins&lt;/code&gt;. FatalGuard writes it, but that folder must be writable on your host.&lt;/li&gt;
&lt;li&gt;The link is signed with your site's keys, works once, and is valid for 4 hours. After that, the link page can renew it for up to 7 days.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Quick checklist
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Check your email for the recovery link.&lt;/li&gt;
&lt;li&gt;No email: rename the plugin folder by SFTP, or use WP-CLI.&lt;/li&gt;
&lt;li&gt;Not sure which plugin: enable &lt;code&gt;WP_DEBUG_LOG&lt;/code&gt; and read &lt;code&gt;debug.log&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Once the site is up, update or replace the plugin.&lt;/li&gt;
&lt;li&gt;Turn debug mode off.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Which plugin gave you the worst crash? Tell us in the comments.&lt;/p&gt;

</description>
      <category>wordpress</category>
      <category>php</category>
      <category>debugging</category>
      <category>webdev</category>
    </item>
    <item>
      <title>How to Find and Read the PHP Error Log in WordPress</title>
      <dc:creator>FatalGuard</dc:creator>
      <pubDate>Thu, 19 Nov 2026 06:20:16 +0000</pubDate>
      <link>https://dev.to/fatalguard/how-to-find-and-read-the-php-error-log-in-wordpress-5agp</link>
      <guid>https://dev.to/fatalguard/how-to-find-and-read-the-php-error-log-in-wordpress-5agp</guid>
      <description>&lt;p&gt;&lt;em&gt;Disclosure: I build &lt;a href="https://wordpress.org/plugins/fatalguard/" rel="noopener noreferrer"&gt;FatalGuard&lt;/a&gt;, a free WordPress plugin that reads these logs. You do not need it for this guide.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;A WordPress site breaks. The screen is white, or a page shows a vague message. The real reason is almost always in a log file. This guide shows you how to turn the log on, find it, and read it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Two logs, not one
&lt;/h2&gt;

&lt;p&gt;You will hear "debug log" and "PHP error log". They are not the same file.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;debug.log&lt;/strong&gt; is written by WordPress. It exists only when you turn on logging in &lt;code&gt;wp-config.php&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The PHP error log&lt;/strong&gt; is written by PHP or your web server. Its place is set by the &lt;code&gt;error_log&lt;/code&gt; setting in PHP, and your host decides the default.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Both hold PHP warnings, notices and fatal errors. Start with debug.log, because you control it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 1: turn on debug logging
&lt;/h2&gt;

&lt;p&gt;Open &lt;code&gt;wp-config.php&lt;/code&gt; in your site root. Find the line that says &lt;code&gt;That's all, stop editing!&lt;/code&gt;. Add these lines above it:&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="nf"&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="p"&gt;;&lt;/span&gt;
&lt;span class="nf"&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="p"&gt;;&lt;/span&gt;
&lt;span class="nf"&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="p"&gt;;&lt;/span&gt;
&lt;span class="nd"&gt;@ini_set&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt; &lt;span class="s1"&gt;'display_errors'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;0&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;What each one does:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;WP_DEBUG&lt;/code&gt; turns on WordPress debug mode.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;WP_DEBUG_LOG&lt;/code&gt; writes errors to a file.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;WP_DEBUG_DISPLAY&lt;/code&gt; set to &lt;code&gt;false&lt;/code&gt; hides errors from visitors. The &lt;code&gt;ini_set&lt;/code&gt; line covers hosts where PHP has &lt;code&gt;display_errors&lt;/code&gt; on. WordPress shows the same pair in its debugging guide. Keep both on a live site. Raw errors on screen can show file paths to everyone.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If &lt;code&gt;WP_DEBUG&lt;/code&gt; is already defined, change the existing line. Do not define it twice.&lt;/p&gt;

&lt;p&gt;WordPress documents these constants on the &lt;a href="https://developer.wordpress.org/advanced-administration/debug/debug-wordpress/" rel="noopener noreferrer"&gt;Debugging in WordPress&lt;/a&gt; page.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 2: find debug.log
&lt;/h2&gt;

&lt;p&gt;By default the file is here:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;wp-content/debug.log
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Open it over FTP or SFTP, or in your host's file manager. If it is not there yet, no error has happened since you turned logging on. Load the broken page once, then look again.&lt;/p&gt;

&lt;p&gt;You can also set your own path:&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="nf"&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="s1"&gt;'/path/outside/webroot/wp-errors.log'&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;&lt;code&gt;WP_DEBUG_LOG&lt;/code&gt; accepts a file path as well as &lt;code&gt;true&lt;/code&gt;. A path outside the web root is safer. A file in &lt;code&gt;wp-content&lt;/code&gt; can be fetched by a browser on some servers if you do not block it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 3: find the PHP error log
&lt;/h2&gt;

&lt;p&gt;Your host may keep a separate log. Common places:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A file called &lt;code&gt;error_log&lt;/code&gt; in the folder of the script that failed, often &lt;code&gt;public_html&lt;/code&gt; or &lt;code&gt;wp-admin&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;A "Logs" or "Errors" page in cPanel, Plesk or your host's own panel.&lt;/li&gt;
&lt;li&gt;Your host's dashboard, under logs or "PHP error log".&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;To see where PHP writes, add a small file &lt;code&gt;info.php&lt;/code&gt; with &lt;code&gt;&amp;lt;?php phpinfo();&lt;/code&gt; in the site root, open it, and search for &lt;code&gt;error_log&lt;/code&gt;. Delete the file right after. It exposes server details.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 4: read an error
&lt;/h2&gt;

&lt;p&gt;Logs can be long. Read from the bottom. New lines are added at the end.&lt;/p&gt;

&lt;p&gt;A typical fatal error 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;[19-Nov-2026 09:14:02 UTC] PHP Fatal error:  Uncaught Error: Call to undefined function acme_get_price() in /var/www/html/wp-content/plugins/acme-shop/includes/cart.php:88
Stack trace:
#0 /var/www/html/wp-content/plugins/acme-shop/acme-shop.php(41): acme_render_cart()
#1 /var/www/html/wp-includes/class-wp-hook.php(324): acme_shop_init()
#2 /var/www/html/wp-includes/plugin.php(517): WP_Hook-&amp;gt;apply_filters()
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Read it in this order:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;The level.&lt;/strong&gt; &lt;code&gt;Fatal error&lt;/code&gt; stops the page. &lt;code&gt;Warning&lt;/code&gt; and &lt;code&gt;Notice&lt;/code&gt; do not.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The message.&lt;/strong&gt; Here: a function does not exist.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The file and line.&lt;/strong&gt; &lt;code&gt;cart.php:88&lt;/code&gt; is where PHP gave up.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The path.&lt;/strong&gt; &lt;code&gt;wp-content/plugins/acme-shop/&lt;/code&gt; tells you which plugin. A path under &lt;code&gt;wp-content/themes/&lt;/code&gt; points to a theme. A path under &lt;code&gt;wp-includes/&lt;/code&gt; is core, but the cause is usually a plugin or theme that called it wrongly.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The stack trace.&lt;/strong&gt; &lt;code&gt;#0&lt;/code&gt; is the call closest to the error. Higher numbers are the callers. Look for the first line in a plugin or theme folder.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Common errors and what they usually mean
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Call to undefined function.&lt;/strong&gt; A plugin needs a function that is missing. Often another plugin is off, or a PHP extension is missing.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Allowed memory size exhausted.&lt;/strong&gt; A script used more memory than the limit. Raise it with &lt;code&gt;define( 'WP_MEMORY_LIMIT', '256M' );&lt;/code&gt; in &lt;code&gt;wp-config.php&lt;/code&gt; if your host allows it. If not, raise it in the host panel. Also ask why it needs that much.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Cannot redeclare function.&lt;/strong&gt; Two plugins, or two copies of one plugin, define the same function.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Uncaught TypeError.&lt;/strong&gt; Code passed the wrong kind of value. This often appears after a PHP version upgrade, when an old plugin does not match the new PHP.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Parse error / syntax error.&lt;/strong&gt; A typo in a PHP file. Usually from a hand edit or a broken upload.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Warning: Undefined variable or array key.&lt;/strong&gt; Not fatal. It is noise from sloppy code. Fix it when you have time.&lt;/p&gt;

&lt;h2&gt;
  
  
  A few tips
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Turn it off when done.&lt;/strong&gt; Set &lt;code&gt;WP_DEBUG&lt;/code&gt; back to &lt;code&gt;false&lt;/code&gt; on a live site. A log can grow large.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Do not share the log in public.&lt;/strong&gt; It can hold paths, URLs and sometimes data. Remove secrets before you paste it into a forum.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Search the message.&lt;/strong&gt; Copy the part after "Fatal error:", without the paths, and search for it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Test the plugin.&lt;/strong&gt; If the path names a plugin, deactivate it and see if the error stops.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Check PHP version.&lt;/strong&gt; The Site Health screen under Tools shows your PHP version.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Where FatalGuard helps
&lt;/h2&gt;

&lt;p&gt;If you would rather not edit files and open logs over FTP, the free plugin &lt;a href="https://wordpress.org/plugins/fatalguard/" rel="noopener noreferrer"&gt;FatalGuard&lt;/a&gt; can help. It shows your debug.log and PHP error log in a viewer in the admin bar, with search and a live tail. Repeated errors are grouped with a count. It can also write the &lt;code&gt;WP_DEBUG&lt;/code&gt; constants to &lt;code&gt;wp-config.php&lt;/code&gt; for you through one switch, and restore your old values when you switch it off. If your host does not let it edit the file, it shows the exact lines to paste.&lt;/p&gt;

&lt;p&gt;It also catches the fatal error behind the "critical error" screen and can send it to Telegram. That is free. The plugin is not a replacement for knowing how to read a log. It saves you the trip to the server.&lt;/p&gt;

&lt;p&gt;Note one thing. FatalGuard keeps its logs in its own protected folder, not in the standard &lt;code&gt;wp-content/debug.log&lt;/code&gt; place. Its Status tab shows the real path.&lt;/p&gt;

&lt;h2&gt;
  
  
  Summary
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Add the four lines from Step 1 to &lt;code&gt;wp-config.php&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Reload the broken page.&lt;/li&gt;
&lt;li&gt;Open &lt;code&gt;wp-content/debug.log&lt;/code&gt;, or your host's PHP error log.&lt;/li&gt;
&lt;li&gt;Read from the bottom: level, message, file, line.&lt;/li&gt;
&lt;li&gt;The folder in the path names the plugin or theme at fault.&lt;/li&gt;
&lt;li&gt;Turn debug mode off when done.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Got an error you cannot read? Paste the message below, without paths or secrets, and others may help you read it.&lt;/p&gt;

</description>
      <category>wordpress</category>
      <category>php</category>
      <category>debugging</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
