<?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: Calin V.</title>
    <description>The latest articles on DEV Community by Calin V. (@cifi).</description>
    <link>https://dev.to/cifi</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%2F3658259%2F02bbd431-c075-4dfc-ba6c-6a7613be99b4.jpg</url>
      <title>DEV Community: Calin V.</title>
      <link>https://dev.to/cifi</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/cifi"/>
    <language>en</language>
    <item>
      <title>Finding and removing fake WordPress sign-ups with WP-CLI</title>
      <dc:creator>Calin V.</dc:creator>
      <pubDate>Fri, 04 Dec 2026 09:57:02 +0000</pubDate>
      <link>https://dev.to/cifi/finding-and-removing-fake-wordpress-sign-ups-with-wp-cli-5g7</link>
      <guid>https://dev.to/cifi/finding-and-removing-fake-wordpress-sign-ups-with-wp-cli-5g7</guid>
      <description>&lt;p&gt;Bots create fake WordPress accounts through an open registration form. A bot finds &lt;code&gt;/wp-login.php?action=register&lt;/code&gt;, or a form from a membership plugin, and submits it thousands of times.&lt;/p&gt;

&lt;p&gt;Site size doesn't matter. Bots look for open registration forms, not for big sites.&lt;/p&gt;

&lt;p&gt;The accounts can carry spam links in profiles or comments. The bots behind them may also test whether the site emails a password, or wait for a plugin flaw that lets a Subscriber do more than it should.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Is registration open at all?
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;wp option get users_can_register
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;1&lt;/code&gt; means anyone can register through the WordPress form. If nobody needs an account on the site, close it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;wp option update users_can_register 0
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That is the same box as Settings &amp;gt; General &amp;gt; Anyone can register. Store and membership plugins can run their own sign-up forms with their own switches. On WooCommerce, check WooCommerce &amp;gt; Settings &amp;gt; Accounts &amp;amp; Privacy for account creation at checkout and on the My Account page.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Keep the default role low
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;wp option get default_role
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For the WordPress form this should print &lt;code&gt;subscriber&lt;/code&gt;. Never &lt;code&gt;editor&lt;/code&gt; or &lt;code&gt;administrator&lt;/code&gt;. Store and membership plugins can assign their own roles (WooCommerce uses &lt;code&gt;customer&lt;/code&gt;), and a membership plugin can hand new users more than you expect, so check those too.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. If you need sign-ups, add friction
&lt;/h2&gt;

&lt;p&gt;Pick two controls, not all of them. Every extra step costs real sign-ups.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A CAPTCHA on the form blocks most scripted sign-ups.&lt;/li&gt;
&lt;li&gt;Email confirmation keeps the account inactive until the owner clicks a link.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A honeypot field, a block on disposable email domains, a per-IP limit and manual approval are the other options.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. List the suspicious accounts
&lt;/h2&gt;

&lt;p&gt;Newest first:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;wp user list --role=subscriber --orderby=registered --order=DESC \
  --fields=ID,user_login,user_email,user_registered --format=csv
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;On a big site, end the command with &lt;code&gt;&amp;gt; users.csv&lt;/code&gt; and open the file in a spreadsheet.&lt;/p&gt;

&lt;p&gt;On a store or membership site, run it again with &lt;code&gt;--role=customer&lt;/code&gt; or the member role your plugin adds. Look for a burst of accounts on one day. Odd usernames and addresses from one email domain are clues too. Don't delete every Subscriber: real members live in the same list.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Delete them
&lt;/h2&gt;

&lt;p&gt;Back up the database first, and confirm every ID in the list is an account you want gone. Also check that user 1 exists and is the account that should receive their content.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;wp db &lt;span class="kd"&gt;export&lt;/span&gt; before-cleanup.sql
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Check that the export succeeded and that you could restore it. Then replace the example IDs with the ones you verified:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;wp user delete 101 102 103 --reassign=1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;--reassign=1&lt;/code&gt; moves the accounts' content to user 1 instead of deleting it. WP-CLI has no undo command. Getting the accounts back may mean restoring the database, which also rolls back every other change made since the export.&lt;/p&gt;

&lt;h2&gt;
  
  
  6. Check it worked
&lt;/h2&gt;

&lt;p&gt;Watch the Users screen for a week. If fake accounts keep appearing, find out which form they come through and whether its controls are on.&lt;/p&gt;

&lt;p&gt;If you moved the registration address with a security plugin, open the old one in a private window. It should return a 404. A moved path doesn't help when the form sits on a public page, so keep the CAPTCHA either way.&lt;/p&gt;

&lt;p&gt;The &lt;a href="https://wpghost.com/wordpress-fake-user-registrations/" rel="noopener noreferrer"&gt;original guide&lt;/a&gt; has the full table of bot controls and the WooCommerce settings.&lt;/p&gt;

</description>
      <category>wordpress</category>
      <category>security</category>
      <category>php</category>
      <category>devops</category>
    </item>
    <item>
      <title>Checking a WordPress uploads folder for PHP from the shell</title>
      <dc:creator>Calin V.</dc:creator>
      <pubDate>Thu, 26 Nov 2026 11:11:48 +0000</pubDate>
      <link>https://dev.to/cifi/checking-a-wordpress-uploads-folder-for-php-from-the-shell-3bfn</link>
      <guid>https://dev.to/cifi/checking-a-wordpress-uploads-folder-for-php-from-the-shell-3bfn</guid>
      <description>&lt;p&gt;An upload becomes an attack when the server runs it. On WordPress that file lands in &lt;code&gt;wp-content/uploads/&lt;/code&gt;, a folder that should only ever serve images, PDFs and other data.&lt;/p&gt;

&lt;p&gt;Patchstack's 2026 report counted 11,334 new vulnerabilities in the WordPress ecosystem in 2025. Plugins held 91% of them, and many plugins that take files from visitors ship their own upload code.&lt;/p&gt;

&lt;p&gt;So the checks below assume one of those plugins will let a script through at some point.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Look for PHP that is already there
&lt;/h2&gt;

&lt;p&gt;Run this from the WordPress root:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;find wp-content/uploads -type f \
  \&lt;span class="o"&gt;(&lt;/span&gt; -iname &lt;span class="s1"&gt;'*.php'&lt;/span&gt; -o -iname &lt;span class="s1"&gt;'*.phtml'&lt;/span&gt; -o -iname &lt;span class="s1"&gt;'*.php5'&lt;/span&gt; -o -iname &lt;span class="s1"&gt;'*.phar'&lt;/span&gt; \&lt;span class="o"&gt;)&lt;/span&gt; \
  -printf &lt;span class="s1"&gt;'%TY-%Tm-%Td %p\n'&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; sort
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A clean site prints nothing. Some plugins drop an &lt;code&gt;index.php&lt;/code&gt; with only a comment in it to stop directory listings, so open each hit before you delete anything.&lt;/p&gt;

&lt;p&gt;Files that pass the extension test can still carry code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;grep -rl --include=&lt;span class="s1"&gt;'*.jpg'&lt;/span&gt; --include=&lt;span class="s1"&gt;'*.png'&lt;/span&gt; --include=&lt;span class="s1"&gt;'*.gif'&lt;/span&gt; &lt;span class="s1"&gt;'&amp;lt;?php'&lt;/span&gt; wp-content/uploads
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Double extensions are worth a separate pass, because some old Apache setups run any file with &lt;code&gt;.php&lt;/code&gt; anywhere in the name:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;find wp-content/uploads -type f -iname &lt;span class="s1"&gt;'*.php.*'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  2. Block PHP in the folder
&lt;/h2&gt;

&lt;p&gt;On Apache 2.4 or LiteSpeed, put this in &lt;code&gt;wp-content/uploads/.htaccess&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight apache"&gt;&lt;code&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;FilesMatch&lt;/span&gt; &lt;span class="s2"&gt;"\.(php|phtml|php5|phar)$"&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="nc"&gt;Require&lt;/span&gt; &lt;span class="n"&gt;all&lt;/span&gt; &lt;span class="n"&gt;denied&lt;/span&gt;
&lt;span class="o"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nc"&gt;FilesMatch&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;On nginx, add this inside the &lt;code&gt;server&lt;/code&gt; block:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight nginx"&gt;&lt;code&gt;&lt;span class="n"&gt;location&lt;/span&gt; &lt;span class="o"&gt;~*&lt;/span&gt; &lt;span class="o"&gt;^/&lt;/span&gt;&lt;span class="n"&gt;wp&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;content&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;uploads&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;\&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;php&lt;/span&gt;&lt;span class="o"&gt;|&lt;/span&gt;&lt;span class="n"&gt;phtml&lt;/span&gt;&lt;span class="o"&gt;|&lt;/span&gt;&lt;span class="n"&gt;php5&lt;/span&gt;&lt;span class="o"&gt;|&lt;/span&gt;&lt;span class="n"&gt;phar&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;$ &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;deny&lt;/span&gt; &lt;span class="n"&gt;all&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;Order matters here. nginx uses the first regex location that matches, so this block has to sit above your generic &lt;code&gt;location ~ \.php$&lt;/code&gt; block. If it sits below, PHP-FPM gets the request first and the deny never runs.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;sudo nginx -t &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; sudo systemctl reload nginx
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  3. Prove it with one request
&lt;/h2&gt;

&lt;p&gt;Drop a harmless test file in and request it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s1"&gt;'&amp;lt;?php echo "ran";'&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; wp-content/uploads/test.php
curl -s -o /dev/null -w &lt;span class="s1"&gt;'%{http_code}\n'&lt;/span&gt; https://example.com/wp-content/uploads/test.php
rm wp-content/uploads/test.php
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You want &lt;code&gt;403&lt;/code&gt;. A &lt;code&gt;200&lt;/code&gt; means PHP still runs in that folder, and the body will say &lt;code&gt;ran&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Narrow the allowed types
&lt;/h2&gt;

&lt;p&gt;Core already filters types through &lt;code&gt;upload_mimes&lt;/code&gt;. A site that only needs photos and PDFs can say so in a small mu-plugin:&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;add_filter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt; &lt;span class="s1"&gt;'upload_mimes'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt; &lt;span class="nv"&gt;$mimes&lt;/span&gt; &lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="kt"&gt;array&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="s1"&gt;'jpg|jpeg'&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="s1"&gt;'image/jpeg'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="s1"&gt;'png'&lt;/span&gt;      &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="s1"&gt;'image/png'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="s1"&gt;'pdf'&lt;/span&gt;      &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="s1"&gt;'application/pdf'&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="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;SVG is left out on purpose. An SVG file can carry script, so only trusted users should upload one.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Change the path scanners look for
&lt;/h2&gt;

&lt;p&gt;The deny rule stops the file from running. The attacker still needs its URL, and &lt;code&gt;/wp-content/uploads/&lt;/code&gt; is the first place any scanner looks.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://wpghost.com/kb/change-wp-content-uploads-path-with-wp-ghost/" rel="noopener noreferrer"&gt;WP Ghost&lt;/a&gt; can change the uploads path, and the default address then returns a 404. It does not scan files for malware, so keep step 1 on a schedule.&lt;/p&gt;

&lt;p&gt;The full write-up, with the upload sources table and an FAQ for site owners, is on &lt;a href="https://wpghost.com/wordpress-file-upload-security/" rel="noopener noreferrer"&gt;wpghost.com&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>wordpress</category>
      <category>security</category>
      <category>php</category>
      <category>devops</category>
    </item>
    <item>
      <title>Auditing a WooCommerce checkout from the shell before Black Friday</title>
      <dc:creator>Calin V.</dc:creator>
      <pubDate>Fri, 20 Nov 2026 12:34:04 +0000</pubDate>
      <link>https://dev.to/cifi/auditing-a-woocommerce-checkout-from-the-shell-before-black-friday-5gi0</link>
      <guid>https://dev.to/cifi/auditing-a-woocommerce-checkout-from-the-shell-before-black-friday-5gi0</guid>
      <description>&lt;p&gt;In June 2026, backdoored releases of three paid ShapedPlugin plugins went out through the vendor's own update channel. The case is CVE-2026-10735, and one of the three was Product Slider Pro for WooCommerce.&lt;/p&gt;

&lt;p&gt;Data collected by Defiant (Wordfence) puts the injection at 21 May and the first customer reports at 10 June. That's about 20 days of stores running the bad code after a normal update.&lt;/p&gt;

&lt;p&gt;So the checks below assume an update can be the problem. They take an hour on a staging copy, and Black Friday is Friday, November 27.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. List every script on the checkout page
&lt;/h2&gt;

&lt;p&gt;WooCommerce redirects an empty cart away from &lt;code&gt;/checkout/&lt;/code&gt;, so put a product in a cookie jar first. Replace &lt;code&gt;123&lt;/code&gt; with a real product ID:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl -s -c jar.txt -b jar.txt &lt;span class="s2"&gt;"https://example.com/?add-to-cart=123"&lt;/span&gt; -o /dev/null
curl -s -b jar.txt &lt;span class="s2"&gt;"https://example.com/checkout/"&lt;/span&gt; \
  &lt;span class="o"&gt;|&lt;/span&gt; grep -oE &lt;span class="s1"&gt;'&amp;lt;script[^&amp;gt;]+src="[^"]+"'&lt;/span&gt; \
  &lt;span class="o"&gt;|&lt;/span&gt; sed -E &lt;span class="s1"&gt;'s/.*src="([^"]+)".*/\1/'&lt;/span&gt; \
  &lt;span class="o"&gt;|&lt;/span&gt; sort -u &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; checkout-scripts-&lt;span class="nv"&gt;$(&lt;/span&gt;date +%F&lt;span class="o"&gt;)&lt;/span&gt;.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Every line is a host that can read what the buyer types. An old tracking pixel or a chat widget nobody uses any more is still on that list until someone removes it.&lt;/p&gt;

&lt;p&gt;This catches the tags in the HTML. Scripts that other scripts inject at runtime only show up in the browser, so open the Network tab in developer tools and place a test order with the JS filter on.&lt;/p&gt;

&lt;p&gt;Run the same command again during the sale and diff it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;diff checkout-scripts-2026-11-17.txt checkout-scripts-&lt;span class="nv"&gt;$(&lt;/span&gt;date +%F&lt;span class="o"&gt;)&lt;/span&gt;.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;An empty diff is what you want to see.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Mark the freeze and watch for file changes
&lt;/h2&gt;

