<?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: Marinnov Nikola</title>
    <description>The latest articles on DEV Community by Marinnov Nikola (@serdiniakos).</description>
    <link>https://dev.to/serdiniakos</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%2F3996985%2Fa4c33a94-51ce-4ab2-b1db-ebdb58b94e08.png</url>
      <title>DEV Community: Marinnov Nikola</title>
      <link>https://dev.to/serdiniakos</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/serdiniakos"/>
    <language>en</language>
    <item>
      <title>Fixing the WordPress "Persistent Object Cache" Warning Without Accidentally Freezing Your Dashboard</title>
      <dc:creator>Marinnov Nikola</dc:creator>
      <pubDate>Tue, 30 Jun 2026 12:59:08 +0000</pubDate>
      <link>https://dev.to/serdiniakos/fixing-the-wordpress-persistent-object-cache-warning-without-accidentally-freezing-your-dashboard-kgi</link>
      <guid>https://dev.to/serdiniakos/fixing-the-wordpress-persistent-object-cache-warning-without-accidentally-freezing-your-dashboard-kgi</guid>
      <description>&lt;p&gt;Today I opened my WordPress dashboard, ran a Site Health check, and saw a warning that said: "&lt;strong&gt;You should use a persistent object cache.&lt;/strong&gt;"&lt;/p&gt;

&lt;p&gt;To be completely honest, I had no clue what a persistent object cache actually was. As you probably know from &lt;a href="https://dev.to/serdiniakos/an-ai-built-my-wordpress-theme-then-i-found-the-performance-bugs-it-left-behind-59hg"&gt;my previous post&lt;/a&gt;, I’m still a wanna-be developer learning the ropes. But after reading up on it, it became clear that saving database queries in the server's memory would make my site much faster. It sounded like a mandatory tweak, so I decided to turn it on.&lt;/p&gt;

&lt;p&gt;Since I already had the LiteSpeed Cache plugin running on my site, I figured I’d handle it directly through there. I went to LiteSpeed Cache &amp;gt; Cache &amp;gt; Object tab, toggled the &lt;strong&gt;Object Cache&lt;/strong&gt; option to &lt;strong&gt;ON&lt;/strong&gt;, and selected &lt;strong&gt;Redis&lt;/strong&gt; as the method. At this point, I totally didn't realize I had to change the &lt;strong&gt;host&lt;/strong&gt; and &lt;strong&gt;port&lt;/strong&gt; settings as well, so I just clicked save.&lt;/p&gt;

&lt;p&gt;That’s when everything went south.&lt;/p&gt;

&lt;p&gt;Instantly, my WordPress admin panel froze. Every time I clicked a menu, the page loaded indefinitely until it finally timed out and hit me with the dreaded "critical error on this website" screen. I couldn't even load the settings page to toggle it back off. I was completely locked out of my backend.&lt;/p&gt;

&lt;p&gt;I even tried deleting the plugin files through my hosting file manager and reinstalling it from scratch, but it had absolutely no effect. The moment I activated it again, the error returned because the broken settings were permanently stuck inside the WordPress database. Out of options and completely stuck, I asked AI for help, and it gave me the advice to bypass the broken WordPress UI entirely using code.&lt;/p&gt;

&lt;p&gt;Here is what actually happened under the hood. By default, LiteSpeed Cache assumes your server runs Redis over a standard network port on localhost. But my hosting provider (&lt;em&gt;JetHost&lt;/em&gt;) isolates environments and uses a &lt;strong&gt;UNIX socket path&lt;/strong&gt; instead of a network port. Because WordPress kept trying to talk to a network port that wasn’t listening, it got stuck in an endless connection timeout loop on every single page load.&lt;/p&gt;

&lt;p&gt;Following the AI's advice, I logged into my hosting client area, opened the File Manager, and edited my main &lt;em&gt;wp-config.php&lt;/em&gt; file. Right before the line that says &lt;em&gt;/* That's all, stop editing! Happy publishing. */&lt;/em&gt;, I added these two lines to force the object cache off at the root level:&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;'LITESPEED_CONF'&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;'LITESPEED_CONF__OBJECT'&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;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The moment I saved the file, my WordPress dashboard instantly unlocked and loaded normally again.&lt;/p&gt;

