<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom"><title>Guguweb - wordpress</title><link href="https://www.guguweb.com/" rel="alternate"></link><link href="https://www.guguweb.com/feeds/wordpress.atom.xml" rel="self"></link><id>https://www.guguweb.com/</id><updated>2022-01-14T21:13:51+01:00</updated><subtitle>Freelance developer and sysadmin</subtitle><entry><title>The site is experiencing technical difficulties in WordPress. Now what?</title><link href="https://www.guguweb.com/2019/09/26/the-site-is-experiencing-technical-difficulties-in-wordpress-now-what/" rel="alternate"></link><published>2019-09-26T12:19:58+00:00</published><updated>2022-01-14T21:13:51+01:00</updated><author><name>Augusto Destrero</name></author><id>tag:www.guguweb.com,2019-09-26:/2019/09/26/the-site-is-experiencing-technical-difficulties-in-wordpress-now-what/</id><summary type="html">&lt;p&gt;Since &lt;a href="https://wordpress.org/news/2019/05/jaco/"&gt;WordPress version 5.2&lt;/a&gt; &amp;#8211; in the case of fatal errors in your code &amp;#8211; the scary WSOD (white screen of death) was substituted with a more elegant page with an error message &amp;#8220;The site is experiencing technical difficulties&amp;#8221;.&lt;/p&gt;
&lt;p&gt;This kind of errors usually depend on some plugin which is incompatible …&lt;/p&gt;</summary><content type="html">&lt;p&gt;Since &lt;a href="https://wordpress.org/news/2019/05/jaco/"&gt;WordPress version 5.2&lt;/a&gt; &amp;#8211; in the case of fatal errors in your code &amp;#8211; the scary WSOD (white screen of death) was substituted with a more elegant page with an error message &amp;#8220;The site is experiencing technical difficulties&amp;#8221;.&lt;/p&gt;
&lt;p&gt;This kind of errors usually depend on some plugin which is incompatible with another one or a missing dependency on your server. It can also be related to your memory_limit setting in php.ini, where the default value of 128M is not sufficient for your website.&lt;/p&gt;
&lt;p&gt;If you experience this error and you google for it, you can find many tutorials on how to fix the error. It basically involves adding these lines to your &lt;code&gt;wp-config.php&lt;/code&gt;:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="cp"&gt;&amp;lt;?php&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;&amp;#39;WP_DEBUG&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&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;&amp;#39;WP_DEBUG_LOG&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&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;&amp;#39;WP_DEBUG_DISPLAY&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;false&lt;/span&gt; &lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="cp"&gt;?&amp;gt;&lt;/span&gt;&lt;span class="x"&gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;And then looking for PHP errors in the &lt;code&gt;wp-content/debug.log&lt;/code&gt; file.&lt;/p&gt;
&lt;p&gt;In my case I had an error, I saw the message, but nothing showed up in the debug log. Also I had nothing in Apache logs.&lt;/p&gt;
&lt;p&gt;I digged into the WordPress code and saw that the message &amp;#8220;The site is experiencing technical difficulties&amp;#8221; is shown in the &lt;code&gt;wp-includes/class-wp-fatal-error-handler.php.&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;There I found an interesting part of code that lets you customize how the error will be shown to the user. You should create a file named &lt;code&gt;php-error.php&lt;/code&gt; inside the &lt;code&gt;wp-content&lt;/code&gt; directory. In my case the file content is very simple:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="cp"&gt;&amp;lt;?php&lt;/span&gt;
&lt;span class="nb"&gt;print_r&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$error&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="cp"&gt;?&amp;gt;&lt;/span&gt;&lt;span class="x"&gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;In this way I could see what the actual error was and I was able to solve it!&lt;/p&gt;
&lt;p&gt;Do you need help with your WordPress site? Please have a look at my &lt;a href="https://www.guguweb.com/service/wordpress/"&gt;WordPress services&lt;/a&gt;.&lt;/p&gt;</content><category term="web"></category><category term="debug"></category><category term="php"></category><category term="wordpress"></category></entry></feed>