&lt;p&gt;Update core, WooCommerce, the theme and the plugins, then drop a marker file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;touch ~/freeze-&lt;span class="nv"&gt;$(&lt;/span&gt;date +%F&lt;span class="o"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;From then on, this lists every PHP file written after the freeze:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;find wp-content -type f -name &lt;span class="s1"&gt;'*.php'&lt;/span&gt; -newer ~/freeze-2026-11-17
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;During a freeze it should print nothing. Pair it with the checksum checks WP-CLI already has:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;wp core verify-checksums
wp plugin verify-checksums --all
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;wp plugin verify-checksums&lt;/code&gt; only knows plugins hosted on wordpress.org. A paid plugin like the ShapedPlugin Pro builds has no published checksums, and it shows up as a warning. That's the gap the &lt;code&gt;find&lt;/code&gt; check covers.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Try a Content Security Policy in report-only mode
&lt;/h2&gt;

&lt;p&gt;A CSP tells the browser which hosts may serve scripts. Report-only mode logs the violations to the console and blocks nothing, which is the safe way to try one on a live store.&lt;/p&gt;

&lt;p&gt;Nginx, for a store that takes cards through Stripe's hosted fields:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight nginx"&gt;&lt;code&gt;&lt;span class="n"&gt;add_header&lt;/span&gt; &lt;span class="nc"&gt;Content&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nc"&gt;Security&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nc"&gt;Policy&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nc"&gt;Report&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nc"&gt;Only&lt;/span&gt; &lt;span class="s2"&gt;"script-src 'self' https://js.stripe.com; frame-src https://js.stripe.com"&lt;/span&gt; &lt;span class="n"&gt;always&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Open checkout with the console visible and place a test order. WooCommerce prints inline scripts on checkout, so expect reports for those too. Each one is a decision: allow it with a nonce or hash, or accept &lt;code&gt;'unsafe-inline'&lt;/code&gt; and rely on the host list.&lt;/p&gt;

&lt;p&gt;Switch to the enforcing &lt;code&gt;Content-Security-Policy&lt;/code&gt; header only when a full test order runs with no reports you don't understand.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Rate-limit checkout POSTs
&lt;/h2&gt;

&lt;p&gt;Card testing bots submit many small orders to learn which stolen cards still work. The classic checkout posts to &lt;code&gt;?wc-ajax=checkout&lt;/code&gt;, and the block checkout posts to the Store API at &lt;code&gt;/wp-json/wc/store/v1/checkout&lt;/code&gt;. Limit both, and only for POST:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight nginx"&gt;&lt;code&gt;&lt;span class="c1"&gt;# http {} block
&lt;/span&gt;&lt;span class="k"&gt;map&lt;/span&gt; &lt;span class="s2"&gt;"$request_method:$request_uri"&lt;/span&gt; $&lt;span class="n"&gt;checkout_key&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="s2"&gt;""&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="s2"&gt;"~^POST:.*wc-ajax=checkout"&lt;/span&gt;                 $&lt;span class="n"&gt;binary_remote_addr&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="s2"&gt;"~^POST:/wp-json/wc/store(/v1)?/checkout"&lt;/span&gt;   $&lt;span class="n"&gt;binary_remote_addr&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="na"&gt;limit_req_zone $checkout_key zone&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;checkout&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;10m&lt;/span&gt; &lt;span class="n"&gt;rate&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;10r&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;m&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="c1"&gt;# server {} block
&lt;/span&gt;&lt;span class="na"&gt;limit_req zone&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;checkout&lt;/span&gt; &lt;span class="n"&gt;burst&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;5&lt;/span&gt; &lt;span class="n"&gt;nodelay&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="n"&gt;limit_req_status&lt;/span&gt; &lt;span class="mi"&gt;429&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Requests with an empty key are not counted, so the rest of the store is untouched. Ten attempts a minute is plenty for a person who mistyped a card number. It's very little for a script.&lt;/p&gt;

&lt;p&gt;Shared IPs are the catch. An office or a mobile carrier can put many real buyers behind one address, so check the 429 count in your access log on the first sale day:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;grep -c &lt;span class="s1"&gt;'" 429 '&lt;/span&gt; /var/log/nginx/access.log
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Ask the payment provider about its own decline rules too. Most can block a card or IP after repeated declines without any server change.&lt;/p&gt;

&lt;p&gt;The full checklist, with the admin account and backup steps, is on the &lt;a href="https://wpghost.com/woocommerce-black-friday-security/" rel="noopener noreferrer"&gt;canonical post&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;What do you run on your stores during the sale week that isn't on this list?&lt;/p&gt;

</description>
      <category>wordpress</category>
      <category>security</category>
      <category>devops</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Checking WordPress plugins against vulnerability records from the command line</title>
      <dc:creator>Calin V.</dc:creator>
      <pubDate>Thu, 12 Nov 2026 15:48:09 +0000</pubDate>
      <link>https://dev.to/cifi/checking-wordpress-plugins-against-vulnerability-records-from-the-command-line-1n12</link>
      <guid>https://dev.to/cifi/checking-wordpress-plugins-against-vulnerability-records-from-the-command-line-1n12</guid>
      <description>&lt;p&gt;Patchstack's 2026 report found that 91% of the WordPress vulnerabilities disclosed in 2025 were in plugins. Only six were in core.&lt;/p&gt;

&lt;p&gt;So the plugin list is where the checking time goes. Here's a version of that check you can run from a shell, with WP-CLI and curl.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Get the real list, inactive plugins included
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;wp plugin list --fields=name,status,version,update --format=table
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Keep the inactive rows. A deactivated plugin is still on disk, and its PHP files can still be requested by URL.&lt;/p&gt;

&lt;p&gt;You can see that from outside. Most plugins ship a &lt;code&gt;readme.txt&lt;/code&gt; with a &lt;code&gt;Stable tag&lt;/code&gt; line:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl -s -o /dev/null -w &lt;span class="s2"&gt;"%{http_code}\n"&lt;/span&gt; &lt;span class="s2"&gt;"https://example.com/wp-content/plugins/contact-form-7/readme.txt"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A &lt;code&gt;200&lt;/code&gt; means anyone can read which version you run, active or not. That's the same file a scanner reads before it picks an exploit.&lt;/p&gt;

&lt;p&gt;If a plugin isn't used, delete it:&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 --status=inactive --field=name
wp plugin delete &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;slug&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  2. Check the plugin is still maintained
&lt;/h2&gt;

&lt;p&gt;The wordpress.org plugin API returns the last update, the "Tested up to" version and the install count:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl -sg &lt;span class="s2"&gt;"https://api.wordpress.org/plugins/info/1.2/?action=plugin_information&amp;amp;request[slug]=contact-form-7&amp;amp;request[fields][sections]=0"&lt;/span&gt; \
  &lt;span class="o"&gt;|&lt;/span&gt; jq &lt;span class="s1"&gt;'{version, last_updated, tested, active_installs}'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A &lt;code&gt;last_updated&lt;/code&gt; more than a year old is a warning sign. When a flaw turns up in an abandoned plugin, nobody ships the fix.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Look up the vulnerability records
&lt;/h2&gt;

&lt;p&gt;Four public sources hold WordPress records:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Source&lt;/th&gt;
&lt;th&gt;Access&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Patchstack database (patchstack.com/database)&lt;/td&gt;
&lt;td&gt;Web search&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;WPScan (wpscan.com)&lt;/td&gt;
&lt;td&gt;Web search, plus an API with a free token&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Wordfence Intelligence&lt;/td&gt;
&lt;td&gt;Web search&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;NVD (nvd.nist.gov)&lt;/td&gt;
&lt;td&gt;CVE records with CVSS scores&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The WPScan API answers per plugin slug:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl -s -H &lt;span class="s2"&gt;"Authorization: Token token=$WPSCAN_API_TOKEN"&lt;/span&gt; \
  &lt;span class="s2"&gt;"https://wpscan.com/api/v3/plugins/contact-form-7"&lt;/span&gt; \
  &lt;span class="o"&gt;|&lt;/span&gt; jq &lt;span class="s1"&gt;'.["contact-form-7"].vulnerabilities[] | {title, fixed_in}'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Check a second source by hand. The databases don't always publish the same flaw on the same day.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Compare your version with fixed_in
&lt;/h2&gt;

&lt;p&gt;The title of a record is the least useful part. The &lt;code&gt;fixed_in&lt;/code&gt; field tells you whether you're still exposed.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# example values&lt;/span&gt;
&lt;span class="nv"&gt;installed&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"2.4.1"&lt;/span&gt;
&lt;span class="nv"&gt;fixed&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"2.4.3"&lt;/span&gt;
&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt; &lt;span class="s2"&gt;"$(printf '%s\n' "&lt;/span&gt;&lt;span class="nv"&gt;$installed&lt;/span&gt;&lt;span class="s2"&gt;" "&lt;/span&gt;&lt;span class="nv"&gt;$fixed&lt;/span&gt;&lt;span class="s2"&gt;" | sort -V | head -n1)"&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"$fixed"&lt;/span&gt; &lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt; &lt;span class="k"&gt;then&lt;/span&gt;
  &lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"patched"&lt;/span&gt;
&lt;span class="k"&gt;else&lt;/span&gt;
  &lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"VULNERABLE: update to $fixed or later"&lt;/span&gt;
&lt;span class="k"&gt;fi&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;sort -V&lt;/code&gt; handles version strings like &lt;code&gt;5.10&lt;/code&gt; vs &lt;code&gt;5.9&lt;/code&gt; correctly. A plain string compare doesn't.&lt;/p&gt;

&lt;p&gt;Then read two more fields on the record:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Field&lt;/th&gt;
&lt;th&gt;What it changes&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Authentication&lt;/td&gt;
&lt;td&gt;A flaw that works without a login goes first&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Type&lt;/td&gt;
&lt;td&gt;SQL injection and remote code execution are urgent&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;An empty &lt;code&gt;fixed_in&lt;/code&gt; means no fix exists. Patchstack's 2026 report says 46% of 2025 vulnerabilities had no patch at disclosure, so expect to see that often.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. When there's no fix yet
&lt;/h2&gt;

&lt;p&gt;Remove the plugin if the site can live without it.&lt;/p&gt;

&lt;p&gt;If it can't, block the route the record names at the server, and cut the version leak from step 1. In nginx:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight nginx"&gt;&lt;code&gt;&lt;span class="n"&gt;location&lt;/span&gt; &lt;span class="o"&gt;~*&lt;/span&gt; &lt;span class="o"&gt;^/&lt;/span&gt;&lt;span class="n"&gt;wp&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;content&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;plugins&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="o"&gt;^/&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="o"&gt;+/&lt;/span&gt;&lt;span class="n"&gt;readme&lt;/span&gt;\&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;txt&lt;/span&gt;$ &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="mi"&gt;404&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 Apache, a &lt;code&gt;.htaccess&lt;/code&gt; in &lt;code&gt;wp-content/plugins/&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight apache"&gt;&lt;code&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;FilesMatch&lt;/span&gt; &lt;span class="s2"&gt;"^readme\.txt$"&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nc"&gt;Require&lt;/span&gt; &lt;span class="n"&gt;all&lt;/span&gt; &lt;span class="n"&gt;denied&lt;/span&gt;
&lt;span class="o"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nc"&gt;FilesMatch&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That doesn't patch anything. It removes the version number a scanner uses to match your plugin to a record.&lt;/p&gt;

&lt;p&gt;Changing the default plugin path goes one step further, because a scan of &lt;code&gt;/wp-content/plugins/&lt;/code&gt; then gets a 404 for every folder. WP Ghost can do that from the WordPress admin, next to the server rules above.&lt;/p&gt;

&lt;h2&gt;
  
  
  6. Repeat it
&lt;/h2&gt;

&lt;p&gt;Put steps 1, 3 and 4 in a monthly cron or CI job, and run them by hand whenever a new plugin goes in.&lt;/p&gt;

&lt;p&gt;The full checklist, with the wordpress.org page checks and the screenshots, is on the &lt;a href="https://wpghost.com/check-wordpress-plugin-vulnerabilities/" rel="noopener noreferrer"&gt;WP Ghost blog&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;What do you use to watch plugin records across many sites, the WPScan API or something you built yourself?&lt;/p&gt;

</description>
      <category>wordpress</category>
      <category>security</category>
      <category>devops</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Four ways a WordPress site hands out its usernames, and the curl checks for each</title>
      <dc:creator>Calin V.</dc:creator>
      <pubDate>Tue, 03 Nov 2026 14:17:29 +0000</pubDate>
      <link>https://dev.to/cifi/four-ways-a-wordpress-site-hands-out-its-usernames-and-the-curl-checks-for-each-531m</link>
      <guid>https://dev.to/cifi/four-ways-a-wordpress-site-hands-out-its-usernames-and-the-curl-checks-for-each-531m</guid>
      <description>&lt;p&gt;Before anyone guesses a password, they need a username. On a default WordPress site, getting one is easy, and it costs the attacker nothing to try. So the first thing I check on a site I'm handed is how many of its usernames it gives away for free.&lt;/p&gt;

&lt;p&gt;There are four routes to look at. You can test each with curl from a machine that isn't logged in.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. The author archive
&lt;/h2&gt;

&lt;p&gt;Ask for an author by numeric ID and WordPress redirects you to that author's archive, which carries the login slug in the URL:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;-s&lt;/span&gt; &lt;span class="nt"&gt;-o&lt;/span&gt; /dev/null &lt;span class="nt"&gt;-w&lt;/span&gt; &lt;span class="s2"&gt;"%{http_code} %{redirect_url}&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="s2"&gt;"https://example.com/?author=1"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A &lt;code&gt;301&lt;/code&gt; to &lt;code&gt;https://example.com/author/johnd/&lt;/code&gt; just told you user ID 1 logs in as &lt;code&gt;johnd&lt;/code&gt;. A bot walks the IDs up from 1 and collects every name that redirects.&lt;/p&gt;

&lt;p&gt;The fix, if you don't publish author pages on purpose, is to drop author requests for logged-out visitors:&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="cp"&gt;&amp;lt;?php&lt;/span&gt;
&lt;span class="nf"&gt;add_action&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt; &lt;span class="s1"&gt;'template_redirect'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt; &lt;span class="nf"&gt;is_author&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="o"&gt;!&lt;/span&gt; &lt;span class="nf"&gt;is_user_logged_in&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="nf"&gt;wp_redirect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt; &lt;span class="nf"&gt;home_url&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt; &lt;span class="mi"&gt;301&lt;/span&gt; &lt;span class="p"&gt;);&lt;/span&gt;
        &lt;span class="k"&gt;exit&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="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you do run author pages, change the author base and the public slug instead of blocking them.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. The REST API users route
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;-s&lt;/span&gt; &lt;span class="s2"&gt;"https://example.com/wp-json/wp/v2/users"&lt;/span&gt; | &lt;span class="nb"&gt;head&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A JSON array with &lt;code&gt;id&lt;/code&gt;, &lt;code&gt;name&lt;/code&gt; and &lt;code&gt;slug&lt;/code&gt; for each author is the same leak in a tidier wrapper. Check the query form too, because a block that only matches &lt;code&gt;/wp-json/&lt;/code&gt; misses it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;-s&lt;/span&gt; &lt;span class="nt"&gt;-o&lt;/span&gt; /dev/null &lt;span class="nt"&gt;-w&lt;/span&gt; &lt;span class="s2"&gt;"%{http_code}&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="s2"&gt;"https://example.com/?rest_route=/wp/v2/users"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Drop the users routes for visitors with the &lt;code&gt;rest_endpoints&lt;/code&gt; filter:&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="cp"&gt;&amp;lt;?php&lt;/span&gt;
&lt;span class="nf"&gt;add_filter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt; &lt;span class="s1"&gt;'rest_endpoints'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt; &lt;span class="nv"&gt;$endpoints&lt;/span&gt; &lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt; &lt;span class="o"&gt;!&lt;/span&gt; &lt;span class="nf"&gt;is_user_logged_in&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="k"&gt;unset&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt; &lt;span class="nv"&gt;$endpoints&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;'/wp/v2/users'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="p"&gt;);&lt;/span&gt;
        &lt;span class="k"&gt;unset&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt; &lt;span class="nv"&gt;$endpoints&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;'/wp/v2/users/(?P&amp;lt;id&amp;gt;[\d]+)'&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="k"&gt;return&lt;/span&gt; &lt;span class="nv"&gt;$endpoints&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;h2&gt;
  
  
  3. The core sitemap
&lt;/h2&gt;

&lt;p&gt;Since WordPress 5.5 the built-in sitemap has a users section:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;-s&lt;/span&gt; &lt;span class="nt"&gt;-o&lt;/span&gt; /dev/null &lt;span class="nt"&gt;-w&lt;/span&gt; &lt;span class="s2"&gt;"%{http_code}&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="s2"&gt;"https://example.com/wp-sitemap-users-1.xml"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A &lt;code&gt;200&lt;/code&gt; there lists your authors for anyone, and for search engines. Remove just that provider:&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="cp"&gt;&amp;lt;?php&lt;/span&gt;
&lt;span class="nf"&gt;add_filter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt; &lt;span class="s1"&gt;'wp_sitemaps_add_provider'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt; &lt;span class="nv"&gt;$provider&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;$name&lt;/span&gt; &lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt; &lt;span class="s1"&gt;'users'&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="nv"&gt;$name&lt;/span&gt; &lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;?&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt; &lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nv"&gt;$provider&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;},&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt; &lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  4. The login form
&lt;/h2&gt;

&lt;p&gt;This one you read, not curl. Type a name that doesn't exist and WordPress says "The username is not registered". Type a real one with a wrong password and it says "The password you entered is incorrect". The difference confirms which names are real. Make both cases return the same generic message.&lt;/p&gt;

&lt;h2&gt;
  
  
  The one that undoes the other three
&lt;/h2&gt;

&lt;p&gt;If your login is &lt;code&gt;john&lt;/code&gt; and your byline on every post is also &lt;code&gt;john&lt;/code&gt;, closing the three routes above buys you little. The name is printed on the page. Open your profile, set the public display name to something that isn't the login, and if you can, create the account with a login that was never a real name to begin with.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why bother, if a username is only half a login
&lt;/h2&gt;

&lt;p&gt;Because the other half is cheaper than people think once the name is known. The Verizon 2025 Data Breach Investigations Report put stolen credentials in 88% of basic web application attacks. A valid username turns a spray across thousands of accounts into a focused run at one, usually the administrator.&lt;/p&gt;

&lt;p&gt;Run the four checks above on one site you manage today, then run them again after the fixes and keep the before-and-after. What else have you seen leak a WordPress username that isn't on this list?&lt;/p&gt;

</description>
      <category>wordpress</category>
      <category>security</category>
      <category>php</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Closing the WordPress REST API users route, then checking it with curl</title>
      <dc:creator>Calin V.</dc:creator>
      <pubDate>Fri, 30 Oct 2026 18:37:22 +0000</pubDate>
      <link>https://dev.to/cifi/closing-the-wordpress-rest-api-users-route-then-checking-it-with-curl-3pi5</link>
      <guid>https://dev.to/cifi/closing-the-wordpress-rest-api-users-route-then-checking-it-with-curl-3pi5</guid>
      <description>&lt;p&gt;&lt;code&gt;/wp-json/wp/v2/users&lt;/code&gt; answers anonymous requests on a default WordPress install. The reply carries an &lt;code&gt;id&lt;/code&gt; and a &lt;code&gt;slug&lt;/code&gt; for each author.&lt;/p&gt;

&lt;p&gt;That &lt;code&gt;slug&lt;/code&gt; is the same value WordPress puts in the author archive address, &lt;code&gt;/author/&amp;lt;slug&amp;gt;/&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;The REST API Handbook's FAQ is blunt about the obvious fix. It says you should not disable the REST API, because WordPress Admin functionality depends on it. So the work below is narrower: close one route, decide whether to require a login for the rest, then test both with curl.&lt;/p&gt;

&lt;h2&gt;
  
  
  See what your site answers today
&lt;/h2&gt;

&lt;p&gt;Run these from a machine that isn't logged in to the site:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;-s&lt;/span&gt; &lt;span class="nt"&gt;-o&lt;/span&gt; /dev/null &lt;span class="nt"&gt;-w&lt;/span&gt; &lt;span class="s2"&gt;"%{http_code}&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; https://example.com/wp-json/wp/v2/users
curl &lt;span class="nt"&gt;-s&lt;/span&gt; &lt;span class="nt"&gt;-o&lt;/span&gt; /dev/null &lt;span class="nt"&gt;-w&lt;/span&gt; &lt;span class="s2"&gt;"%{http_code}&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="s2"&gt;"https://example.com/?rest_route=/wp/v2/users"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The second form matters. The Handbook says sites without pretty permalinks take the route as a &lt;code&gt;rest_route&lt;/code&gt; query parameter, and that form also answers on sites that do have pretty permalinks. A block that only matches the &lt;code&gt;/wp-json/&lt;/code&gt; path misses it.&lt;/p&gt;