&lt;p&gt;Next, I went back to my hosting control panel and opened their native "Redis Manager" tool. I turned the Redis status to Active and copied the unique connection socket path they provided. It looked like this:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;/home/example/.jethost-redis/redis.sock&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;With the dashboard now accessible, I went back to the LiteSpeed Object Cache settings page. It was loading perfectly fine because my wp-config.php code was keeping the broken cache script asleep.&lt;/p&gt;

&lt;p&gt;I filled out the configuration fields using the exact data from my host:&lt;/p&gt;

&lt;p&gt;In the Host field, I deleted localhost and pasted the UNIX socket path.&lt;/p&gt;

&lt;p&gt;In the Port field, I changed it to 0. This is crucial because UNIX sockets don't use network ports, so the value must be zero.&lt;/p&gt;

&lt;p&gt;I clicked Save Changes.&lt;/p&gt;

&lt;p&gt;Finally, I went back to my &lt;em&gt;wp-config.php&lt;/em&gt; file and deleted the two temporary lines I added earlier so the plugin could actually do its job.&lt;/p&gt;

&lt;p&gt;I refreshed the WordPress settings page, flipped Object Cache to ON, and hit save one last time. The connection test immediately changed to a green "Passed". No more dashboard freezes, the Site Health warning is gone, and the site is running exactly how it should.&lt;/p&gt;

&lt;p&gt;After that, I fixed the exact same issue in the blog section of the Romanian version of the &lt;a href="https://eduboom.com/" rel="noopener noreferrer"&gt;Eduboom&lt;/a&gt; website. This time, I edited the host and port fields right from the beginning, which saved me an extra hour of fixing self-created problems.&lt;/p&gt;

</description>
      <category>redis</category>
      <category>wordpress</category>
      <category>webdev</category>
      <category>beginners</category>
    </item>
    <item>
      <title>An AI Built My WordPress Theme. Then I Found the Performance Bugs It Left Behind.</title>
      <dc:creator>Marinnov Nikola</dc:creator>
      <pubDate>Tue, 23 Jun 2026 05:27:13 +0000</pubDate>
      <link>https://dev.to/serdiniakos/an-ai-built-my-wordpress-theme-then-i-found-the-performance-bugs-it-left-behind-59hg</link>
      <guid>https://dev.to/serdiniakos/an-ai-built-my-wordpress-theme-then-i-found-the-performance-bugs-it-left-behind-59hg</guid>
      <description>&lt;p&gt;I’m what you’d call a “wannabe developer.” My main focus is SEO, but I like trying new things and getting my hands dirty when something breaks. &lt;/p&gt;

&lt;p&gt;The project was simple enough: a WordPress site dedicated to the 90s classic PC games I keep recommending to people. Instead of hand-coding the theme, I described the layout I wanted, gave an AI the homepage content, and asked it to build a custom theme from scratch.&lt;/p&gt;

&lt;p&gt;To be fair, it did a decent job. The site launched with a perfect 100/100 on Lighthouse for both mobile and desktop. Clean HTML, fast load, no obvious mess. &lt;/p&gt;

&lt;p&gt;Then I made a few small content edits to the homepage, re-ran the test, and the mobile score dropped to 89. Desktop stayed at a clean 100. &lt;/p&gt;

&lt;p&gt;This is not a deep performance war story. The fix was a single image attribute. But the reason that attribute ended up in the wrong place says a lot about why AI-generated code still needs a human code review.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Symptom: Visual Priority vs. DOM Order
&lt;/h2&gt;

&lt;p&gt;A flawless desktop score next to an 89 on mobile is classic throttling behavior. Fast desktop connections easily mask critical path bottlenecks that PageSpeed’s simulated 4G and mid-range mobile hardware immediately expose. The drop indicated an asset was needlessly competing for early bandwidth.&lt;/p&gt;

&lt;p&gt;The mobile report pointed straight to an image in the Largest Contentful Paint (LCP) path: a screenshot from Disney’s &lt;em&gt;Aladdin&lt;/em&gt;. &lt;/p&gt;

