<?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: Markus Delos Santos</title>
    <description>The latest articles on DEV Community by Markus Delos Santos (@markus_delossantos_4f2ae).</description>
    <link>https://dev.to/markus_delossantos_4f2ae</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%2F4270123%2F8aba3a1c-a5cc-4df1-850f-b9ff8daaf70c.jpg</url>
      <title>DEV Community: Markus Delos Santos</title>
      <link>https://dev.to/markus_delossantos_4f2ae</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/markus_delossantos_4f2ae"/>
    <language>en</language>
    <item>
      <title>npm install prerender fails with "Failed to locate: CL.exe" on Windows: what it means and the fix</title>
      <dc:creator>Markus Delos Santos</dc:creator>
      <pubDate>Sat, 28 Nov 2026 08:37:28 +0000</pubDate>
      <link>https://dev.to/markus_delossantos_4f2ae/npm-install-prerender-fails-with-failed-to-locate-clexe-on-windows-what-it-means-and-the-fix-1jaf</link>
      <guid>https://dev.to/markus_delossantos_4f2ae/npm-install-prerender-fails-with-failed-to-locate-clexe-on-windows-what-it-means-and-the-fix-1jaf</guid>
      <description>&lt;p&gt;You ran npm install for prerender on Windows, and the build stopped at "Failed to locate: CL.exe". CL.exe is Microsoft's C++ compiler, and the install couldn't find it. The fix is to install the Visual C++ build tools, then run npm install again from a Developer Command Prompt. And if all you wanted was the middleware for your app, check first whether you need this build at all.&lt;/p&gt;

&lt;p&gt;Microsoft's docs describe cl.exe plainly: "Use the compiler (cl.exe) to compile and link source code files into apps, libraries, and DLLs." node-gyp, per its README, is "a cross-platform command-line tool written in Node.js for compiling native addon modules for Node.js." No compiler on the machine, no build.&lt;/p&gt;

&lt;h2&gt;
  
  
  Check which prerender package you actually need
&lt;/h2&gt;

&lt;p&gt;This one is easy to miss. prerender-node describes itself as "Express middleware for prerendering javascript-rendered pages on the fly for SEO". That's the piece that goes in your app.&lt;/p&gt;

&lt;p&gt;The prerender-node README says: "We host a Prerender server at prerender.io so that you can work on more important things." It also says the middleware "will default to the service already deployed by prerender.io". You can point it at a different service with the PRERENDER_SERVICE_URL environment variable or the prerenderServiceUrl option.&lt;/p&gt;

&lt;p&gt;So if your goal is "my React or Vue site should serve HTML to crawlers through a hosted service", the package to install in your app is the middleware:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm install prerender-node --save
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;There's one catch. The same README says: "If you're testing locally, you'll need to run the prerender server locally so that it has access to your server." If that's your case, or you want to run the server yourself, keep reading and fix the compiler.&lt;/p&gt;

&lt;p&gt;If you'd rather not run the server at all, here's one option. We make RenderSwap, a hosted prerender service: your prerender-node middleware stays, and you swap the service URL and the token for the ones from your RenderSwap account. The Free plan covers 1 verified domain and 500 fresh renders or 1 browser hour a month, whichever comes first, with no card and no email to sign up. It renders only your own public pages, on domains you've verified, so it won't help with a localhost test.&lt;/p&gt;

&lt;h2&gt;
  
  
  Install the Visual C++ build tools
&lt;/h2&gt;