&lt;p&gt;A &lt;code&gt;200&lt;/code&gt; on either line means the list is public.&lt;/p&gt;

&lt;h2&gt;
  
  
  List the plugin namespaces
&lt;/h2&gt;

&lt;p&gt;The API index has a &lt;code&gt;namespaces&lt;/code&gt; item. Every plugin that calls &lt;code&gt;register_rest_route()&lt;/code&gt; adds its own entry there:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;-s&lt;/span&gt; https://example.com/wp-json/ | jq &lt;span class="nt"&gt;-r&lt;/span&gt; &lt;span class="s1"&gt;'.namespaces[]'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;On a WooCommerce site the output includes &lt;code&gt;wc/store/v1&lt;/code&gt; next to &lt;code&gt;wp/v2&lt;/code&gt; and &lt;code&gt;oembed/1.0&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Patchstack's 2026 report counted 11,334 vulnerabilities in the WordPress ecosystem in 2025. 91% of them were in plugins.&lt;/p&gt;

&lt;h2&gt;
  
  
  Remove the users routes for logged-out visitors
&lt;/h2&gt;

&lt;p&gt;Put this in a small plugin (a file in &lt;code&gt;wp-content/mu-plugins/&lt;/code&gt; works):&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="cp"&gt;&amp;lt;?php&lt;/span&gt;
&lt;span class="nf"&gt;add_filter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt; &lt;span class="s1"&gt;'rest_endpoints'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt; &lt;span class="nv"&gt;$endpoints&lt;/span&gt; &lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt; &lt;span class="o"&gt;!&lt;/span&gt; &lt;span class="nf"&gt;is_user_logged_in&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="k"&gt;unset&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt; &lt;span class="nv"&gt;$endpoints&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;'/wp/v2/users'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="p"&gt;);&lt;/span&gt;
        &lt;span class="k"&gt;unset&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt; &lt;span class="nv"&gt;$endpoints&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;'/wp/v2/users/(?P&amp;lt;id&amp;gt;[\d]+)'&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="k"&gt;return&lt;/span&gt; &lt;span class="nv"&gt;$endpoints&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;The filter runs inside WordPress after the route is parsed, so &lt;code&gt;/wp-json/&lt;/code&gt; and &lt;code&gt;?rest_route=&lt;/code&gt; both lose the route. Run the two curl lines again. Both should print &lt;code&gt;404&lt;/code&gt; (the code WordPress returns as &lt;code&gt;rest_no_route&lt;/code&gt;).&lt;/p&gt;

&lt;p&gt;The block editor still loads the users list for logged-in editors, since the check only applies to anonymous requests.&lt;/p&gt;

&lt;h2&gt;
  
  
  Requiring a login for every route
&lt;/h2&gt;

&lt;p&gt;The Handbook's own answer for anonymous access is the &lt;code&gt;rest_authentication_errors&lt;/code&gt; filter with an &lt;code&gt;is_user_logged_in()&lt;/code&gt; check:&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="cp"&gt;&amp;lt;?php&lt;/span&gt;
&lt;span class="nf"&gt;add_filter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt; &lt;span class="s1"&gt;'rest_authentication_errors'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt; &lt;span class="nv"&gt;$result&lt;/span&gt; &lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt; &lt;span class="o"&gt;!&lt;/span&gt; &lt;span class="k"&gt;empty&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt; &lt;span class="nv"&gt;$result&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="k"&gt;return&lt;/span&gt; &lt;span class="nv"&gt;$result&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt; &lt;span class="o"&gt;!&lt;/span&gt; &lt;span class="nf"&gt;is_user_logged_in&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="k"&gt;return&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;WP_Error&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt; &lt;span class="s1"&gt;'rest_not_logged_in'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'You are not currently logged in.'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;array&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt; &lt;span class="s1"&gt;'status'&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;401&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="k"&gt;return&lt;/span&gt; &lt;span class="nv"&gt;$result&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;The first &lt;code&gt;if&lt;/code&gt; keeps any earlier authentication result, including an error from another plugin.&lt;/p&gt;

&lt;p&gt;WooCommerce's documentation calls the Store API "an unauthenticated API", and the cart and checkout blocks call it as the shopper. With the filter on, &lt;code&gt;/wp-json/wc/store/v1/cart&lt;/code&gt; returns a 401 to every visitor.&lt;/p&gt;

&lt;p&gt;Test these before shipping it to a live site:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Check&lt;/th&gt;
&lt;th&gt;Command or action&lt;/th&gt;
&lt;th&gt;Expected with the login filter&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Users route&lt;/td&gt;
&lt;td&gt;&lt;code&gt;curl -s -o /dev/null -w "%{http_code}\n" https://example.com/wp-json/wp/v2/users&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;401&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Store API cart&lt;/td&gt;
&lt;td&gt;&lt;code&gt;curl -s -o /dev/null -w "%{http_code}\n" https://example.com/wp-json/wc/store/v1/cart&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;401, so the cart block breaks&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Embeds&lt;/td&gt;
&lt;td&gt;Paste a post URL into another WordPress site's editor&lt;/td&gt;
&lt;td&gt;No preview card&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Contact form&lt;/td&gt;
&lt;td&gt;Submit the form in a private window&lt;/td&gt;
&lt;td&gt;Fails if the plugin posts to a REST route&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;If any row on that list is a feature you sell with, stay with the users filter alone.&lt;/p&gt;

&lt;h2&gt;
  
  
  The discovery header still points at the API
&lt;/h2&gt;

&lt;p&gt;The Handbook's discovery page says the REST API adds a &lt;code&gt;Link&lt;/code&gt; header to every front-end page:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;-sI&lt;/span&gt; https://example.com/ | &lt;span class="nb"&gt;grep&lt;/span&gt; &lt;span class="nt"&gt;-i&lt;/span&gt; &lt;span class="s1"&gt;'api.w.org'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The header reads &lt;code&gt;Link: &amp;lt;https://example.com/wp-json/&amp;gt;; rel="https://api.w.org/"&lt;/code&gt;, and the same address sits in a &lt;code&gt;&amp;lt;link rel='https://api.w.org/'&amp;gt;&lt;/code&gt; element in the page head. If you move the API to a custom base path, run the command again and note which address the header now gives out to every crawler.&lt;/p&gt;

&lt;h2&gt;
  
  
  Five-minute check
&lt;/h2&gt;

&lt;p&gt;Run the two users-route curl lines against one production site you manage today, before and after the &lt;code&gt;rest_endpoints&lt;/code&gt; filter, and keep the output.&lt;/p&gt;

&lt;p&gt;Has anyone found a plugin that breaks when only the users routes are removed for logged-out visitors?&lt;/p&gt;

</description>
      <category>wordpress</category>
      <category>security</category>
      <category>php</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Blocking xmlrpc.php on Apache and Nginx, then testing it with curl</title>
      <dc:creator>Calin V.</dc:creator>
      <pubDate>Thu, 22 Oct 2026 11:43:20 +0000</pubDate>
      <link>https://dev.to/cifi/blocking-xmlrpcphp-on-apache-and-nginx-then-testing-it-with-curl-21i1</link>
      <guid>https://dev.to/cifi/blocking-xmlrpcphp-on-apache-and-nginx-then-testing-it-with-curl-21i1</guid>
      <description>&lt;p&gt;&lt;code&gt;xmlrpc.php&lt;/code&gt; sits in the WordPress root and has answered requests by default since WordPress 3.5. The dashboard has no switch for it.&lt;/p&gt;

&lt;p&gt;Most guides stop at a one-line PHP filter. That filter leaves part of the file working. The server rules below close the whole file, and the curl commands at the end show whether the block holds.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the PHP filter turns off
&lt;/h2&gt;

&lt;p&gt;The usual snippet goes in a plugin or &lt;code&gt;functions.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="nf"&gt;add_filter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt; &lt;span class="s1"&gt;'xmlrpc_enabled'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'__return_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 WordPress developer reference for &lt;code&gt;xmlrpc_enabled&lt;/code&gt; says the filter "does not control whether XML-RPC is fully enabled". It switches off the methods that need a login, like publishing.&lt;/p&gt;

&lt;p&gt;Pingbacks keep working. &lt;code&gt;pingback.ping&lt;/code&gt; needs no login, so the filter leaves it alone.&lt;/p&gt;

&lt;p&gt;PHP also boots for every request to the file. &lt;code&gt;xmlrpc.php&lt;/code&gt; loads WordPress before it reads the filter, so each bot request still costs a full page load on the server.&lt;/p&gt;

&lt;p&gt;If a PHP filter is all a host allows, add a second one that drops the two pingback methods:&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;add_filter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt; &lt;span class="s1"&gt;'xmlrpc_methods'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt; &lt;span class="nv"&gt;$methods&lt;/span&gt; &lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;unset&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt; &lt;span class="nv"&gt;$methods&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;'pingback.ping'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="k"&gt;unset&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt; &lt;span class="nv"&gt;$methods&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;'pingback.extensions.getPingbacks'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nv"&gt;$methods&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;h2&gt;
  
  
  Apache and LiteSpeed
&lt;/h2&gt;

&lt;p&gt;Add this to &lt;code&gt;.htaccess&lt;/code&gt; in the site root:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight apache"&gt;&lt;code&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nl"&gt;Files&lt;/span&gt;&lt;span class="sr"&gt; xmlrpc.php&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;
&lt;/span&gt;    &lt;span class="nc"&gt;Require&lt;/span&gt; &lt;span class="ss"&gt;all&lt;/span&gt; denied
&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nl"&gt;Files&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;Require all denied&lt;/code&gt; is Apache 2.4 syntax. Apache 2.2 needs &lt;code&gt;Order Deny,Allow&lt;/code&gt; and &lt;code&gt;Deny from all&lt;/code&gt; instead.&lt;/p&gt;

&lt;p&gt;The request gets a 403 before PHP starts.&lt;/p&gt;

&lt;h2&gt;
  
  
  Nginx
&lt;/h2&gt;

&lt;p&gt;Put this inside the &lt;code&gt;server&lt;/code&gt; block:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight nginx"&gt;&lt;code&gt;&lt;span class="k"&gt;location&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;/xmlrpc.php&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kn"&gt;deny&lt;/span&gt; &lt;span class="s"&gt;all&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;Test the config with &lt;code&gt;nginx -t&lt;/code&gt; and reload with &lt;code&gt;systemctl reload nginx&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;An exact-match &lt;code&gt;location =&lt;/code&gt; wins over regex locations in Nginx, so PHP-FPM never sees the request.&lt;/p&gt;

&lt;h2&gt;
  
  
  Keeping Jetpack connected
&lt;/h2&gt;

&lt;p&gt;Jetpack's support page on IP allowlists says Jetpack relies on &lt;code&gt;xmlrpc.php&lt;/code&gt; to talk to WordPress.com. The same page warns that blocking the file stops the connection from working properly.&lt;/p&gt;

&lt;p&gt;Jetpack publishes its ranges as plain text at &lt;code&gt;https://jetpack.com/ips-v4.txt&lt;/code&gt; and as JSON at &lt;code&gt;https://jetpack.com/ips-v4.json&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;On Apache 2.4, turn the list into &lt;code&gt;Require ip&lt;/code&gt; lines:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;-s&lt;/span&gt; https://jetpack.com/ips-v4.txt | &lt;span class="nb"&gt;sed&lt;/span&gt; &lt;span class="s1"&gt;'s/^/    Require ip /'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Paste the output between &lt;code&gt;&amp;lt;Files xmlrpc.php&amp;gt;&lt;/code&gt; and &lt;code&gt;&amp;lt;/Files&amp;gt;&lt;/code&gt; in place of &lt;code&gt;Require all denied&lt;/code&gt;. Apache then answers those ranges and refuses every other address.&lt;/p&gt;

&lt;p&gt;On Nginx the same list becomes &lt;code&gt;allow&lt;/code&gt; lines, and &lt;code&gt;deny all;&lt;/code&gt; goes last:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;-s&lt;/span&gt; https://jetpack.com/ips-v4.txt | &lt;span class="nb"&gt;sed&lt;/span&gt; &lt;span class="s1"&gt;'s/^/    allow /; s/$/;/'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Re-run the command whenever the Jetpack connection test fails after a server change.&lt;/p&gt;

&lt;h2&gt;
  
  
  At the edge
&lt;/h2&gt;

&lt;p&gt;On Cloudflare, a custom rule with this expression and the Block action stops the request before it reaches the origin:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;(http.request.uri.path eq "/xmlrpc.php")
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A site that runs Jetpack needs an exception for Jetpack's ranges in that rule too.&lt;/p&gt;

&lt;h2&gt;
  
  
  Check the block with curl
&lt;/h2&gt;

&lt;p&gt;A browser visit to an open &lt;code&gt;xmlrpc.php&lt;/code&gt; prints &lt;code&gt;XML-RPC server accepts POST requests only.&lt;/code&gt; Bots send POST, so test with POST:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;-s&lt;/span&gt; &lt;span class="nt"&gt;-o&lt;/span&gt; /dev/null &lt;span class="nt"&gt;-w&lt;/span&gt; &lt;span class="s2"&gt;"%{http_code}&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="nt"&gt;-X&lt;/span&gt; POST &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s2"&gt;"Content-Type: text/xml"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--data&lt;/span&gt; &lt;span class="s1"&gt;'&amp;lt;?xml version="1.0"?&amp;gt;&amp;lt;methodCall&amp;gt;&amp;lt;methodName&amp;gt;system.listMethods&amp;lt;/methodName&amp;gt;&amp;lt;/methodCall&amp;gt;'&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  https://example.com/xmlrpc.php
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Status&lt;/th&gt;
&lt;th&gt;Meaning&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;200&lt;/td&gt;
&lt;td&gt;The file still answers, even with the PHP filter on&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;403&lt;/td&gt;
&lt;td&gt;The Apache or Nginx rule works&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;404&lt;/td&gt;
&lt;td&gt;Something earlier in the stack refuses the path&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;On a site that can only use the PHP filters, drop the &lt;code&gt;-o /dev/null&lt;/code&gt; part and look for pingback methods in the reply:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;-s&lt;/span&gt; &lt;span class="nt"&gt;-X&lt;/span&gt; POST &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s2"&gt;"Content-Type: text/xml"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--data&lt;/span&gt; &lt;span class="s1"&gt;'&amp;lt;?xml version="1.0"?&amp;gt;&amp;lt;methodCall&amp;gt;&amp;lt;methodName&amp;gt;system.listMethods&amp;lt;/methodName&amp;gt;&amp;lt;/methodCall&amp;gt;'&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  https://example.com/xmlrpc.php | &lt;span class="nb"&gt;grep&lt;/span&gt; &lt;span class="nt"&gt;-c&lt;/span&gt; pingback
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;0&lt;/code&gt; means the &lt;code&gt;xmlrpc_methods&lt;/code&gt; filter removed them.&lt;/p&gt;

&lt;h2&gt;
  
  
  Count the attempts in the access log
&lt;/h2&gt;

&lt;p&gt;In the default combined log format, field 7 is the path and field 9 is the status code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;grep&lt;/span&gt; &lt;span class="nt"&gt;-c&lt;/span&gt; &lt;span class="s1"&gt;'POST /xmlrpc.php'&lt;/span&gt; /var/log/nginx/access.log
&lt;span class="nb"&gt;awk&lt;/span&gt; &lt;span class="s1"&gt;'$7 == "/xmlrpc.php" {print $9}'&lt;/span&gt; /var/log/nginx/access.log | &lt;span class="nb"&gt;sort&lt;/span&gt; | &lt;span class="nb"&gt;uniq&lt;/span&gt; &lt;span class="nt"&gt;-c&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;On Debian and Ubuntu, Apache writes to &lt;code&gt;/var/log/apache2/access.log&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Before the rule the hits show as &lt;code&gt;200&lt;/code&gt;. After it they show as &lt;code&gt;403&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the block does not cover
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;wp-login.php&lt;/code&gt; takes password attempts on its own route. It still needs a rate limit after &lt;code&gt;xmlrpc.php&lt;/code&gt; is closed.&lt;/p&gt;

&lt;p&gt;The Verizon 2025 Data Breach Investigations Report found stolen credentials in 88% of basic web application attacks.&lt;/p&gt;

&lt;p&gt;Run the POST curl command against a production site today and note the status code. Has anyone found a client besides Jetpack that still needs &lt;code&gt;xmlrpc.php&lt;/code&gt; in 2026?&lt;/p&gt;

</description>
      <category>wordpress</category>
      <category>security</category>
      <category>devops</category>
      <category>php</category>
    </item>
    <item>
      <title>Give Yourself a Dead Man's Switch Before You Harden WordPress</title>
      <dc:creator>Calin V.</dc:creator>
      <pubDate>Wed, 16 Sep 2026 17:56:43 +0000</pubDate>
      <link>https://dev.to/cifi/give-yourself-a-dead-mans-switch-before-you-harden-wordpress-324o</link>
      <guid>https://dev.to/cifi/give-yourself-a-dead-mans-switch-before-you-harden-wordpress-324o</guid>
      <description>&lt;p&gt;Hardening a WordPress site is a handful of settings and about five minutes of work. The reason people put it off for a year is not the five minutes. It is that one of those settings changes the URL of your login page, and if the rewrite rules do not land the way the interface believes they did, the next thing you see is a 404 where your dashboard used to be.&lt;/p&gt;