&lt;p&gt;That was odd, because the image is not visible on the initial screen. The homepage opens with a massive data table of games spanning roughly 25 rows, you can see the live layout at &lt;a href="https://bestclassicpcgames.com" rel="noopener noreferrer"&gt;bestclassicpcgames.com&lt;/a&gt;. On a mobile viewport, that table completely takes over the screen and pushes the actual game sections deep below the fold. The &lt;em&gt;Aladdin&lt;/em&gt; screenshot is the first image in the source code, but visually, it is nowhere near the initial viewport. &lt;/p&gt;




&lt;h2&gt;
  
  
  The Bug: A Naive Heuristic
&lt;/h2&gt;

&lt;p&gt;Checking the theme template revealed the issue:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;img&lt;/span&gt; &lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;"..."&lt;/span&gt; &lt;span class="na"&gt;alt=&lt;/span&gt;&lt;span class="s"&gt;"Aladdin video game"&lt;/span&gt; &lt;span class="na"&gt;width=&lt;/span&gt;&lt;span class="s"&gt;"800"&lt;/span&gt; &lt;span class="na"&gt;height=&lt;/span&gt;&lt;span class="s"&gt;"450"&lt;/span&gt; &lt;span class="na"&gt;fetchpriority=&lt;/span&gt;&lt;span class="s"&gt;"high"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The code is valid, but the assumption is wrong. The AI relied on a naive heuristic: it assumed the first image tag in the HTML source code was the hero image. &lt;/p&gt;

&lt;p&gt;In a standard blog layout, that logic usually holds up. But lacking spatial awareness of the massive HTML table altering the viewport hierarchy, the AI forced mobile browsers to waste limited early bandwidth downloading a hidden asset. &lt;/p&gt;

&lt;p&gt;The fix was immediate:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;img&lt;/span&gt; &lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;"..."&lt;/span&gt; &lt;span class="na"&gt;alt=&lt;/span&gt;&lt;span class="s"&gt;"Aladdin video game"&lt;/span&gt; &lt;span class="na"&gt;width=&lt;/span&gt;&lt;span class="s"&gt;"800"&lt;/span&gt; &lt;span class="na"&gt;height=&lt;/span&gt;&lt;span class="s"&gt;"450"&lt;/span&gt; &lt;span class="na"&gt;loading=&lt;/span&gt;&lt;span class="s"&gt;"lazy"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Chasing the Cache Ghost
&lt;/h2&gt;

&lt;p&gt;The code update was correct, but the first retest still returned an 89 and showed &lt;code&gt;fetchpriority="high"&lt;/code&gt; in the rendered source. &lt;/p&gt;

&lt;p&gt;I spent twenty minutes looking for a phantom optimization layer, a WordPress filter, or a plugin conflict before realizing I was just being gaslit by a server-side cache. The template was already fixed, but the caching layer was cheerfully serving the pre-edit HTML. &lt;/p&gt;

&lt;p&gt;Once I purged the cache properly, the issue disappeared. Mobile snapped back to a stable 100 with a 1.0s LCP. It was a useful reminder: before chasing a performance regression, make sure the testing tool is actually seeing the code you changed.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Takeaway for Auditing AI Themes
&lt;/h2&gt;

&lt;p&gt;The AI didn't "fail" here; it made a reasonable guess based purely on source order. But because AI lacks visual and contextual awareness of the rendered page, it can write technically flawless code that completely reverses your asset delivery strategy.&lt;/p&gt;

&lt;p&gt;If you are using LLMs to scaffold themes or components, add a quick global grep to your review pipeline:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Audit &lt;code&gt;fetchpriority&lt;/code&gt; and &lt;code&gt;loading="lazy"&lt;/code&gt;:&lt;/strong&gt; Verify them against the actual viewport hierarchy rather than DOM order. Look out for images buried under heavy layout elements, data tables, or hero sliders.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Isolate the Testing Environment:&lt;/strong&gt; Save yourself the debugging panic, always purge your server caching layers and test cleanly to avoid auditing stale code.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;AI-generated code is clean enough to ship, but it still requires a human to verify whether its structural assumptions match reality.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>wordpress</category>
      <category>lcp</category>
    </item>
  </channel>
</rss>