&lt;p&gt;node-gyp's own README covers this. The quick route uses Chocolatey and installs Python and the Visual C++ workload in one go:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;choco install python visualstudio2026-workload-vctools -y
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For the manual route, the README says that for Visual Studio 2019 or later, you use the &lt;code&gt;Desktop development with C++&lt;/code&gt; workload. For anything older, it says to install Visual Studio Build Tools with the Visual C++ build tools option. Microsoft's page adds that if you want only the command-line toolset, you can download the Build Tools for Visual Studio.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Already have Visual Studio 2019 or later? Add the Desktop development with C++ workload to it.&lt;/li&gt;
&lt;li&gt;Fresh machine, no Visual Studio? Use the Chocolatey line above, or Build Tools for Visual Studio if you want only the command-line toolset.&lt;/li&gt;
&lt;li&gt;Installing Node.js anyway? The windows-build-tools project notes that "the official Node.js for Windows installer can now automatically install the required tools." Look for that while you run the installer.&lt;/li&gt;
&lt;li&gt;On Windows on ARM? node-gyp says to add the components "Visual C++ compilers and libraries for ARM64" and "Visual C++ ATL for ARM64".&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you've seen advice to install windows-build-tools, check its repository page first. It now says: "This repository was archived by the owner on Sep 11, 2021. It is now read-only." Use the routes above instead.&lt;/p&gt;

&lt;h2&gt;
  
  
  Run npm install from a Developer Command Prompt
&lt;/h2&gt;

&lt;p&gt;Installing the tools isn't always the end of it. Microsoft's page says: "The tools require several environment variables to be set. These variables add the tools to the path and set the locations of include files, library files, and SDKs."&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Close every terminal, including your editor's built-in one.&lt;/li&gt;
&lt;li&gt;Open the Developer Command Prompt for your version of Visual Studio. Microsoft's page says to type developer command prompt in the desktop search box, then choose the result you want.&lt;/li&gt;
&lt;li&gt;Change to your project folder and run npm install again.&lt;/li&gt;
&lt;li&gt;Don't copy the compiler folders into your system PATH by hand. Microsoft's page says: "We don't recommend you set these variables in the Windows environment yourself."&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If the install now gets past the compile step, you're done. If it fails with a different error, read the first error line in the log, not the last one.&lt;/p&gt;

&lt;h2&gt;
  
  
  When node-gyp still can't find Visual Studio
&lt;/h2&gt;

&lt;p&gt;If the tools are installed and node-gyp still doesn't pick them up, the README suggests installing a PowerShell module:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Install-Module VSSetup -Scope CurrentUser
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In the README's words: "This will make Visual Studio detection logic use a more flexible and accessible method, avoiding PowerShell's &lt;code&gt;ConstrainedLanguage&lt;/code&gt; mode."&lt;/p&gt;