&lt;p&gt;The usual advice is to be careful. Being careful does not scale and it does not survive a cache layer you forgot about.&lt;/p&gt;

&lt;p&gt;What follows is the pre-flight I run instead. It takes about ninety seconds to set up and it makes a bad change expire on its own, so the worst outcome of a mistake is a ten minute wait rather than an FTP session at midnight. Everything runs against a site you own and already have shell access to.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why bother, on a five minute job
&lt;/h2&gt;

&lt;p&gt;Because the thing you are switching on is doing more work than the layer underneath it, so it is worth getting switched on properly and left on.&lt;/p&gt;

&lt;p&gt;According to Patchstack's &lt;em&gt;State of WordPress Security in 2026&lt;/em&gt;, 11,334 vulnerabilities were disclosed across the WordPress ecosystem during 2025, up 42% year on year, with 91% of them in plugins. Forty-six percent had no patch available at the moment of disclosure, and the weighted median time from disclosure to first exploitation was five hours.&lt;/p&gt;

&lt;p&gt;The same report pentested common hosting defences. Internal WAFs, Cloudflare, Imunify360 and ModSecurity blocked 12% of attacks against known-exploited vulnerabilities, and 26% on a broader test. The best host in the set blocked 60.7%. Several blocked under 17%. One blocked nothing.&lt;/p&gt;

&lt;p&gt;So the hardening layer matters, and the failure mode that actually destroys it is not an attacker. It is a site owner who broke something once, could not tell what, and turned the whole thing off.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 1: a restore point that takes two commands
&lt;/h2&gt;

&lt;p&gt;Do this before anything else. It is cheap enough that there is no argument against it.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cd&lt;/span&gt; /var/www/example.com/public_html
&lt;span class="nv"&gt;STAMP&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="si"&gt;$(&lt;/span&gt;&lt;span class="nb"&gt;date&lt;/span&gt; +%F-%H%M%S&lt;span class="si"&gt;)&lt;/span&gt;

&lt;span class="c"&gt;# The rewrite rules, which is what a path change actually writes.&lt;/span&gt;
&lt;span class="nb"&gt;cp&lt;/span&gt; &lt;span class="nt"&gt;-a&lt;/span&gt; .htaccess &lt;span class="s2"&gt;"/root/restore/htaccess.&lt;/span&gt;&lt;span class="nv"&gt;$STAMP&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; 2&amp;gt;/dev/null &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="nb"&gt;true&lt;/span&gt;

&lt;span class="c"&gt;# Options only. Full DB dumps are slow enough that people skip them, and&lt;/span&gt;
&lt;span class="c"&gt;# every setting you are about to change lives in wp_options.&lt;/span&gt;
wp db &lt;span class="nb"&gt;export&lt;/span&gt; &lt;span class="s2"&gt;"/root/restore/options.&lt;/span&gt;&lt;span class="nv"&gt;$STAMP&lt;/span&gt;&lt;span class="s2"&gt;.sql"&lt;/span&gt; &lt;span class="nt"&gt;--tables&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="si"&gt;$(&lt;/span&gt;wp db prefix &lt;span class="nt"&gt;--allow-root&lt;/span&gt;&lt;span class="si"&gt;)&lt;/span&gt;options
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;wp db prefix&lt;/code&gt; matters there because the prefix is not always &lt;code&gt;wp_&lt;/code&gt;, and a restore aimed at the wrong table name fails at exactly the moment you are least able to debug it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 2: the dead man's switch
&lt;/h2&gt;

&lt;p&gt;This is the part worth stealing. Schedule a job that reverts everything in ten minutes, then cancel it once you have confirmed the site is fine. If you lock yourself out, you do nothing at all and the site comes back.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cat&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt;/root/restore/revert.sh &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="no"&gt;EOF&lt;/span&gt;&lt;span class="sh"&gt;'
#!/usr/bin/env bash
set -euo pipefail
SITE=/var/www/example.com/public_html
LATEST_HT=&lt;/span&gt;&lt;span class="si"&gt;$(&lt;/span&gt;&lt;span class="nb"&gt;ls&lt;/span&gt; &lt;span class="nt"&gt;-1t&lt;/span&gt; /root/restore/htaccess.&lt;span class="k"&gt;*&lt;/span&gt; 2&amp;gt;/dev/null | &lt;span class="nb"&gt;head&lt;/span&gt; &lt;span class="nt"&gt;-1&lt;/span&gt;&lt;span class="si"&gt;)&lt;/span&gt;&lt;span class="sh"&gt;
[ -n "&lt;/span&gt;&lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;LATEST_HT&lt;/span&gt;&lt;span class="k"&gt;:-}&lt;/span&gt;&lt;span class="sh"&gt;" ] &amp;amp;&amp;amp; cp -a "&lt;/span&gt;&lt;span class="nv"&gt;$LATEST_HT&lt;/span&gt;&lt;span class="sh"&gt;" "&lt;/span&gt;&lt;span class="nv"&gt;$SITE&lt;/span&gt;&lt;span class="sh"&gt;/.htaccess"
cd "&lt;/span&gt;&lt;span class="nv"&gt;$SITE&lt;/span&gt;&lt;span class="sh"&gt;"
# Substitute the slug of the plugin you are configuring.
wp plugin deactivate YOUR-PLUGIN-SLUG --allow-root || true
wp rewrite flush --hard --allow-root || true
logger -t wp-preflight "auto-revert fired"
&lt;/span&gt;&lt;span class="no"&gt;EOF
&lt;/span&gt;&lt;span class="nb"&gt;chmod&lt;/span&gt; +x /root/restore/revert.sh

&lt;span class="c"&gt;# Arm it. `at` is in most distro repos; install it if the command is missing.&lt;/span&gt;
&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"/root/restore/revert.sh"&lt;/span&gt; | at now + 10 minutes
atq            &lt;span class="c"&gt;# note the job number&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now go and make your change. When the site is confirmed healthy:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;atrm &amp;lt;job-number&amp;gt;     &lt;span class="c"&gt;# disarm&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If &lt;code&gt;at&lt;/code&gt; is not available, a one-shot systemd timer does the same thing:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;systemd-run &lt;span class="nt"&gt;--on-active&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;10min &lt;span class="nt"&gt;--unit&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;wp-preflight-revert /root/restore/revert.sh
&lt;span class="c"&gt;# disarm with:&lt;/span&gt;
systemctl stop wp-preflight-revert.timer 2&amp;gt;/dev/null&lt;span class="p"&gt;;&lt;/span&gt; systemctl reset-failed wp-preflight-revert.service
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Ten minutes is the number I use because it is long enough to load a preset, purge caches and open the dashboard, and short enough that waiting it out is never worse than debugging under pressure. Re-arm it before each subsequent change rather than setting one long window.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 3: a watchdog in a second shell
&lt;/h2&gt;

&lt;p&gt;Open another terminal before you touch anything and leave this running for the whole change window. It tells you the moment something stops answering, and it tells you which thing, which is the information the browser withholds while it sits on a spinner.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;SITE&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"https://example.com"&lt;/span&gt;
&lt;span class="nv"&gt;LOGIN&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"/wp-login.php"&lt;/span&gt;          &lt;span class="c"&gt;# change to your new path after the switch&lt;/span&gt;

&lt;span class="k"&gt;while &lt;/span&gt;&lt;span class="nb"&gt;true&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;do
  &lt;/span&gt;&lt;span class="nb"&gt;printf&lt;/span&gt; &lt;span class="s1"&gt;'%s '&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="si"&gt;$(&lt;/span&gt;&lt;span class="nb"&gt;date&lt;/span&gt; +%H:%M:%S&lt;span class="si"&gt;)&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;
  &lt;span class="k"&gt;for &lt;/span&gt;U &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="s2"&gt;"/"&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$LOGIN&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="s2"&gt;"/wp-admin/"&lt;/span&gt; &lt;span class="s2"&gt;"/wp-json/"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;do
    &lt;/span&gt;&lt;span class="nv"&gt;code&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="si"&gt;$(&lt;/span&gt;curl &lt;span class="nt"&gt;-s&lt;/span&gt; &lt;span class="nt"&gt;-o&lt;/span&gt; /dev/null &lt;span class="nt"&gt;-w&lt;/span&gt; &lt;span class="s1"&gt;'%{http_code}'&lt;/span&gt; &lt;span class="nt"&gt;--max-time&lt;/span&gt; 5 &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$SITE$U&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="si"&gt;)&lt;/span&gt;
    &lt;span class="nb"&gt;printf&lt;/span&gt; &lt;span class="s1"&gt;'%s=%s '&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$U&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$code&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;
  &lt;span class="k"&gt;done
  &lt;/span&gt;&lt;span class="nb"&gt;echo
  sleep &lt;/span&gt;5
&lt;span class="k"&gt;done&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Read the row, not a single number. Homepage 200 with the login path 404 is a path change that landed and a bookmark that did not, which is fine. Everything 200 except &lt;code&gt;/wp-json/&lt;/code&gt; is a REST route that did not get a matching rule, and it will show up later as saves failing silently. Homepage 500 is the rewrite file, and that is the case where you stop touching things and let the timer fire.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 4: WP-CLI is your out-of-band control plane
&lt;/h2&gt;

&lt;p&gt;The reason a lockout feels catastrophic is that people assume the dashboard is the only way in. It is not, and knowing that in advance changes how much risk a path change actually carries.&lt;/p&gt;

&lt;p&gt;WP-CLI does not go through HTTP. Rewrite rules are irrelevant to it. If the web-facing side of the site is unreachable, the command line still works completely.&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 &lt;span class="nt"&gt;--status&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;active &lt;span class="nt"&gt;--field&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;name         &lt;span class="c"&gt;# what is on&lt;/span&gt;
wp plugin deactivate YOUR-PLUGIN-SLUG               &lt;span class="c"&gt;# instant off, no dashboard needed&lt;/span&gt;
wp option get home&lt;span class="p"&gt;;&lt;/span&gt; wp option get siteurl           &lt;span class="c"&gt;# confirm nothing rewrote these&lt;/span&gt;
wp rewrite flush &lt;span class="nt"&gt;--hard&lt;/span&gt;                             &lt;span class="c"&gt;# regenerate rules, no settings changed&lt;/span&gt;
wp user list &lt;span class="nt"&gt;--role&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;administrator &lt;span class="nt"&gt;--fields&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;user_login,user_email
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The FTP-era equivalent, for hosts with no shell, is renaming the plugin directory. WordPress deactivates a plugin whose folder has vanished, and it does it without touching your database.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;mv &lt;/span&gt;wp-content/plugins/your-plugin-slug wp-content/plugins/your-plugin-slug.off
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Both routes are worth testing once on a staging copy, because the first time you use a recovery procedure should not be the first time you read it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 5: confirm the rules landed, not that you saved them
&lt;/h2&gt;

&lt;p&gt;A saved setting and an applied rewrite rule are different objects. On Apache and LiteSpeed they usually coincide. On nginx they frequently do not, because plugins write &lt;code&gt;.htaccess&lt;/code&gt; and nginx has never read &lt;code&gt;.htaccess&lt;/code&gt;. The file gets written, the interface reports success, and the server carries on serving the old routes.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;-sI&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$SITE&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; | &lt;span class="nb"&gt;grep&lt;/span&gt; &lt;span class="nt"&gt;-i&lt;/span&gt; &lt;span class="s1"&gt;'^server:'&lt;/span&gt;
&lt;span class="nb"&gt;grep&lt;/span&gt; &lt;span class="nt"&gt;-c&lt;/span&gt; &lt;span class="s1"&gt;'RewriteRule'&lt;/span&gt; .htaccess

&lt;span class="c"&gt;# On nginx, the rules have to be in the server block instead:&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;nginx &lt;span class="nt"&gt;-T&lt;/span&gt; 2&amp;gt;/dev/null | &lt;span class="nb"&gt;grep&lt;/span&gt; &lt;span class="nt"&gt;-n&lt;/span&gt; &lt;span class="s1"&gt;'rewrite '&lt;/span&gt; | &lt;span class="nb"&gt;head&lt;/span&gt; &lt;span class="nt"&gt;-20&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;nginx &lt;span class="nt"&gt;-t&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nb"&gt;sudo &lt;/span&gt;systemctl reload nginx
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;nginx -t&lt;/code&gt; before every reload, without exception. A reload on a bad config is an outage, and an outage during a hardening window is the thing that convinces people hardening caused it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 6: find and store the bypass route
&lt;/h2&gt;

&lt;p&gt;Most plugins in this category generate a bypass parameter, a unique string that suspends path changes for a single request so you can reach the dashboard from outside your own configuration. It is generated at install time and it lives on a settings page, which is to say it lives behind the login form you may be about to move.&lt;/p&gt;

&lt;p&gt;Look it up now, while you can still reach it, and put it in your password manager rather than a text file. Treat it as a credential: anyone holding it walks straight past your path security.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Find where your plugin keeps its config, then read the relevant key.&lt;/span&gt;
wp option list &lt;span class="nt"&gt;--search&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'*YOURPREFIX*'&lt;/span&gt; &lt;span class="nt"&gt;--fields&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;option_name,option_value | &lt;span class="nb"&gt;head&lt;/span&gt; &lt;span class="nt"&gt;-40&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If your plugin does not have one, its documented equivalents are the temporary pause from the plugins screen and the folder rename above. Know which you have before you need it.&lt;/p&gt;

&lt;h2&gt;
  
  
  The whole pre-flight
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# 1. restore point&lt;/span&gt;
&lt;span class="nb"&gt;cp&lt;/span&gt; &lt;span class="nt"&gt;-a&lt;/span&gt; .htaccess /root/restore/htaccess.&lt;span class="si"&gt;$(&lt;/span&gt;&lt;span class="nb"&gt;date&lt;/span&gt; +%F-%H%M%S&lt;span class="si"&gt;)&lt;/span&gt;
wp db &lt;span class="nb"&gt;export&lt;/span&gt; /root/restore/options.&lt;span class="si"&gt;$(&lt;/span&gt;&lt;span class="nb"&gt;date&lt;/span&gt; +%F-%H%M%S&lt;span class="si"&gt;)&lt;/span&gt;.sql &lt;span class="nt"&gt;--tables&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="si"&gt;$(&lt;/span&gt;wp db prefix&lt;span class="si"&gt;)&lt;/span&gt;options

&lt;span class="c"&gt;# 2. arm the dead man's switch&lt;/span&gt;
&lt;span class="nb"&gt;echo&lt;/span&gt; /root/restore/revert.sh | at now + 10 minutes

&lt;span class="c"&gt;# 3. start the watchdog in a second shell&lt;/span&gt;
&lt;span class="c"&gt;# 4. make exactly one change&lt;/span&gt;
&lt;span class="c"&gt;# 5. confirm the row is green, then: atrm &amp;lt;job&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;One change per window. That is the part people skip, and it is the part that turns a five second fix into an afternoon, because two simultaneous changes give you no way to attribute a failure to either of them.&lt;/p&gt;

&lt;p&gt;None of this makes your configuration more secure. It makes being wrong cheap, and a hardening layer you are willing to touch is worth considerably more than a stronger one you are afraid to open.&lt;/p&gt;

&lt;p&gt;What is in your pre-flight that is not in mine? I am particularly interested in anyone who has automated the cache purge into the same window, because that is the step I still do by hand and still occasionally forget.&lt;/p&gt;

</description>
      <category>wordpress</category>
      <category>devops</category>
      <category>bash</category>
      <category>security</category>
    </item>
    <item>
      <title>Your Page Builder Did Not Break. One of Three Endpoints Stopped Resolving.</title>
      <dc:creator>Calin V.</dc:creator>
      <pubDate>Wed, 16 Sep 2026 17:47:20 +0000</pubDate>
      <link>https://dev.to/cifi/your-page-builder-did-not-break-one-of-three-endpoints-stopped-resolving-1lg1</link>
      <guid>https://dev.to/cifi/your-page-builder-did-not-break-one-of-three-endpoints-stopped-resolving-1lg1</guid>
      <description>&lt;p&gt;A page builder editor that hangs on the loading spinner, or saves and then reports failure with no error worth reading, is almost never a security problem. It is a routing problem with a security plugin's fingerprints on it, and the reason it is hard to fix from the dashboard is that the dashboard cannot tell you which request stopped resolving.&lt;/p&gt;

&lt;p&gt;Three endpoints decide this. &lt;code&gt;/wp-admin/&lt;/code&gt;, &lt;code&gt;admin-ajax.php&lt;/code&gt;, and the REST API at &lt;code&gt;/wp-json/&lt;/code&gt;. Every builder editor I have had to debug uses all three, in that order, and a security plugin that changes site paths can move any of them. What follows is how to find out which one moved without uninstalling anything.&lt;/p&gt;

&lt;p&gt;All of it runs against a site you own.&lt;/p&gt;

&lt;h2&gt;
  
  
  Probe all three from outside the session
&lt;/h2&gt;

&lt;p&gt;You do not need an authenticated cookie for the first pass. All three endpoints answer an anonymous request in a distinctive way, and the shape of the answer tells you whether the path still routes.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;SITE&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"https://example.com"&lt;/span&gt;

&lt;span class="c"&gt;# 1. wp-admin: an anonymous GET should 302 to the login form.&lt;/span&gt;
curl &lt;span class="nt"&gt;-s&lt;/span&gt; &lt;span class="nt"&gt;-o&lt;/span&gt; /dev/null &lt;span class="nt"&gt;-w&lt;/span&gt; &lt;span class="s1"&gt;'%{http_code} -&amp;gt; %{redirect_url}\n'&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$SITE&lt;/span&gt;&lt;span class="s2"&gt;/wp-admin/"&lt;/span&gt;

&lt;span class="c"&gt;# 2. admin-ajax.php: no action parameter, so WordPress answers "0" with a 400.&lt;/span&gt;
&lt;span class="c"&gt;#    The status is the point. A 404 here means the path is gone.&lt;/span&gt;
curl &lt;span class="nt"&gt;-s&lt;/span&gt; &lt;span class="nt"&gt;-o&lt;/span&gt; /dev/null &lt;span class="nt"&gt;-w&lt;/span&gt; &lt;span class="s1"&gt;'%{http_code}\n'&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$SITE&lt;/span&gt;&lt;span class="s2"&gt;/wp-admin/admin-ajax.php"&lt;/span&gt;

&lt;span class="c"&gt;# 3. REST API index: an anonymous GET returns the route index as JSON.&lt;/span&gt;
curl &lt;span class="nt"&gt;-s&lt;/span&gt; &lt;span class="nt"&gt;-o&lt;/span&gt; /dev/null &lt;span class="nt"&gt;-w&lt;/span&gt; &lt;span class="s1"&gt;'%{http_code}\n'&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$SITE&lt;/span&gt;&lt;span class="s2"&gt;/wp-json/"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Read it like this. A &lt;code&gt;302&lt;/code&gt; from the first, a &lt;code&gt;400&lt;/code&gt; from the second and a &lt;code&gt;200&lt;/code&gt; from the third means all three default paths still resolve, and your editor problem is somewhere else. Cache, most likely. Skip to the cached-&lt;code&gt;ajaxurl&lt;/code&gt; section.&lt;/p&gt;

&lt;p&gt;Any &lt;code&gt;404&lt;/code&gt; in that set is your answer. That endpoint has been changed and the server is not routing the new address to the old handler.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;403&lt;/code&gt; is a different animal and means a rule matched, not that the path moved. A firewall ruleset running at the rewrite layer will return 403 on a pattern match, and the editor's save payload can trip a rule written for SQL injection if it contains something that looks like one. If you get 403 on &lt;code&gt;admin-ajax.php&lt;/code&gt; but 200 on &lt;code&gt;/wp-json/&lt;/code&gt;, look at your ruleset before you look at your paths.&lt;/p&gt;

&lt;h2&gt;
  
  
  Tell a rewrite-layer 404 from a PHP 404
&lt;/h2&gt;

&lt;p&gt;This distinction decides where you go looking, and it is measurable.&lt;/p&gt;

&lt;p&gt;A rewrite-layer 404 is returned by Apache, LiteSpeed or nginx before PHP is invoked. A WordPress 404 is a full page load: bootstrap, database connection, template. The second one costs an order of magnitude more time.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Compare a known static asset, a known WordPress 404, and the endpoint under test.&lt;/span&gt;
&lt;span class="k"&gt;for &lt;/span&gt;U &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="s2"&gt;"/favicon.ico"&lt;/span&gt; &lt;span class="s2"&gt;"/this-page-does-not-exist-9182"&lt;/span&gt; &lt;span class="s2"&gt;"/wp-admin/admin-ajax.php"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;do
  &lt;/span&gt;&lt;span class="nb"&gt;printf&lt;/span&gt; &lt;span class="s1"&gt;'%-42s'&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$U&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;
  curl &lt;span class="nt"&gt;-s&lt;/span&gt; &lt;span class="nt"&gt;-o&lt;/span&gt; /dev/null &lt;span class="nt"&gt;-w&lt;/span&gt; &lt;span class="s1"&gt;'%{http_code}  ttfb=%{time_starttransfer}s  size=%{size_download}\n'&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$SITE$U&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;
&lt;span class="k"&gt;done&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A response that lands near the static file's TTFB with a tiny body never reached PHP, and the fix is in your rewrite rules. A response that lands near the WordPress 404's TTFB, with a full HTML page in the body, means PHP ran and WordPress itself did not recognise the request, which usually means a filter is rewriting the URL in output but no server rule was written to match it.&lt;/p&gt;

&lt;p&gt;You can confirm from headers too. WordPress sets &lt;code&gt;X-Robots-Tag&lt;/code&gt; and a &lt;code&gt;Link&lt;/code&gt; header on real page loads that a server-level 404 will not carry.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;-sI&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$SITE&lt;/span&gt;&lt;span class="s2"&gt;/wp-admin/admin-ajax.php"&lt;/span&gt; | &lt;span class="nb"&gt;grep&lt;/span&gt; &lt;span class="nt"&gt;-Ei&lt;/span&gt; &lt;span class="s1"&gt;'server|link|x-robots|x-powered-by'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  The nginx trap
&lt;/h2&gt;

&lt;p&gt;If your site runs nginx and the editor broke immediately after a path change, this is the cause more often than everything else combined.&lt;/p&gt;

&lt;p&gt;Plugins in this category write rewrite rules into &lt;code&gt;.htaccess&lt;/code&gt;. nginx does not read &lt;code&gt;.htaccess&lt;/code&gt;. It never has, there is no module for it, and the file sits on disk being ignored while the plugin's interface reports that the rules were written. The plugin is not lying; it wrote the file. The server is not reading it.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# On the server. If this returns rules and you are on nginx, they are doing nothing.&lt;/span&gt;
&lt;span class="nb"&gt;grep&lt;/span&gt; &lt;span class="nt"&gt;-n&lt;/span&gt; &lt;span class="nt"&gt;-A20&lt;/span&gt; &lt;span class="s1"&gt;'BEGIN'&lt;/span&gt; /var/www/example.com/public_html/.htaccess

&lt;span class="c"&gt;# What is actually serving you:&lt;/span&gt;
curl &lt;span class="nt"&gt;-sI&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$SITE&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; | &lt;span class="nb"&gt;grep&lt;/span&gt; &lt;span class="nt"&gt;-i&lt;/span&gt; &lt;span class="s1"&gt;'^server:'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The rules have to go into the server block and the service has to be reloaded. The generic shape, for a plugin that has moved a path and given you the mapping:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight nginx"&gt;&lt;code&gt;&lt;span class="k"&gt;location&lt;/span&gt; &lt;span class="p"&gt;~&lt;/span&gt;&lt;span class="sr"&gt;*&lt;/span&gt; &lt;span class="s"&gt;^/your-new-ajax-path/?&lt;/span&gt;$ &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kn"&gt;rewrite&lt;/span&gt; &lt;span class="s"&gt;^&lt;/span&gt; &lt;span class="n"&gt;/wp-admin/admin-ajax.php&lt;/span&gt; &lt;span class="s"&gt;last&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c1"&gt;# and for a relocated REST namespace&lt;/span&gt;
&lt;span class="k"&gt;location&lt;/span&gt; &lt;span class="p"&gt;~&lt;/span&gt;&lt;span class="sr"&gt;*&lt;/span&gt; &lt;span class="s"&gt;^/your-new-api-path/&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kn"&gt;rewrite&lt;/span&gt; &lt;span class="s"&gt;^/your-new-api-path/(.*)&lt;/span&gt;$ &lt;span class="n"&gt;/wp-json/&lt;/span&gt;&lt;span class="nv"&gt;$1&lt;/span&gt; &lt;span class="s"&gt;last&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;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;nginx &lt;span class="nt"&gt;-t&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nb"&gt;sudo &lt;/span&gt;systemctl reload nginx
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Test the config before reloading, every time. &lt;code&gt;nginx -t&lt;/code&gt; is the difference between a reload and an outage.&lt;/p&gt;

&lt;h2&gt;
  
  
  The stale ajaxurl nobody looks for
&lt;/h2&gt;

&lt;p&gt;This is the failure that survives a correct configuration, and it is worth knowing because the probes above will all come back clean while the editor stays broken.&lt;/p&gt;

&lt;p&gt;WordPress prints the AJAX endpoint into the page as a JavaScript variable, and builders read it from there rather than constructing it. If a full-page cache captured the HTML before the path change, or a JS concatenator inlined the old value into a bundle, the browser is sending editor requests to an address that no longer exists while the server is perfectly happy to route the new one.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# What the served HTML currently tells the browser the AJAX endpoint is:&lt;/span&gt;
curl &lt;span class="nt"&gt;-s&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$SITE&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; | &lt;span class="nb"&gt;grep&lt;/span&gt; &lt;span class="nt"&gt;-oE&lt;/span&gt; &lt;span class="s1"&gt;'(var )?ajaxurl[^;]{0,120};'&lt;/span&gt; | &lt;span class="nb"&gt;head&lt;/span&gt;

&lt;span class="c"&gt;# And what your builder's own localised config carries:&lt;/span&gt;
curl &lt;span class="nt"&gt;-s&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$SITE&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; | &lt;span class="nb"&gt;grep&lt;/span&gt; &lt;span class="nt"&gt;-oE&lt;/span&gt; &lt;span class="s1"&gt;'"ajaxurl":"[^"]+"'&lt;/span&gt; | &lt;span class="nb"&gt;head&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If either of those still shows the pre-change path, no amount of rewrite work will help. Purge in this order, because purging out of order just repopulates the layer you cleaned: CDN first, then server-level cache, then the WordPress cache plugin, then the browser. Any concatenated or minified JS bundles have to be regenerated, not just evicted.&lt;/p&gt;

&lt;p&gt;While you are there, check the enqueued asset URLs too. A builder that loads its editor JS from a plugin directory whose name has been changed in output, without a matching server rule, produces a spinner that never resolves and zero errors in the PHP log, because the request never reached PHP.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;-s&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$SITE&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; | &lt;span class="nb"&gt;grep&lt;/span&gt; &lt;span class="nt"&gt;-oE&lt;/span&gt; &lt;span class="s1"&gt;'src="[^"]+\.js[^"]*"'&lt;/span&gt; | &lt;span class="nb"&gt;head&lt;/span&gt; &lt;span class="nt"&gt;-20&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Snapshot first, then bisect
&lt;/h2&gt;

&lt;p&gt;Take the restore point before you change anything else. It is two commands and it converts every subsequent step from a risk into an experiment.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cd&lt;/span&gt; /var/www/example.com/public_html
&lt;span class="nb"&gt;cp&lt;/span&gt; .htaccess &lt;span class="s2"&gt;".htaccess.&lt;/span&gt;&lt;span class="si"&gt;$(&lt;/span&gt;&lt;span class="nb"&gt;date&lt;/span&gt; +%F-%H%M&lt;span class="si"&gt;)&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;
wp db &lt;span class="nb"&gt;export&lt;/span&gt; &lt;span class="s2"&gt;"pre-path-change-&lt;/span&gt;&lt;span class="si"&gt;$(&lt;/span&gt;&lt;span class="nb"&gt;date&lt;/span&gt; +%F-%H%M&lt;span class="si"&gt;)&lt;/span&gt;&lt;span class="s2"&gt;.sql"&lt;/span&gt; &lt;span class="nt"&gt;--add-drop-table&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then revert one endpoint at a time, in this order, testing a real save in the editor between each step:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;The AJAX endpoint.&lt;/strong&gt; Most builder failures are here, because the editor talks to it continuously and the URL is baked into output rather than resolved at request time.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The REST API path.&lt;/strong&gt; Saving is what breaks, and it often breaks silently, which makes this the second most likely and the most annoying to diagnose.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The admin path.&lt;/strong&gt; On hosts that restrict what can be done with the admin directory, this one fails in ways that look like a permissions problem.
Find where your plugin keeps that configuration rather than guessing at option names:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Substitute your plugin's own option prefix for PREFIX. `wp plugin list` will remind you of the slug.&lt;/span&gt;
wp plugin list &lt;span class="nt"&gt;--status&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;active &lt;span class="nt"&gt;--field&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;name
wp option list &lt;span class="nt"&gt;--search&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'*PREFIX*'&lt;/span&gt; &lt;span class="nt"&gt;--fields&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;option_name,option_value | &lt;span class="nb"&gt;head&lt;/span&gt; &lt;span class="nt"&gt;-40&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Between each revert, log out and back in through your current login path. Session cookies are issued against the paths that were in force at the time, and stale cookies produce save failures that look exactly like a routing problem but are not one. Then resave permalinks, which regenerates rewrite rules without changing any setting.&lt;/p&gt;

&lt;h2&gt;
  
  
  The rule that prevents all of this
&lt;/h2&gt;

&lt;p&gt;Anonymous traffic never touches these three endpoints. Automated scanning goes after the front end: plugin and theme directories, readme files, the login form, version strings in your page source. Changing those breaks the reconnaissance step of an automated attack. Changing &lt;code&gt;admin-ajax.php&lt;/code&gt; breaks your editor and adds close to nothing, because nothing hostile was looking there.&lt;/p&gt;

&lt;p&gt;So the configuration that costs you nothing and buys you most of the benefit is to change everything an unauthenticated request can see and leave the three endpoints your own tooling depends on exactly where they are.&lt;/p&gt;

&lt;p&gt;That is not a compromise position. According to Patchstack's &lt;em&gt;State of WordPress Security in 2026&lt;/em&gt;, 91% of the 11,334 vulnerabilities disclosed across the WordPress ecosystem in 2025 were in plugins, 46% of them had no patch available at the moment of disclosure, and the weighted median time from disclosure to first exploitation was five hours. Reducing what is reachable is the layer that does anything at all inside a five-hour window. A custom AJAX path is not part of that layer, and the same report's pentest of hosting defences, where internal WAFs, Cloudflare, Imunify360 and ModSecurity blocked 12% of attacks against known-exploited vulnerabilities and 26% on a broader test, is a reasonable prior for how much the layer underneath is contributing.&lt;/p&gt;

&lt;p&gt;A control that gets deactivated in July because it broke an editor is protecting nothing in August. The setting you leave alone is part of the security configuration.&lt;/p&gt;

&lt;p&gt;What is the endpoint failure that cost you the most time before you found it? I am after the one where every probe came back clean and the answer turned out to be somewhere else entirely.&lt;/p&gt;

</description>
      <category>wordpress</category>
      <category>security</category>
      <category>webdev</category>
      <category>devops</category>
    </item>
    <item>
      <title>Verify Your WordPress Hardening From the Command Line Before You Trust It</title>
      <dc:creator>Calin V.</dc:creator>
      <pubDate>Thu, 03 Sep 2026 14:35:46 +0000</pubDate>
      <link>https://dev.to/cifi/verify-your-wordpress-hardening-from-the-command-line-before-you-trust-it-1edd</link>
      <guid>https://dev.to/cifi/verify-your-wordpress-hardening-from-the-command-line-before-you-trust-it-1edd</guid>
      <description>&lt;p&gt;Most WordPress hardening advice ends at "turn it on." Almost none of it tells you how to confirm the thing you turned on is doing anything, which is a problem, because the two most common outcomes of configuring a security plugin are a control that silently does nothing and a control that silently breaks your site.&lt;/p&gt;

&lt;p&gt;Both look identical from the dashboard. The panel says enabled either way.&lt;/p&gt;

&lt;p&gt;What follows is the check I run after configuring hardening on a site, control by control. It is four commands and a rollback drill, and it takes about ten minutes. Everything here runs against a site you own.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why verification matters more than coverage here
&lt;/h2&gt;

&lt;p&gt;Patchstack's &lt;em&gt;State of WordPress Security in 2026&lt;/em&gt; put 11,334 vulnerabilities across the WordPress ecosystem in 2025, 91% of them in plugins and 9% in themes, with six in core, all low risk. The exposure is the code you installed.&lt;/p&gt;

&lt;p&gt;The number that decides your strategy is the next one: 46% of those had no patch available at disclosure, and the weighted median time to first exploitation was five hours. Patching is necessary and it is not, on its own, a plan. So you run a hardening layer underneath it, and the hardening layer is only worth what you can prove it does.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Prove the default paths return 404, and that PHP never ran
&lt;/h2&gt;

&lt;p&gt;The first control is reconfiguring the default endpoints so that a scan against &lt;code&gt;wp-login.php&lt;/code&gt;, &lt;code&gt;wp-admin&lt;/code&gt;, &lt;code&gt;wp-json&lt;/code&gt; and the plugin and theme directories fails at reconnaissance.&lt;/p&gt;

&lt;p&gt;Checking the status code is the easy half:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;SITE&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"https://example.com"&lt;/span&gt;
&lt;span class="k"&gt;for &lt;/span&gt;p &lt;span class="k"&gt;in &lt;/span&gt;wp-login.php wp-admin/ wp-json/ wp-content/plugins/ xmlrpc.php&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;do
  &lt;/span&gt;&lt;span class="nv"&gt;code&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="si"&gt;$(&lt;/span&gt;curl &lt;span class="nt"&gt;-s&lt;/span&gt; &lt;span class="nt"&gt;-o&lt;/span&gt; /dev/null &lt;span class="nt"&gt;-w&lt;/span&gt; &lt;span class="s1"&gt;'%{http_code}'&lt;/span&gt; &lt;span class="nt"&gt;-L&lt;/span&gt; &lt;span class="nt"&gt;--max-time&lt;/span&gt; 10 &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$SITE&lt;/span&gt;&lt;span class="s2"&gt;/&lt;/span&gt;&lt;span class="nv"&gt;$p&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="si"&gt;)&lt;/span&gt;
  &lt;span class="nb"&gt;printf&lt;/span&gt; &lt;span class="s1"&gt;'%-26s %s\n'&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$p&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$code&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;