&lt;p&gt;You can also tell node-gyp which Visual Studio to use. Its --msvs_version option is described as "Set Visual Studio version (Windows only)". For one older toolset you need it: "Auto-detection fails for Visual C++ Build Tools 2015, so &lt;code&gt;--msvs_version=2015&lt;/code&gt;" needs to be added. The README notes it's not needed when run by npm as configured in its install steps.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;node-gyp configure --msvs_version=2015
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Quick reference: which fix for which setup
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Your situation&lt;/th&gt;
&lt;th&gt;What to do&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;You only need the middleware in your Express app&lt;/td&gt;
&lt;td&gt;Install prerender-node and point it at a hosted service&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;You want to run the prerender server yourself&lt;/td&gt;
&lt;td&gt;Install the Desktop development with C++ workload or Build Tools for Visual Studio&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Tools installed, error still there&lt;/td&gt;
&lt;td&gt;Re-run npm install from a fresh Developer Command Prompt&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;node-gyp can't detect Visual Studio&lt;/td&gt;
&lt;td&gt;Install the VSSetup PowerShell module, or pass --msvs_version&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Windows on ARM&lt;/td&gt;
&lt;td&gt;Add the ARM64 compiler and ATL components&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  Sources
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;{'text': 'node-gyp README: installing on Windows', 'url': '&lt;a href="https://raw.githubusercontent.com/nodejs/node-gyp/main/README.md'" rel="noopener noreferrer"&gt;https://raw.githubusercontent.com/nodejs/node-gyp/main/README.md'&lt;/a&gt;}&lt;/li&gt;
&lt;li&gt;{'text': 'Microsoft guide to the MSVC toolset on the command line', 'url': '&lt;a href="https://learn.microsoft.com/en-us/cpp/build/building-on-the-command-line'" rel="noopener noreferrer"&gt;https://learn.microsoft.com/en-us/cpp/build/building-on-the-command-line'&lt;/a&gt;}&lt;/li&gt;
&lt;li&gt;{'text': 'prerender-node middleware setup guide', 'url': '&lt;a href="https://github.com/prerender/prerender-node'" rel="noopener noreferrer"&gt;https://github.com/prerender/prerender-node'&lt;/a&gt;}&lt;/li&gt;
&lt;li&gt;{'text': 'windows-build-tools archived repository page', 'url': '&lt;a href="https://github.com/felixrieseberg/windows-build-tools'" rel="noopener noreferrer"&gt;https://github.com/felixrieseberg/windows-build-tools'&lt;/a&gt;}&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Frequently Asked Questions
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Do I need the full Visual Studio IDE to fix "Failed to locate: CL.exe"?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;No. Microsoft says that if you want only the command-line toolset, you can download the Build Tools for Visual Studio. node-gyp's README also gives a Chocolatey command that installs Python and the Visual C++ workload.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;I installed the C++ tools and still get the error. Why?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Check your terminal first. Microsoft says the tools require several environment variables, and these variables add the tools to the path. Open a new Developer Command Prompt and run npm install again from there.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Is windows-build-tools still the way to install the compiler?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Its repository was archived by the owner on Sep 11, 2021 and is read-only. The same page says the official Node.js for Windows installer can now install the required tools, and node-gyp's README lists the Visual Studio routes.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Do I need the prerender package to use prerender-node with a hosted service?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Not going by the prerender-node README. prerender-node is the Express middleware, and it defaults to the service already deployed by prerender.io. You can set PRERENDER_SERVICE_URL or prerenderServiceUrl to use a different service. The README says that if you're testing locally, you'll need to run the prerender server locally so that it has access to your server.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Originally published on &lt;a href="https://brightlabs.app/blog/prerender-npm-install-failed-to-locate-cl-exe-windows/" rel="noopener noreferrer"&gt;Bright Labs&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>seo</category>
      <category>webdev</category>
      <category>react</category>
    </item>
    <item>
      <title>WordPress events plugin for a theater: performances of a production</title>
      <dc:creator>Markus Delos Santos</dc:creator>
      <pubDate>Sat, 28 Nov 2026 08:16:54 +0000</pubDate>
      <link>https://dev.to/markus_delossantos_4f2ae/wordpress-events-plugin-for-a-theater-performances-of-a-production-4dcd</link>
      <guid>https://dev.to/markus_delossantos_4f2ae/wordpress-events-plugin-for-a-theater-performances-of-a-production-4dcd</guid>
      <description>&lt;p&gt;Running a theater calendar on WordPress gets messy fast when one production has a dozen shows across evenings and matinees. In the free The Events Calendar plugin, the cleanest setup is to create each performance as its own event and group a production's dates with an Event Category or event tag.&lt;/p&gt;

&lt;p&gt;That gives visitors one main calendar with every showtime, reusable venues and organizers, and single events you can attach tickets to. The catch is that Events Calendar Pro does not support standard tickets on recurring events, so keeping each performance as a single event matters if patrons buy tickets for a specific night.&lt;/p&gt;

&lt;h2&gt;
  
  
  Create each performance as a single event
&lt;/h2&gt;

&lt;p&gt;In your WordPress dashboard, open Events and click Add New to create a single performance. Set your show's time, and leave the All Day Event box unchecked; if you check it, you won't be able to specify a time for the event.&lt;/p&gt;

&lt;p&gt;If you leave the cost empty, no cost details show to visitors. For a free show or open rehearsal, enter a cost of 0 (zero).&lt;/p&gt;

&lt;p&gt;Giving each performance its own event puts each date and time directly on the calendar, instead of hiding dates inside one production page.&lt;/p&gt;

&lt;h2&gt;
  
  
  Group performances by production
&lt;/h2&gt;

&lt;p&gt;The Events Calendar supports only one main calendar per site, not separate calendars per show, so use event categories or tags to filter by production. You can assign categories to individual events directly in the event editor.&lt;/p&gt;

&lt;p&gt;Event categories are hierarchical, so you can nest each production as a subcategory under a season, genre, or stage parent category. The plugin automatically creates a filtered calendar archive page for every event category and event tag, showing only the events assigned to that term in all standard calendar views.&lt;/p&gt;

&lt;p&gt;Use event tags for traits that cut across productions, such as captioned shows, relaxed performances, or post-show talkbacks. Manage your tags under Events &amp;gt; Tags in the WordPress sidebar—editing an existing tag updates it across every event assigned to it.&lt;/p&gt;

&lt;p&gt;If you run Events Calendar Pro, you can also add all single performances of a production to one Series. That groups them on a Series page, and turning on Condense events in Series makes List-style views such as List view show only the next date of each Series instead of filling a list view with the same title.&lt;/p&gt;

&lt;h2&gt;
  
  
  Save stages as venues and companies as organizers
&lt;/h2&gt;

&lt;p&gt;Your stages stay constant across productions, so create each stage once as a Venue rather than re-entering it every time. Any venue or organizer you create can be reused from the Add Event page.&lt;/p&gt;

&lt;p&gt;Venue pages display a list of upcoming events associated with the venue. Keep in mind that attaching multiple venues to one event requires Events Calendar Pro.&lt;/p&gt;

&lt;p&gt;Add your theater company, producer, or director as an Organizer so you can reuse them across shows. You can add multiple organizers to an event, though when you attach more than one, organizer details like phone number and email won't show on the front end—only the organizer names are listed.&lt;/p&gt;

&lt;p&gt;Venue and Organizer pages also allow you to add a featured image, mirroring single event pages, with a 16:9 aspect ratio recommended.&lt;/p&gt;

&lt;h2&gt;
  
  
  Generate a multi-week run without manual copying
&lt;/h2&gt;

&lt;p&gt;Typing every Friday, Saturday, and Sunday performance one at a time gets tedious for a multi-week run, and you have three ways to speed it up.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Import a schedule with CSV: The Events Calendar has a built-in CSV import tool if you want to prepare your schedule in a spreadsheet.&lt;/li&gt;
&lt;li&gt;Generate weekly runs with RecurKit: For shows running on steady weekdays, we built RecurKit to work with the free The Events Calendar. Tick Repeat this event in the editor, pick your weekdays and when the series ends, and RecurKit creates each occurrence as an ordinary event with the same times, venue, organizers, categories, tags, and image. Under Events &amp;gt; Series you can update a date and every later one (title, times, venue, or description), edit a single night in the normal editor, or delete the whole series, and generated events stay as plain events if you remove RecurKit unless you choose to delete them.&lt;/li&gt;
&lt;li&gt;Schedule with Events Calendar Pro: Events Calendar Pro adds recurring events, event Series, and a duplicate event tool alongside additional calendar views and calendar shortcodes.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;RecurKit Free ($0) covers weekly repeats on any weekdays, up to 52 occurrences per series, and editing this and later occurrences or deleting a series. RecurKit Pro ($9/month per site) includes everything in Free and adds monthly rules such as the 2nd Tuesday or the 15th, custom date lists and skip dates for holidays, shifting a whole series to a new time, and series of up to 200 occurrences.&lt;/p&gt;

&lt;h2&gt;
  
  
  Sell tickets for individual show dates
&lt;/h2&gt;

&lt;p&gt;Check how ticketing fits your schedule before picking a recurring events workflow. In Events Calendar Pro, standard tickets are not supported on recurring events; you can either use a Series Pass that grants access to every event in the Series, or create single events in one Series so patrons can buy tickets for the dates they want.&lt;/p&gt;

&lt;p&gt;The free Event Tickets plugin lets you sell tickets and collect RSVPs. If you need WooCommerce or Easy Digital Downloads at checkout, Event Tickets Plus integrates with both.&lt;/p&gt;

&lt;p&gt;When each performance is a single event with tickets attached, patrons can pick a specific night and buy tickets for the dates they want.&lt;/p&gt;

&lt;h3&gt;
  
  
  Sources
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;{'text': 'The Events Calendar WordPress plugin directory overview', 'url': '&lt;a href="https://wordpress.org/plugins/the-events-calendar/'" rel="noopener noreferrer"&gt;https://wordpress.org/plugins/the-events-calendar/'&lt;/a&gt;}&lt;/li&gt;
&lt;li&gt;{'text': 'The Events Calendar guide to creating events', 'url': '&lt;a href="https://docs.nexcess.com/software/the-events-calendar/create-event/'" rel="noopener noreferrer"&gt;https://docs.nexcess.com/software/the-events-calendar/create-event/'&lt;/a&gt;}&lt;/li&gt;
&lt;li&gt;{'text': 'The Events Calendar venues and organizers documentation', 'url': '&lt;a href="https://docs.nexcess.com/software/the-events-calendar/venues-organizers/'" rel="noopener noreferrer"&gt;https://docs.nexcess.com/software/the-events-calendar/venues-organizers/'&lt;/a&gt;}&lt;/li&gt;
&lt;li&gt;{'text': 'The Events Calendar event categories and tags guide', 'url': '&lt;a href="https://docs.nexcess.com/software/the-events-calendar/event-categories-tags/'" rel="noopener noreferrer"&gt;https://docs.nexcess.com/software/the-events-calendar/event-categories-tags/'&lt;/a&gt;}&lt;/li&gt;
&lt;li&gt;{'text': 'Events Calendar Pro recurring events and tickets guide', 'url': '&lt;a href="https://docs.nexcess.com/software/the-events-calendar/events-calendar-pro/recurring-events/'" rel="noopener noreferrer"&gt;https://docs.nexcess.com/software/the-events-calendar/events-calendar-pro/recurring-events/'&lt;/a&gt;}&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Frequently Asked Questions
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Can I give each theater production its own separate calendar?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;No. The Events Calendar supports only one main calendar per site. Instead, use event categories or tags to create filtered calendar archive pages that display only that production's events in all standard calendar views.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why won't standard tickets attach to a recurring event in Events Calendar Pro?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Standard tickets are not supported on recurring events in Events Calendar Pro. To sell tickets for specific dates, create single events instead, add them to one Series, and add tickets to each event.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What happens to performance events if I remove RecurKit?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Because RecurKit creates each occurrence as an ordinary event, you choose under Events &amp;gt; Series whether uninstalling keeps those generated events (the default) or deletes them. Any event you created yourself always stays.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Can I change the venue or description for just one performance in a run?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Yes. When each performance is an ordinary event, you can open that single date in the event editor and update it without changing the other dates.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Originally published on &lt;a href="https://brightlabs.app/blog/events-plugin-for-theater-performance-of-a-production/" rel="noopener noreferrer"&gt;Bright Labs&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>wordpress</category>
      <category>webdev</category>
      <category>calendar</category>
      <category>php</category>
    </item>
    <item>
      <title>How to hide PHP warnings and deprecation notices on a live WordPress site</title>
      <dc:creator>Markus Delos Santos</dc:creator>
      <pubDate>Sat, 28 Nov 2026 08:15:24 +0000</pubDate>
      <link>https://dev.to/markus_delossantos_4f2ae/how-to-hide-php-warnings-and-deprecation-notices-on-a-live-wordpress-site-fo2</link>
      <guid>https://dev.to/markus_delossantos_4f2ae/how-to-hide-php-warnings-and-deprecation-notices-on-a-live-wordpress-site-fo2</guid>
      <description>&lt;p&gt;PHP warnings and notices are printing on your live WordPress pages. Set WP_DEBUG to false in wp-config.php to stop them, or pair WP_DEBUG_LOG with WP_DEBUG_DISPLAY set to false.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why PHP warnings and notices show on live pages
&lt;/h2&gt;

&lt;p&gt;Enabling WP_DEBUG causes all PHP errors, notices, and warnings to be displayed. You can turn off WP_DEBUG_DISPLAY independently to hide errors from your page HTML.&lt;/p&gt;

&lt;p&gt;PHP's display_errors directive also determines whether errors print to the screen in output or stay hidden from users. PHP warns that display_errors is for development and should never be used on production systems connected to the internet.&lt;/p&gt;

&lt;p&gt;Instead of displaying errors on production websites, PHP strongly advises using error logging. Pairing error logging with hidden display lets you review errors later without printing them to visitors.&lt;/p&gt;

&lt;h2&gt;
  
  
  Turn off debug mode in wp-config.php
&lt;/h2&gt;

&lt;p&gt;Before making changes to your site, make a backup or use a staging environment first. WordPress does not recommend using WP_DEBUG or other debug tools on live sites, as they are meant for local testing and staging installs.&lt;/p&gt;

&lt;p&gt;Open wp-config.php and find or insert the WP_DEBUG line before /* That's all, stop editing! Happy blogging. */. Set it to false to disable WP_DEBUG.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;define( 'WP_DEBUG', false );
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Leave false unquoted. This one is easy to miss: if you write 'false' in quotes, PHP interprets it as true because the quotes make it a string rather than a boolean.&lt;/p&gt;

&lt;h2&gt;
  
  
  Log errors to a file without displaying them
&lt;/h2&gt;

&lt;p&gt;You can turn off WP_DEBUG_DISPLAY independently and pair it with WP_DEBUG_LOG so errors can be reviewed later. Insert these constants before /* That's all, stop editing! Happy blogging. */ in wp-config.php.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );
@ini_set( 'display_errors', 0 );
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Setting WP_DEBUG_LOG to true turns on logging, or you can set it to a valid file path to save the log elsewhere.&lt;/p&gt;

&lt;p&gt;Watch one catch with @ini_set( 'display_errors', 0 ); in wp-config.php. PHP notes that changing display_errors at runtime with ini_set() has no effect if the script has fatal errors, because that runtime action does not execute. PHP also warns against using display_errors on production systems and advises using error logging instead.&lt;/p&gt;

&lt;h2&gt;
  
  
  Find which plugins need fixes before your next PHP upgrade
&lt;/h2&gt;

&lt;p&gt;To check your site's PHP version, open the WordPress Dashboard, select Tools &amp;gt; Site Health from the sidebar menu, and open the Info tab.&lt;/p&gt;

&lt;p&gt;WordPress recommends PHP 8.3 or higher. WordPress 6.9 added beta support for PHP 8.5, and WordPress 7.0 dropped support for PHP 7.2 and 7.3. Each PHP release branch gets two years of active support, then two more years for critical security fixes only. After four years, the branch reaches end of life and is no longer supported, so users should upgrade as soon as possible to avoid unpatched security vulnerabilities.&lt;/p&gt;

&lt;p&gt;If your hosting company offers a staging site, update PHP there first and test your site before updating your live site.&lt;/p&gt;

&lt;p&gt;To check installed code without turning debug output back on, I use Bright Labs Compatibility Scanner for PHP. It is a free WordPress plugin that reads every installed plugin and theme inside WordPress in short steps—needing no exec() and no shell access—and lists each file and line that uses something removed or deprecated in PHP 8.2 to 8.5 using current PHPCompatibility rules.&lt;/p&gt;

&lt;p&gt;You can also turn on its optional update pre-scan under Tools &amp;gt; Bright Labs Compatibility Scanner for PHP &amp;gt; Settings by enabling "Check offered updates before they install", which is off by default. It checks updates WordPress offers against your server's PHP version and displays a warning on Dashboard &amp;gt; Updates and the Plugins screen if it finds errors, while never stopping, delaying, or changing an update.&lt;/p&gt;

&lt;p&gt;Keep in mind that the scanner cannot promise your site will work on a newer PHP version. Because it reads code without running it, it can miss issues in code built at runtime and flag code that never runs, so treat a clean result as a good sign and test on staging first.&lt;/p&gt;

&lt;h2&gt;
  
  
  Checklist after you hide PHP warnings
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Reload your live pages and verify that no PHP errors, notices, or warnings appear in the page HTML.&lt;/li&gt;
&lt;li&gt;Confirm whether WP_DEBUG is false on your live site, or temporarily pairing WP_DEBUG_LOG with WP_DEBUG_DISPLAY set to false.&lt;/li&gt;
&lt;li&gt;Review your WP_DEBUG_LOG file (or the custom file path you set) later to inspect logged errors.&lt;/li&gt;
&lt;li&gt;Check your PHP version under Tools &amp;gt; Site Health &amp;gt; Info in the WordPress Dashboard, and test any PHP update on a staging site before updating your live site.&lt;/li&gt;
&lt;li&gt;Set WP_DEBUG back to false once you finish reviewing the log, since WordPress does not recommend using WP_DEBUG on live sites.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Sources
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;{'text': 'WordPress Advanced Administration debugging handbook', 'url': '&lt;a href="https://developer.wordpress.org/advanced-administration/debug/debug-wordpress/'" rel="noopener noreferrer"&gt;https://developer.wordpress.org/advanced-administration/debug/debug-wordpress/'&lt;/a&gt;}&lt;/li&gt;
&lt;li&gt;{'text': 'PHP runtime error and logging configuration', 'url': '&lt;a href="https://www.php.net/manual/en/errorfunc.configuration.php'" rel="noopener noreferrer"&gt;https://www.php.net/manual/en/errorfunc.configuration.php'&lt;/a&gt;}&lt;/li&gt;
&lt;li&gt;{'text': 'WordPress support guide for updating PHP', 'url': '&lt;a href="https://wordpress.org/support/update-php/'" rel="noopener noreferrer"&gt;https://wordpress.org/support/update-php/'&lt;/a&gt;}&lt;/li&gt;
&lt;li&gt;{'text': 'WordPress Core PHP version compatibility reference', 'url': '&lt;a href="https://make.wordpress.org/core/handbook/references/php-compatibility-and-wordpress-versions/'" rel="noopener noreferrer"&gt;https://make.wordpress.org/core/handbook/references/php-compatibility-and-wordpress-versions/'&lt;/a&gt;}&lt;/li&gt;
&lt;li&gt;{'text': 'PHP supported versions and end-of-life schedule', 'url': '&lt;a href="https://www.php.net/supported-versions.php'" rel="noopener noreferrer"&gt;https://www.php.net/supported-versions.php'&lt;/a&gt;}&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Frequently Asked Questions
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;I set WP_DEBUG to 'false' in wp-config.php, so why are notices still showing?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Check whether you put quotes around false. Quoted constants like 'false' are interpreted as true because the quotes make them strings rather than booleans. Write define( 'WP_DEBUG', false ); without quotes, and make sure display_errors is not enabled on your production site.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Does setting display_errors with ini_set() in wp-config.php hide fatal errors too?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;No. PHP notes that changing display_errors at runtime with ini_set() has no effect if the script has fatal errors, because the runtime action does not execute. PHP warns against using display_errors on production systems and advises using error logging instead.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Does a clean scan in Bright Labs Compatibility Scanner for PHP mean my site is ready to upgrade PHP?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The scanner cannot promise that on its own. It reads code without running it, so it can miss problems in code built at runtime and flag code that never runs. Treat a clean result as a good sign, and if your host offers a staging site, update PHP there first and test your site before updating your live site.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Originally published on &lt;a href="https://brightlabs.app/blog/hide-php-warnings-deprecation-notices-wordpress/" rel="noopener noreferrer"&gt;Bright Labs&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

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