&lt;span class="k"&gt;done&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A 404 or 403 on the paths you reconfigured is what you want. A 200 on &lt;code&gt;wp-login.php&lt;/code&gt; means the setting did not apply, which usually means a caching layer served you a stale page or the rewrite rules were never written.&lt;/p&gt;

&lt;p&gt;The harder and more useful half is finding out &lt;strong&gt;where&lt;/strong&gt; that 404 came from. A 404 emitted by the web server from a rewrite rule is a different security property from a 404 emitted by WordPress after it booted, loaded the plugin stack, and decided to deny you. The first one means the exploit path never executed. The second means every line of PHP ran and then politely declined.&lt;/p&gt;

&lt;p&gt;Two signals discriminate them. Headers first:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;-sSI&lt;/span&gt; &lt;span class="s2"&gt;"https://example.com/wp-login.php"&lt;/span&gt; | &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nb"&gt;grep&lt;/span&gt; &lt;span class="nt"&gt;-iE&lt;/span&gt; &lt;span class="s1"&gt;'HTTP/|server|x-powered-by|set-cookie|link|x-redirect-by'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A rewrite-layer rejection is bare: a status line, a server header, a content type, little else. If you see &lt;code&gt;x-powered-by: PHP/8.x&lt;/code&gt;, a &lt;code&gt;Set-Cookie&lt;/code&gt; carrying a WordPress cookie, or a &lt;code&gt;Link:&lt;/code&gt; header advertising the REST API, then WordPress ran. That is the application-layer version of the control.&lt;/p&gt;

&lt;p&gt;Then timing, against a known-static file as your baseline:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;FMT&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'%{http_code}  ttfb=%{time_starttransfer}s  total=%{time_total}s\n'&lt;/span&gt;
curl &lt;span class="nt"&gt;-s&lt;/span&gt; &lt;span class="nt"&gt;-o&lt;/span&gt; /dev/null &lt;span class="nt"&gt;-w&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$FMT&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; https://example.com/robots.txt
curl &lt;span class="nt"&gt;-s&lt;/span&gt; &lt;span class="nt"&gt;-o&lt;/span&gt; /dev/null &lt;span class="nt"&gt;-w&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$FMT&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; https://example.com/wp-login.php
curl &lt;span class="nt"&gt;-s&lt;/span&gt; &lt;span class="nt"&gt;-o&lt;/span&gt; /dev/null &lt;span class="nt"&gt;-w&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$FMT&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; https://example.com/definitely-not-a-real-path-9f2a
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If the blocked path's TTFB sits close to &lt;code&gt;robots.txt&lt;/code&gt;, the request died before PHP. If it sits close to a normal WordPress 404, WordPress handled it. Run each three or four times; a single sample on shared hosting tells you nothing.&lt;/p&gt;

&lt;p&gt;One caveat worth stating out loud: this is measuring where enforcement happens, not whether an attacker can guess the new path. Those are separate questions and only the first one is testable with curl.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Prove the firewall ruleset is actually loaded
&lt;/h2&gt;

&lt;p&gt;A 7G or 8G ruleset rejects injection strings, traversal attempts and malformed requests by pattern. On Apache and LiteSpeed those land as rewrite directives, so they are evaluated before PHP.&lt;/p&gt;

&lt;p&gt;Confirm the rules exist on disk first, rather than trusting the panel:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Apache / LiteSpeed&lt;/span&gt;
&lt;span class="nb"&gt;grep&lt;/span&gt; &lt;span class="nt"&gt;-nE&lt;/span&gt; &lt;span class="s1"&gt;'7G|8G|RewriteCond|RewriteRule'&lt;/span&gt; /path/to/site/.htaccess | &lt;span class="nb"&gt;head&lt;/span&gt; &lt;span class="nt"&gt;-40&lt;/span&gt;

&lt;span class="c"&gt;# nginx: rules live in the server block, not in .htaccess&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;nginx &lt;span class="nt"&gt;-T&lt;/span&gt; 2&amp;gt;/dev/null | &lt;span class="nb"&gt;grep&lt;/span&gt; &lt;span class="nt"&gt;-nE&lt;/span&gt; &lt;span class="s1"&gt;'location|deny|return 403'&lt;/span&gt; | &lt;span class="nb"&gt;head&lt;/span&gt; &lt;span class="nt"&gt;-40&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;On nginx this step matters more than people expect. Plenty of plugins write &lt;code&gt;.htaccess&lt;/code&gt; unconditionally, and on nginx that file is inert. The panel reports success, the rules are never read, and nothing in the UI says so.&lt;/p&gt;

&lt;p&gt;Then send a request that trips a pattern, against your own site:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;-s&lt;/span&gt; &lt;span class="nt"&gt;-o&lt;/span&gt; /dev/null &lt;span class="nt"&gt;-w&lt;/span&gt; &lt;span class="s1"&gt;'%{http_code}\n'&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--get&lt;/span&gt; &lt;span class="nt"&gt;--data-urlencode&lt;/span&gt; &lt;span class="s1"&gt;'p=../../../../etc/passwd'&lt;/span&gt; https://example.com/

curl &lt;span class="nt"&gt;-s&lt;/span&gt; &lt;span class="nt"&gt;-o&lt;/span&gt; /dev/null &lt;span class="nt"&gt;-w&lt;/span&gt; &lt;span class="s1"&gt;'%{http_code}\n'&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--get&lt;/span&gt; &lt;span class="nt"&gt;--data-urlencode&lt;/span&gt; &lt;span class="s2"&gt;"s=1' UNION SELECT 1,2,3-- -"&lt;/span&gt; https://example.com/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;403 means the ruleset fired. 200 means the request reached WordPress and was handled as an ordinary query, which is not itself a vulnerability but does tell you the layer you thought was in front is not in front.&lt;/p&gt;

&lt;p&gt;Do not over-read a pass here. Patchstack's 2025 pentest of common defences, covering internal host WAFs, Cloudflare, Imunify360 and ModSecurity, found they blocked 12% of attacks against known-exploited vulnerabilities, rising to 26% on a broader test. The best host in the set reached 60.7%. One blocked nothing. A pattern ruleset that answers 403 to a traversal string is working as designed, and working as designed still leaves most real exploit traffic to something else.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Prove the login throttle counts, and find the number
&lt;/h2&gt;

&lt;p&gt;Rate limiting is the control most often enabled and least often verified, because verifying it means locking yourself out on purpose. Do that deliberately, on your own site, with a second browser session already open somewhere else.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;LOGIN&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"https://example.com/your-configured-login-path"&lt;/span&gt;
&lt;span class="k"&gt;for &lt;/span&gt;i &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="si"&gt;$(&lt;/span&gt;&lt;span class="nb"&gt;seq &lt;/span&gt;1 12&lt;span class="si"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;do
  &lt;/span&gt;&lt;span class="nv"&gt;code&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="si"&gt;$(&lt;/span&gt;curl &lt;span class="nt"&gt;-s&lt;/span&gt; &lt;span class="nt"&gt;-o&lt;/span&gt; /dev/null &lt;span class="nt"&gt;-w&lt;/span&gt; &lt;span class="s1"&gt;'%{http_code}'&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
    &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="s2"&gt;"log=verify-throttle-&lt;/span&gt;&lt;span class="nv"&gt;$i&lt;/span&gt;&lt;span class="s2"&gt;&amp;amp;pwd=wrong-on-purpose"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
    &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s1"&gt;'Content-Type: application/x-www-form-urlencoded'&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
    &lt;span class="nt"&gt;--max-time&lt;/span&gt; 10 &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$LOGIN&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="si"&gt;)&lt;/span&gt;
  &lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"attempt &lt;/span&gt;&lt;span class="nv"&gt;$i&lt;/span&gt;&lt;span class="s2"&gt; -&amp;gt; &lt;/span&gt;&lt;span class="nv"&gt;$code&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;
  &lt;span class="nb"&gt;sleep &lt;/span&gt;1
&lt;span class="k"&gt;done&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You are looking for the attempt number where the response changes: a 403, a 429, or a body that stops being the login form. That number is your actual lockout threshold, which is frequently not the number in the settings field, because a caching layer or a proxy in front can absorb attempts before they are counted.&lt;/p&gt;

&lt;p&gt;While you are here, check what the site does with &lt;code&gt;XML-RPC&lt;/code&gt;, which is a second credential endpoint that a login throttle configured only for the form may not cover:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;-s&lt;/span&gt; &lt;span class="nt"&gt;-X&lt;/span&gt; POST https://example.com/xmlrpc.php &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s1"&gt;'Content-Type: text/xml'&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="s1"&gt;'&amp;lt;methodCall&amp;gt;&amp;lt;methodName&amp;gt;system.listMethods&amp;lt;/methodName&amp;gt;&amp;lt;params&amp;gt;&amp;lt;/params&amp;gt;&amp;lt;/methodCall&amp;gt;'&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  | &lt;span class="nb"&gt;head&lt;/span&gt; &lt;span class="nt"&gt;-c&lt;/span&gt; 400
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A method list coming back means the endpoint is live. &lt;code&gt;system.multicall&lt;/code&gt; is the reason people care: it lets an attacker bundle many credential attempts into a single HTTP request, so a throttle that counts requests rather than attempts undercounts badly.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Prove 2FA covers the paths that actually carry credentials
&lt;/h2&gt;

&lt;p&gt;The Verizon 2025 Data Breach Investigations Report found 88% of Basic Web Application attacks involved stolen credentials, which is why a second factor is on the short list at all. Passkeys are the strongest form, because the challenge is bound to your domain and a phished credential cannot be replayed elsewhere.&lt;/p&gt;

&lt;p&gt;The gap worth checking is that 2FA usually protects the &lt;strong&gt;form&lt;/strong&gt;, and the form is not the only way credentials enter your site. Application passwords authenticate over REST and are unaffected by two-factor, captcha, throttling, or a reconfigured login path. They are issued once and do not expire on their own.&lt;/p&gt;

&lt;p&gt;List what exists:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;wp user list &lt;span class="nt"&gt;--field&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;ID | &lt;span class="k"&gt;while &lt;/span&gt;&lt;span class="nb"&gt;read&lt;/span&gt; &lt;span class="nt"&gt;-r&lt;/span&gt; &lt;span class="nb"&gt;id&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;do
  &lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"== user &lt;/span&gt;&lt;span class="nv"&gt;$id&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;
  wp user application-password list &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$id&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="nt"&gt;--format&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;table 2&amp;gt;/dev/null
&lt;span class="k"&gt;done&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then confirm the credential works without ever touching your login page:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;-s&lt;/span&gt; &lt;span class="nt"&gt;-u&lt;/span&gt; &lt;span class="s1"&gt;'username:xxxx xxxx xxxx xxxx xxxx xxxx'&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  https://example.com/wp-json/wp/v2/users/me | &lt;span class="nb"&gt;head&lt;/span&gt; &lt;span class="nt"&gt;-c&lt;/span&gt; 300
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If that returns your user object, then every login control you configured is out of the request path for that credential, by construction. Which is fine when you provisioned it deliberately and know it exists. It is a problem when it was issued for a mobile app in 2023 by somebody who has left.&lt;/p&gt;

&lt;p&gt;Revoke what you cannot account for:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;wp user application-password delete &amp;lt;user-id&amp;gt; &amp;lt;uuid&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  5. Rehearse the rollback before you need it
&lt;/h2&gt;

&lt;p&gt;This is the step that decides whether any of the above survives, and it is the one nobody does.&lt;/p&gt;

&lt;p&gt;Find your recovery path while you can still log in, then actually run it once:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# WP-CLI, if you have shell access&lt;/span&gt;
wp plugin deactivate &amp;lt;plugin-slug&amp;gt;
wp rewrite flush &lt;span class="nt"&gt;--hard&lt;/span&gt;

&lt;span class="c"&gt;# no shell: rename the plugin directory over SFTP&lt;/span&gt;
&lt;span class="nb"&gt;mv &lt;/span&gt;wp-content/plugins/&amp;lt;plugin-slug&amp;gt; wp-content/plugins/&amp;lt;plugin-slug&amp;gt;.off

&lt;span class="c"&gt;# and keep a known-good copy of the rewrite rules before you change anything&lt;/span&gt;
&lt;span class="nb"&gt;cp&lt;/span&gt; .htaccess .htaccess.pre-hardening
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Two things to confirm during the drill. First, that deactivating restores the default paths immediately rather than leaving a half-applied rewrite state, which is the difference between a plugin that writes rules and one that also modifies core files. Second, that you know your vendor's documented bypass URL, if it has one, and that it is bookmarked somewhere you can reach from a phone.&lt;/p&gt;

&lt;p&gt;A control you cannot reverse under pressure is a control you will eventually disable permanently at 2am, and a permanently disabled control protects nothing.&lt;/p&gt;

&lt;h2&gt;
  
  
  The short version
&lt;/h2&gt;

&lt;p&gt;Four commands and a drill:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;code&gt;curl -I&lt;/code&gt; the default paths, and use TTFB against a static file to tell a rewrite-layer 404 from a PHP one.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;grep&lt;/code&gt; the actual server config for the ruleset, then trip one pattern and expect 403. On nginx, check that &lt;code&gt;.htaccess&lt;/code&gt; is not being written into the void.&lt;/li&gt;
&lt;li&gt;Loop failed logins until the status code changes, and find out whether the real threshold matches the configured one. Check &lt;code&gt;xmlrpc.php&lt;/code&gt; separately.&lt;/li&gt;
&lt;li&gt;List application passwords, prove one authenticates without the login form, and revoke what you cannot account for.
Then rehearse the rollback while you are still logged in.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;What is the check you run that is not on this list? I am specifically after the one that caught something the dashboard reported as fine.&lt;/p&gt;

</description>
      <category>wordpress</category>
      <category>security</category>
      <category>devops</category>
      <category>php</category>
    </item>
    <item>
      <title>Measure What a Security Plugin Costs You, Instead of Reading the Benchmark</title>
      <dc:creator>Calin V.</dc:creator>
      <pubDate>Sat, 29 Aug 2026 07:58:19 +0000</pubDate>
      <link>https://dev.to/cifi/measure-what-a-security-plugin-costs-you-instead-of-reading-the-benchmark-111o</link>
      <guid>https://dev.to/cifi/measure-what-a-security-plugin-costs-you-instead-of-reading-the-benchmark-111o</guid>
      <description>&lt;p&gt;Every security plugin vendor publishes a performance claim, and none of them are measuring your site. The host, the PHP version, the opcode cache, the traffic mix and whatever else is installed all move the result more than the plugin does. I am not going to give you a percentage in this post, because I do not have one I would defend in a code review.&lt;/p&gt;

&lt;p&gt;What I can give you is the method. Half an hour of setup produces numbers about your stack, and those numbers settle the argument that vendor benchmarks never will.&lt;/p&gt;

&lt;p&gt;Three things are worth measuring separately, because they behave differently and get confused constantly:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Per-request cost.&lt;/strong&gt; PHP executed on every hit, whether or not anything security-relevant happened.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Write cost.&lt;/strong&gt; Rows inserted per event the plugin decides to record. Scales with traffic, not with legitimate traffic.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Storage cost.&lt;/strong&gt; What the accumulated records weigh, and specifically how much of it WordPress loads into memory on every single request.
The third one is where the hundred-megabyte options-table stories come from, and it is almost always a logging feature rather than a firewall.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Per-request cost: median TTFB, not one curl
&lt;/h2&gt;

&lt;p&gt;A single &lt;code&gt;curl -w&lt;/code&gt; is noise. Take the median of a run and compare medians.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;#!/usr/bin/env bash&lt;/span&gt;
&lt;span class="c"&gt;# ttfb.sh - median time-to-first-byte over N requests&lt;/span&gt;
&lt;span class="c"&gt;# usage: ./ttfb.sh https://staging.example.com/ 40&lt;/span&gt;
&lt;span class="nb"&gt;set&lt;/span&gt; &lt;span class="nt"&gt;-euo&lt;/span&gt; pipefail

&lt;span class="nv"&gt;URL&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;1&lt;/span&gt;:?usage:&lt;span class="p"&gt; ttfb.sh &amp;lt;url&amp;gt; [n]&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;
&lt;span class="nv"&gt;N&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;2&lt;/span&gt;&lt;span class="k"&gt;:-&lt;/span&gt;&lt;span class="nv"&gt;40&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;
&lt;span class="nv"&gt;TMP&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="si"&gt;$(&lt;/span&gt;&lt;span class="nb"&gt;mktemp&lt;/span&gt;&lt;span class="si"&gt;)&lt;/span&gt;

&lt;span class="k"&gt;for &lt;/span&gt;_ &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="si"&gt;$(&lt;/span&gt;&lt;span class="nb"&gt;seq&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$N&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="si"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;do
  &lt;/span&gt;curl &lt;span class="nt"&gt;-sS&lt;/span&gt; &lt;span class="nt"&gt;-o&lt;/span&gt; /dev/null &lt;span class="se"&gt;\&lt;/span&gt;
       &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s1"&gt;'Cache-Control: no-cache'&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
       &lt;span class="nt"&gt;-w&lt;/span&gt; &lt;span class="s1"&gt;'%{time_starttransfer}\n'&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
       &lt;span class="nt"&gt;--max-time&lt;/span&gt; 20 &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$URL&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$TMP&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;
  &lt;span class="nb"&gt;sleep &lt;/span&gt;0.4
&lt;span class="k"&gt;done

&lt;/span&gt;&lt;span class="nb"&gt;sort&lt;/span&gt; &lt;span class="nt"&gt;-g&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$TMP&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; | &lt;span class="nb"&gt;awk&lt;/span&gt; &lt;span class="nt"&gt;-v&lt;/span&gt; &lt;span class="nv"&gt;n&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$N&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="s1"&gt;'
  { v[NR] = $1 }
  END {
    printf "n=%d  min=%.3f  p50=%.3f  p90=%.3f  max=%.3f\n",
      NR, v[1], v[int(NR*0.5)+0], v[int(NR*0.9)+0], v[NR]
  }'&lt;/span&gt;
&lt;span class="nb"&gt;rm&lt;/span&gt; &lt;span class="nt"&gt;-f&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$TMP&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Rules that make the output mean something:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Run it against &lt;strong&gt;staging&lt;/strong&gt;, not production, and against a URL your page cache does not serve. A cached response measures your cache, not your plugin stack.&lt;/li&gt;
&lt;li&gt;Send &lt;code&gt;Cache-Control: no-cache&lt;/code&gt; and pick a path with a query string if your cache is aggressive.&lt;/li&gt;
&lt;li&gt;Compare p50 and p90 from the same machine, at the same time of day, on the same host. Cross-host comparisons are worthless.
Now the A/B. Deactivate one plugin, re-measure, reactivate:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;#!/usr/bin/env bash&lt;/span&gt;
&lt;span class="c"&gt;# ab-plugin.sh - measure with a plugin off, then back on&lt;/span&gt;
&lt;span class="nb"&gt;set&lt;/span&gt; &lt;span class="nt"&gt;-euo&lt;/span&gt; pipefail
&lt;span class="nv"&gt;URL&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$1&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nv"&gt;SLUG&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$2&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;

&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"== baseline (all active)"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; ./ttfb.sh &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$URL&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; 40
wp plugin deactivate &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$SLUG&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt;/dev/null
&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"== without &lt;/span&gt;&lt;span class="nv"&gt;$SLUG&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;        ./ttfb.sh &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$URL&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; 40
wp plugin activate &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$SLUG&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt;/dev/null
&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"== restored"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;             ./ttfb.sh &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$URL&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; 40
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The third run matters. If "restored" does not land near "baseline", something else moved during the test and the middle number is not trustworthy.&lt;/p&gt;

&lt;p&gt;For attribution inside a single page load rather than a difference between two, Query Monitor breaks queries and hook time down per plugin on a live request, and the WP-CLI profile package does it from the shell:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;wp package &lt;span class="nb"&gt;install &lt;/span&gt;wp-cli/profile-command:@stable
wp profile stage &lt;span class="nt"&gt;--allow-root&lt;/span&gt;
wp profile hook &lt;span class="nt"&gt;--all&lt;/span&gt; &lt;span class="nt"&gt;--spotlight&lt;/span&gt; &lt;span class="nt"&gt;--orderby&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nb"&gt;time&lt;/span&gt; &lt;span class="nt"&gt;--order&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;desc | &lt;span class="nb"&gt;head&lt;/span&gt; &lt;span class="nt"&gt;-20&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Storage cost: aggregate autoload weight by plugin, not by option
&lt;/h2&gt;

&lt;p&gt;Total autoloaded weight first. This is what gets pulled into memory on every request, including requests that have nothing to do with security:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="k"&gt;SUM&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;LENGTH&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;option_value&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt; &lt;span class="k"&gt;AS&lt;/span&gt; &lt;span class="n"&gt;autoload_bytes&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
       &lt;span class="k"&gt;COUNT&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;                  &lt;span class="k"&gt;AS&lt;/span&gt; &lt;span class="n"&gt;autoload_rows&lt;/span&gt;
&lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;wp_options&lt;/span&gt;
&lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="n"&gt;autoload&lt;/span&gt; &lt;span class="k"&gt;IN&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'yes'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="s1"&gt;'on'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="s1"&gt;'auto'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="s1"&gt;'auto-on'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The accepted values in the &lt;code&gt;autoload&lt;/code&gt; column were expanded in recent WordPress releases, so the &lt;code&gt;IN&lt;/code&gt; list keeps this working across versions. Anything past a few hundred kilobytes is worth chasing.&lt;/p&gt;

&lt;p&gt;Listing the top twenty options is the usual next step, and it is fine, but it buries a plugin that autoloads two hundred small options under one plugin that autoloads a single large one. Aggregate by prefix instead:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;SELECT&lt;/span&gt;
  &lt;span class="n"&gt;SUBSTRING_INDEX&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;TRIM&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;LEADING&lt;/span&gt; &lt;span class="s1"&gt;'_'&lt;/span&gt; &lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;option_name&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="s1"&gt;'_'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;AS&lt;/span&gt; &lt;span class="k"&gt;prefix&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="k"&gt;COUNT&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;                                                    &lt;span class="k"&gt;AS&lt;/span&gt; &lt;span class="n"&gt;rows_n&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;ROUND&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;SUM&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;LENGTH&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;option_value&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mi"&gt;1024&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;                  &lt;span class="k"&gt;AS&lt;/span&gt; &lt;span class="n"&gt;kb&lt;/span&gt;
&lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;wp_options&lt;/span&gt;
&lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="n"&gt;autoload&lt;/span&gt; &lt;span class="k"&gt;IN&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'yes'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="s1"&gt;'on'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="s1"&gt;'auto'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="s1"&gt;'auto-on'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;GROUP&lt;/span&gt; &lt;span class="k"&gt;BY&lt;/span&gt; &lt;span class="k"&gt;prefix&lt;/span&gt;
&lt;span class="k"&gt;HAVING&lt;/span&gt; &lt;span class="n"&gt;kb&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;
&lt;span class="k"&gt;ORDER&lt;/span&gt; &lt;span class="k"&gt;BY&lt;/span&gt; &lt;span class="n"&gt;kb&lt;/span&gt; &lt;span class="k"&gt;DESC&lt;/span&gt;
&lt;span class="k"&gt;LIMIT&lt;/span&gt; &lt;span class="mi"&gt;25&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Option names carry the prefix of the plugin that created them, so this names the responsible plugin directly and ranks by what it actually costs rather than by the size of its largest single row. Core's own prefixes show up too, which is a useful sanity check on the query.&lt;/p&gt;

&lt;p&gt;Through WP-CLI, if you would rather not open a SQL client:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;wp option list &lt;span class="nt"&gt;--autoload&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;on &lt;span class="nt"&gt;--fields&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;option_name,size_bytes &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--format&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;csv &lt;span class="se"&gt;\&lt;/span&gt;
| &lt;span class="nb"&gt;awk&lt;/span&gt; &lt;span class="nt"&gt;-F&lt;/span&gt;, &lt;span class="s1"&gt;'NR&amp;gt;1 { split($1, p, "_"); k = p[1] ? p[1] : p[2]; s[k] += $2 }
           END { for (i in s) printf "%10.1f KB  %s\n", s[i]/1024, i }'&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
| &lt;span class="nb"&gt;sort&lt;/span&gt; &lt;span class="nt"&gt;-rn&lt;/span&gt; | &lt;span class="nb"&gt;head&lt;/span&gt; &lt;span class="nt"&gt;-20&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And table sizes, where accumulated logs live rather than autoloaded settings:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="k"&gt;table_name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
       &lt;span class="n"&gt;table_rows&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
       &lt;span class="n"&gt;ROUND&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="n"&gt;data_length&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;index_length&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mi"&gt;1024&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mi"&gt;1024&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;AS&lt;/span&gt; &lt;span class="n"&gt;mb&lt;/span&gt;
&lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;information_schema&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;TABLES&lt;/span&gt;
&lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="n"&gt;table_schema&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;DATABASE&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="k"&gt;ORDER&lt;/span&gt; &lt;span class="k"&gt;BY&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;data_length&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;index_length&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;DESC&lt;/span&gt;
&lt;span class="k"&gt;LIMIT&lt;/span&gt; &lt;span class="mi"&gt;15&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Two things to rule out before blaming security tooling. Transients that never expired are a common cause of options growth and usually come from caching or import plugins. And orphaned tables from plugins deleted years ago keep every row, because uninstalling removes the code and not the data.&lt;/p&gt;

&lt;h2&gt;
  
  
  Write cost: measure the growth rate, not the size
&lt;/h2&gt;

&lt;p&gt;A table's current size tells you where you are. Its growth rate tells you where you will be in six months, and that is the number that decides whether a logging feature is sustainable on this site.&lt;/p&gt;

&lt;p&gt;Sample it on a schedule:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;#!/usr/bin/env bash&lt;/span&gt;
&lt;span class="c"&gt;# table-growth.sh - append a size sample; run hourly from cron&lt;/span&gt;
&lt;span class="nb"&gt;set&lt;/span&gt; &lt;span class="nt"&gt;-euo&lt;/span&gt; pipefail
&lt;span class="nv"&gt;LOG&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;/var/log/wp-table-sizes.csv
&lt;span class="o"&gt;[&lt;/span&gt; &lt;span class="nt"&gt;-f&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$LOG&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="o"&gt;]&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"ts,table,mb,rows"&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$LOG&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;

wp db query &lt;span class="s2"&gt;"
  SELECT table_name, ROUND((data_length+index_length)/1024/1024,3), table_rows
  FROM information_schema.TABLES
  WHERE table_schema = DATABASE()
  ORDER BY (data_length+index_length) DESC LIMIT 15;"&lt;/span&gt; &lt;span class="nt"&gt;--skip-column-names&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
| &lt;span class="nb"&gt;awk&lt;/span&gt; &lt;span class="nt"&gt;-v&lt;/span&gt; &lt;span class="nv"&gt;ts&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="si"&gt;$(&lt;/span&gt;&lt;span class="nb"&gt;date&lt;/span&gt; +%FT%T&lt;span class="si"&gt;)&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="s1"&gt;'BEGIN{OFS=","} {print ts, $1, $2, $3}'&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$LOG&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# crontab -e&lt;/span&gt;
17 &lt;span class="k"&gt;*&lt;/span&gt; &lt;span class="k"&gt;*&lt;/span&gt; &lt;span class="k"&gt;*&lt;/span&gt; &lt;span class="k"&gt;*&lt;/span&gt; /usr/local/bin/table-growth.sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After a couple of days, bytes per day per table:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;awk&lt;/span&gt; &lt;span class="nt"&gt;-F&lt;/span&gt;, &lt;span class="s1"&gt;'NR&amp;gt;1 { if (!(($2) in first)) { first[$2]=$3; ft[$2]=$1 } last[$2]=$3; lt[$2]=$1 }
         END { for (t in last)
                 printf "%-40s %8.2f MB now  %+7.2f MB since %s\n",
                        t, last[t], last[t]-first[t], ft[t] }'&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  /var/log/wp-table-sizes.csv | &lt;span class="nb"&gt;sort&lt;/span&gt; &lt;span class="nt"&gt;-k2&lt;/span&gt; &lt;span class="nt"&gt;-rn&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Run it across a weekday and a weekend. Log tables that grow with bot traffic have a very different curve from tables that grow with human activity, and knowing which one you have tells you whether a retention setting fixes it or whether you need the traffic to stop arriving.&lt;/p&gt;

&lt;p&gt;Before you delete anything: most logging features ship a retention or pruning setting that defaults to keeping everything, and that is the first place to look. Deleting options a plugin actively reads will break it, and some log tables are referenced by the plugin's own admin screens. Back up first.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the numbers will not tell you
&lt;/h2&gt;

&lt;p&gt;Two limits worth stating, because a set of scripts like this invites over-reading.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A low blocked-attack count on a dashboard is ambiguous.&lt;/strong&gt; An operator running fail2ban across two servers posted his jail counts on r/Wordpress this month: crawlers banned 915 and 1,129, the &lt;code&gt;wp-login&lt;/code&gt; jails 15,189 and 50,386, the &lt;code&gt;xmlrpc&lt;/code&gt; jails 11,345 and 9,530. Those are his counters on his servers, not a general measurement. His conclusion is the useful part and it generalises fine: those bans happen at the server before PHP starts, so no plugin sees that traffic and none of it appears in any dashboard. A low count can mean less attack traffic, or it can mean something upstream absorbed it. From inside WordPress those look identical.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Cheap layers cannot see everything.&lt;/strong&gt; A rule evaluated before PHP starts can only answer questions that can be settled from the request itself. It does not know who is logged in or whether a user has the capability they are claiming. Broken access control was the largest single category Patchstack's RapidMitigate blocked in 2025, at 57% of attacks, precisely because it resembles normal authenticated traffic. Nothing at the rewrite layer catches that, and moving enforcement earlier trades visibility and context for cost.&lt;/p&gt;

&lt;p&gt;So this answers "what does this cost me", which is a real question with a measurable answer. It does not answer "is this the right control", which depends on what you are defending against.&lt;/p&gt;

&lt;h2&gt;
  
  
  One question
&lt;/h2&gt;

&lt;p&gt;If you have chased an options table into the hundreds of megabytes: what was actually at the top of the list when you aggregated by prefix? Mine has been a caching plugin more often than a security plugin, and I would like to know whether that holds for anyone else.&lt;/p&gt;

&lt;p&gt;I run engineering at Squirrly and spend more time in access logs than I would choose to. The article this accompanies, with the layer comparison in full, is here: &lt;a href="https://wpghost.com/lightweight-wordpress-security-plugin/" rel="noopener noreferrer"&gt;https://wpghost.com/lightweight-wordpress-security-plugin/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>wordpress</category>
      <category>php</category>
      <category>devops</category>
      <category>security</category>
    </item>
    <item>
      <title>Start with an inventory you can diff against next year</title>
      <dc:creator>Calin V.</dc:creator>
      <pubDate>Sat, 29 Aug 2026 07:01:29 +0000</pubDate>
      <link>https://dev.to/cifi/start-with-an-inventory-you-can-diff-against-next-year-23bh</link>
      <guid>https://dev.to/cifi/start-with-an-inventory-you-can-diff-against-next-year-23bh</guid>
      <description>&lt;p&gt;WP-CLI already knows most of what you need.&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 &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--fields&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;name,title,status,version,update,update_version,auto_update &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--format&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;csv &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="s2"&gt;"inventory-&lt;/span&gt;&lt;span class="si"&gt;$(&lt;/span&gt;&lt;span class="nb"&gt;date&lt;/span&gt; +%F&lt;span class="si"&gt;)&lt;/span&gt;&lt;span class="s2"&gt;.csv"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Run that on every site and keep the files. A year of these is a version history you did not have to ask a vendor for, and the diff between two of them answers the renewal question directly.&lt;/p&gt;

&lt;p&gt;For a portfolio, fan it out over an alias group and tag each row with the site:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;#!/usr/bin/env bash&lt;/span&gt;
&lt;span class="c"&gt;# inventory.sh - collect plugin state across an alias group into one CSV&lt;/span&gt;
&lt;span class="nb"&gt;set&lt;/span&gt; &lt;span class="nt"&gt;-euo&lt;/span&gt; pipefail

&lt;span class="nv"&gt;OUT&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"inventory-&lt;/span&gt;&lt;span class="si"&gt;$(&lt;/span&gt;&lt;span class="nb"&gt;date&lt;/span&gt; +%F&lt;span class="si"&gt;)&lt;/span&gt;&lt;span class="s2"&gt;.csv"&lt;/span&gt;
&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"site,name,version,update,update_version,status"&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$OUT&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;

&lt;span class="k"&gt;for &lt;/span&gt;site &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="si"&gt;$(&lt;/span&gt;wp @all cli info &lt;span class="nt"&gt;--format&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;json 2&amp;gt;/dev/null | jq &lt;span class="nt"&gt;-r&lt;/span&gt; &lt;span class="s1"&gt;'keys[]'&lt;/span&gt;&lt;span class="si"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;do
  &lt;/span&gt;wp &lt;span class="s2"&gt;"@&lt;/span&gt;&lt;span class="nv"&gt;$site&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; plugin list &lt;span class="se"&gt;\&lt;/span&gt;
     &lt;span class="nt"&gt;--fields&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;name,version,update,update_version,status &lt;span class="se"&gt;\&lt;/span&gt;
     &lt;span class="nt"&gt;--format&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;csv &lt;span class="nt"&gt;--skip-plugins&lt;/span&gt; &lt;span class="nt"&gt;--skip-themes&lt;/span&gt; 2&amp;gt;/dev/null &lt;span class="se"&gt;\&lt;/span&gt;
   | &lt;span class="nb"&gt;tail&lt;/span&gt; &lt;span class="nt"&gt;-n&lt;/span&gt; +2 &lt;span class="se"&gt;\&lt;/span&gt;
   | &lt;span class="nb"&gt;sed&lt;/span&gt; &lt;span class="s2"&gt;"s/^/&lt;/span&gt;&lt;span class="nv"&gt;$site&lt;/span&gt;&lt;span class="s2"&gt;,/"&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$OUT&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;
&lt;span class="k"&gt;done

&lt;/span&gt;&lt;span class="nb"&gt;wc&lt;/span&gt; &lt;span class="nt"&gt;-l&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$OUT&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;--skip-plugins --skip-themes&lt;/code&gt; keeps a broken plugin from taking the inventory run down with it. You want the census even when one site is unhappy.&lt;/p&gt;

&lt;h2&gt;
  
  
  Ask the directory what changed, for the plugins it knows about
&lt;/h2&gt;

&lt;p&gt;For anything hosted on wordpress.org, the public API will tell you the release history without any authentication.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;slug&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"query-monitor"&lt;/span&gt;

curl &lt;span class="nt"&gt;-sS&lt;/span&gt; &lt;span class="s2"&gt;"https://api.wordpress.org/plugins/info/1.0/&lt;/span&gt;&lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;slug&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;.json"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  | jq &lt;span class="s1"&gt;'{
      name,
      version,
      last_updated,
      active_installs,
      tested,
      requires_php,
      releases: (.versions | keys | map(select(. != "trunk")) | sort | .[-8:])
    }'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Two fields matter for a renewal decision. &lt;code&gt;last_updated&lt;/code&gt; tells you whether the product is being worked on at all. The tail of &lt;code&gt;versions&lt;/code&gt; tells you how many releases shipped in the period you paid for, which is a proxy for whether the value arrived as a stream or as a one-time setup.&lt;/p&gt;

&lt;p&gt;A wrapper over the whole inventory, so you get one table instead of forty curl calls:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;#!/usr/bin/env bash&lt;/span&gt;
&lt;span class="c"&gt;# release-cadence.sh - how many releases has each .org plugin shipped, and when was the last one&lt;/span&gt;
&lt;span class="nb"&gt;set&lt;/span&gt; &lt;span class="nt"&gt;-euo&lt;/span&gt; pipefail

&lt;span class="nb"&gt;printf&lt;/span&gt; &lt;span class="s1"&gt;'%-32s %-12s %-22s %s\n'&lt;/span&gt; SLUG INSTALLED LAST_UPDATED RELEASES_KNOWN

wp plugin list &lt;span class="nt"&gt;--field&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;name &lt;span class="nt"&gt;--status&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;active | &lt;span class="k"&gt;while &lt;/span&gt;&lt;span class="nb"&gt;read&lt;/span&gt; &lt;span class="nt"&gt;-r&lt;/span&gt; slug&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;do
  &lt;/span&gt;&lt;span class="nv"&gt;json&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="si"&gt;$(&lt;/span&gt;curl &lt;span class="nt"&gt;-sS&lt;/span&gt; &lt;span class="nt"&gt;--max-time&lt;/span&gt; 10 &lt;span class="se"&gt;\&lt;/span&gt;
    &lt;span class="s2"&gt;"https://api.wordpress.org/plugins/info/1.0/&lt;/span&gt;&lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;slug&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;.json"&lt;/span&gt; 2&amp;gt;/dev/null &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s1"&gt;'{}'&lt;/span&gt;&lt;span class="si"&gt;)&lt;/span&gt;

  &lt;span class="c"&gt;# a premium plugin is not in the directory and returns null or an error object&lt;/span&gt;
  &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="si"&gt;$(&lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$json&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; | jq &lt;span class="nt"&gt;-r&lt;/span&gt; &lt;span class="s1"&gt;'type'&lt;/span&gt;&lt;span class="si"&gt;)&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="o"&gt;!=&lt;/span&gt; &lt;span class="s2"&gt;"object"&lt;/span&gt; &lt;span class="o"&gt;]&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="si"&gt;$(&lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$json&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; | jq &lt;span class="nt"&gt;-r&lt;/span&gt; &lt;span class="s1"&gt;'.version // "null"'&lt;/span&gt;&lt;span class="si"&gt;)&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"null"&lt;/span&gt; &lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;then
    &lt;/span&gt;&lt;span class="nb"&gt;printf&lt;/span&gt; &lt;span class="s1"&gt;'%-32s %-12s %-22s %s\n'&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$slug&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="si"&gt;$(&lt;/span&gt;wp plugin get &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$slug&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="nt"&gt;--field&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;version&lt;span class="si"&gt;)&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="s2"&gt;"not-in-directory"&lt;/span&gt; &lt;span class="s2"&gt;"-"&lt;/span&gt;
    &lt;span class="k"&gt;continue
  fi

  &lt;/span&gt;&lt;span class="nb"&gt;printf&lt;/span&gt; &lt;span class="s1"&gt;'%-32s %-12s %-22s %s\n'&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
    &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$slug&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
    &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="si"&gt;$(&lt;/span&gt;wp plugin get &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$slug&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="nt"&gt;--field&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;version&lt;span class="si"&gt;)&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
    &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="si"&gt;$(&lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$json&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; | jq &lt;span class="nt"&gt;-r&lt;/span&gt; &lt;span class="s1"&gt;'.last_updated'&lt;/span&gt; | &lt;span class="nb"&gt;cut&lt;/span&gt; &lt;span class="nt"&gt;-d&lt;/span&gt;&lt;span class="s1"&gt;' '&lt;/span&gt; &lt;span class="nt"&gt;-f1&lt;/span&gt;&lt;span class="si"&gt;)&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
    &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="si"&gt;$(&lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$json&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; | jq &lt;span class="nt"&gt;-r&lt;/span&gt; &lt;span class="s1"&gt;'.versions | keys | length'&lt;/span&gt;&lt;span class="si"&gt;)&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;
&lt;span class="k"&gt;done&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The rows that print &lt;code&gt;not-in-directory&lt;/code&gt; are the interesting ones. Those are your paid plugins, and they are exactly the ones the public tooling cannot help you with.&lt;/p&gt;

&lt;h2&gt;
  
  
  The integrity check does not cover the things you pay for
&lt;/h2&gt;

&lt;p&gt;This is the part that surprised me when I first hit it, and it is load-bearing for anyone reasoning about premium plugin risk.&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 verify-checksums &lt;span class="nt"&gt;--all&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That command compares the files on disk against the checksums published by wordpress.org. It works, it is fast, and it is genuinely useful for catching tampering. It also only works for plugins hosted in the directory. A premium plugin returns something like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Warning: Could not retrieve the checksums for version 4.1.2 of plugin acme-pro, skipping.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;There is no published source of truth to compare against, because the vendor distributes the zip themselves. It is documented behaviour on developer.wordpress.org and a long-standing open request in the wp-cli repo, not a bug in your setup.&lt;/p&gt;

&lt;p&gt;The implication is worth stating plainly. The one built-in integrity check WordPress ships does not cover premium plugins, which is precisely where vendor-delivered tampering has actually occurred. The ShapedPlugin compromise in June 2026, CVE-2026-10735 at CVSS 9.8, distributed backdoored builds to paying customers through the vendor's own update system. As reported by BleepingComputer and The Hacker News, and per data collected by Defiant, the backdoor went into the Pro builds on 21 May and the first customer reports arrived on 10 June, so roughly twenty days passed with the malicious release being served as a legitimate update. Only the paid tiers were affected.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;wp core verify-checksums&lt;/code&gt; is the equivalent for core and does work, so run it anyway:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;wp core verify-checksums
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Diff what a release actually changed
&lt;/h2&gt;

&lt;p&gt;For premium plugins, the only reliable record of what you bought is the code itself. Keep the plugin directory in git and every update becomes a reviewable diff.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cd &lt;/span&gt;wp-content/plugins
git init
&lt;span class="nb"&gt;printf&lt;/span&gt; &lt;span class="s1"&gt;'*/cache/\n*/logs/\n*.log\n'&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; .gitignore
git add &lt;span class="nt"&gt;-A&lt;/span&gt;
git commit &lt;span class="nt"&gt;-m&lt;/span&gt; &lt;span class="s2"&gt;"baseline &lt;/span&gt;&lt;span class="si"&gt;$(&lt;/span&gt;&lt;span class="nb"&gt;date&lt;/span&gt; +%F&lt;span class="si"&gt;)&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then commit after each update round, on a schedule, with the version in the message:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;#!/usr/bin/env bash&lt;/span&gt;
&lt;span class="c"&gt;# snapshot.sh - commit the plugin tree after an update round&lt;/span&gt;
&lt;span class="nb"&gt;set&lt;/span&gt; &lt;span class="nt"&gt;-euo&lt;/span&gt; pipefail
&lt;span class="nb"&gt;cd&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="si"&gt;$(&lt;/span&gt;wp plugin path&lt;span class="si"&gt;)&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;

wp plugin list &lt;span class="nt"&gt;--fields&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;name,version &lt;span class="nt"&gt;--format&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;csv &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; .versions.csv
git add &lt;span class="nt"&gt;-A&lt;/span&gt;
git commit &lt;span class="nt"&gt;-q&lt;/span&gt; &lt;span class="nt"&gt;-m&lt;/span&gt; &lt;span class="s2"&gt;"plugins &lt;/span&gt;&lt;span class="si"&gt;$(&lt;/span&gt;&lt;span class="nb"&gt;date&lt;/span&gt; +%F&lt;span class="si"&gt;)&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt; &lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"no change"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nb"&gt;exit &lt;/span&gt;0&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="o"&gt;}&lt;/span&gt;
git &lt;span class="nt"&gt;--no-pager&lt;/span&gt; log &lt;span class="nt"&gt;-1&lt;/span&gt; &lt;span class="nt"&gt;--stat&lt;/span&gt; | &lt;span class="nb"&gt;head&lt;/span&gt; &lt;span class="nt"&gt;-40&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A year later, the renewal question has an exact answer:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# what did this vendor ship in the last 12 months, by volume and by file&lt;/span&gt;
git log &lt;span class="nt"&gt;--since&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'12 months ago'&lt;/span&gt; &lt;span class="nt"&gt;--oneline&lt;/span&gt; &lt;span class="nt"&gt;--&lt;/span&gt; acme-pro | &lt;span class="nb"&gt;wc&lt;/span&gt; &lt;span class="nt"&gt;-l&lt;/span&gt;
git diff &lt;span class="nt"&gt;--stat&lt;/span&gt; &lt;span class="s2"&gt;"@{12 months ago}"&lt;/span&gt; HEAD &lt;span class="nt"&gt;--&lt;/span&gt; acme-pro
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Read the diff, not just the counter. A vendor shipping eleven releases that only bump a version constant and update a readme is not the same as a vendor shipping four releases that rewrite the request handling. I have had both, and only one of them was worth the renewal.&lt;/p&gt;

&lt;p&gt;Two things to keep in mind before you do this on a real server. The tree contains no secrets in a normal install, but check for any plugin writing licence keys into its own directory before you commit, and never push the repo anywhere public. And keep the repo out of the web root's reachable space, or at minimum confirm your server config rejects requests for &lt;code&gt;.git&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Put a number on it
&lt;/h2&gt;

&lt;p&gt;Once you have release cadence and diff volume, the pricing comparison stops being a feeling. This computes break-even against a one-time price and prints the cadence you measured alongside it, so you are not deciding on cost alone.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;#!/usr/bin/env python3
&lt;/span&gt;&lt;span class="sh"&gt;"""&lt;/span&gt;&lt;span class="s"&gt;breakeven.py - compare annual vs one-time licensing across an inventory.

Usage: ./breakeven.py licences.csv
CSV columns: name,annual,onetime,kind,releases_12mo
  kind = detection | configuration
&lt;/span&gt;&lt;span class="sh"&gt;"""&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;csv&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;sys&lt;/span&gt;

&lt;span class="n"&gt;HORIZON&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;6&lt;/span&gt;  &lt;span class="c1"&gt;# years to model
&lt;/span&gt;
&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;path&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="n"&gt;rows&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;list&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;csv&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;DictReader&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;open&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;path&lt;/span&gt;&lt;span class="p"&gt;)))&lt;/span&gt;
    &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;plugin&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="si"&gt;:&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="mi"&gt;24&lt;/span&gt;&lt;span class="si"&gt;}{&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;kind&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="si"&gt;:&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="mi"&gt;15&lt;/span&gt;&lt;span class="si"&gt;}{&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;rel/yr&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="si"&gt;:&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="mi"&gt;7&lt;/span&gt;&lt;span class="si"&gt;}{&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;annual&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="si"&gt;:&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="mi"&gt;9&lt;/span&gt;&lt;span class="si"&gt;}{&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;once&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="si"&gt;:&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="mi"&gt;8&lt;/span&gt;&lt;span class="si"&gt;}{&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;break-even&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="si"&gt;:&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="mi"&gt;12&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;total_annual&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mf"&gt;0.0&lt;/span&gt;
    &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;r&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;rows&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="n"&gt;annual&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;float&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;r&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;annual&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="ow"&gt;or&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="n"&gt;once&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;float&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;r&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;onetime&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="ow"&gt;or&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="n"&gt;total_annual&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="n"&gt;annual&lt;/span&gt;
        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;annual&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="ow"&gt;or&lt;/span&gt; &lt;span class="n"&gt;once&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="n"&gt;be&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;n/a&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
        &lt;span class="k"&gt;else&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="n"&gt;years&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;once&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="n"&gt;annual&lt;/span&gt;
            &lt;span class="n"&gt;be&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;years&lt;/span&gt;&lt;span class="si"&gt;:&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt; yr&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;years&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="n"&gt;HORIZON&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;&amp;gt;&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;HORIZON&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt; yr&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
        &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;r&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;name&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="si"&gt;:&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="mi"&gt;24&lt;/span&gt;&lt;span class="si"&gt;}{&lt;/span&gt;&lt;span class="n"&gt;r&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;kind&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="si"&gt;:&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="mi"&gt;15&lt;/span&gt;&lt;span class="si"&gt;}{&lt;/span&gt;&lt;span class="n"&gt;r&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;releases_12mo&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="si"&gt;:&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="mi"&gt;7&lt;/span&gt;&lt;span class="si"&gt;}{&lt;/span&gt;&lt;span class="n"&gt;annual&lt;/span&gt;&lt;span class="si"&gt;:&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="mf"&gt;9.0&lt;/span&gt;&lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="si"&gt;}{&lt;/span&gt;&lt;span class="n"&gt;once&lt;/span&gt;&lt;span class="si"&gt;:&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="mf"&gt;8.0&lt;/span&gt;&lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="si"&gt;}{&lt;/span&gt;&lt;span class="n"&gt;be&lt;/span&gt;&lt;span class="si"&gt;:&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="mi"&gt;12&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s"&gt;annual spend: &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;total_annual&lt;/span&gt;&lt;span class="si"&gt;:&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;/yr, &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;total_annual&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;HORIZON&lt;/span&gt;&lt;span class="si"&gt;:&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt; over &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;HORIZON&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt; years&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="n"&gt;stale&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;r&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;r&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;rows&lt;/span&gt;
             &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;r&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;kind&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;configuration&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt; &lt;span class="ow"&gt;and&lt;/span&gt; &lt;span class="nf"&gt;int&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;r&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;releases_12mo&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="ow"&gt;or&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;stale&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s"&gt;configuration tooling with &amp;lt;=2 releases in 12 months (review these first):&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;r&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;stale&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;  - &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;r&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;name&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;: &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;r&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;releases_12mo&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt; releases, &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nf"&gt;float&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;r&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;annual&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;&lt;span class="si"&gt;:&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;/yr&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;__name__&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;__main__&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;sys&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;argv&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="nf"&gt;len&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;sys&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;argv&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;licences.csv&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;kind&lt;/code&gt; column is doing the real work, and it is the one judgement call in the whole exercise. Detection products are worth the most on the day after a new vulnerability lands, so their value arrives as a stream and a recurring fee matches it. Configuration products apply a setting once and then hold it, so the maintenance curve is flatter. A plugin in the second category shipping two releases a year is the row where recurring pricing is doing the least work for you.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why any of this matters more than a tighter budget
&lt;/h2&gt;

&lt;p&gt;Two findings from Patchstack's &lt;em&gt;State of WordPress Security in 2026&lt;/em&gt; changed how I read a renewal invoice.&lt;/p&gt;

&lt;p&gt;The first: of 1,983 valid vulnerability reports filed against premium or freemium WordPress products in 2025, 76% were rated exploitable in real-world attacks, and premium products carried three times as many Known Exploited Vulnerabilities as free ones. Paying buys you features, support and a vendor with a commercial reason to respond. It does not buy you a product with fewer flaws, and reading it as a quality signal is a mistake.&lt;/p&gt;

&lt;p&gt;The second: 46% of 2025 vulnerabilities had no patch available at disclosure, and the weighted median time to first exploitation was five hours. The report's own line on the first figure is that it shows why site owners cannot rely on plugin updates as a security measure. For roughly half of last year's disclosures, updating within a day was not slow, it was impossible.&lt;/p&gt;

&lt;p&gt;Both of those push the same way. What you can measure, budget and verify is your own configuration and your own inventory. What you cannot control is when the next disclosure lands or whether a fix exists when it does.&lt;/p&gt;

&lt;h2&gt;
  
  
  What this does not tell you
&lt;/h2&gt;

&lt;p&gt;Release cadence is a proxy, not a verdict. A mature product with a small surface can legitimately ship twice a year, and diff volume rewards churn. Read the diffs before cancelling anything.&lt;/p&gt;

&lt;p&gt;It also says nothing about support quality, which for some teams is the entire product, and nothing about whether the plugin is doing its job. This is a purchasing audit, not a security audit.&lt;/p&gt;

&lt;h2&gt;
  
  
  One question
&lt;/h2&gt;

&lt;p&gt;For anyone running more than ten client sites: what do you check before renewing a plugin licence, other than whether it is still installed? I have asked a lot of agencies this and the honest answer is usually nothing.&lt;/p&gt;

&lt;p&gt;I run engineering at Squirrly and spend more time in access logs than I would choose to. The longer argument about which licensing model fits which kind of tool is here: &lt;a href="https://wpghost.com/lifetime/" rel="noopener noreferrer"&gt;https://wpghost.com/lifetime/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>devops</category>
      <category>security</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
