<?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: rahim</title>
    <description>The latest articles on DEV Community by rahim (@nodethemes).</description>
    <link>https://dev.to/nodethemes</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%2F4214720%2Fa773021f-1ef3-47f1-be5a-353114efd458.png</url>
      <title>DEV Community: rahim</title>
      <link>https://dev.to/nodethemes</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/nodethemes"/>
    <language>en</language>
    <item>
      <title>How to sell paperbacks and eBooks in one WooCommerce store</title>
      <dc:creator>rahim</dc:creator>
      <pubDate>Fri, 13 Nov 2026 15:16:22 +0000</pubDate>
      <link>https://dev.to/nodethemes/how-to-sell-paperbacks-and-ebooks-in-one-woocommerce-store-4g0l</link>
      <guid>https://dev.to/nodethemes/how-to-sell-paperbacks-and-ebooks-in-one-woocommerce-store-4g0l</guid>
      <description>&lt;p&gt;&lt;em&gt;Disclosure: I make the BookNex bookstore theme for WordPress. The setup below works with plain WooCommerce; I mention BookNex only where it saves work. Full guide: &lt;a href="https://nodethemes.com/sell-books-online-with-wordpress/" rel="noopener noreferrer"&gt;https://nodethemes.com/sell-books-online-with-wordpress/&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;A bookshop is not a normal shop. One title usually comes as a paperback and an eBook, readers want to try the first pages, and an eBook-only cart should never ask for a shipping address. Here is the setup I use to sell books online with WordPress and WooCommerce.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. One book = one variable product
&lt;/h2&gt;

&lt;p&gt;Do not create two products for the same book. Create one &lt;strong&gt;variable product&lt;/strong&gt; with an attribute called &lt;code&gt;Format&lt;/code&gt; and two variations: &lt;code&gt;Paperback&lt;/code&gt; and &lt;code&gt;eBook&lt;/code&gt;.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;/th&gt;
&lt;th&gt;Paperback&lt;/th&gt;
&lt;th&gt;eBook&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Virtual&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Downloadable&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Stock&lt;/td&gt;
&lt;td&gt;Managed&lt;/td&gt;
&lt;td&gt;Not managed&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Shipping&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;None&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Why it matters: reviews, the product URL and the shop filters are shared. Two products would split all of them.&lt;/p&gt;

&lt;p&gt;Note from the WooCommerce docs: variations without a price are not shown, so set a price on every variation.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Deliver eBooks from the protected folder
&lt;/h2&gt;

&lt;p&gt;Upload the eBook file &lt;strong&gt;from the product edit screen&lt;/strong&gt; (Downloadable files → Choose file). WooCommerce then stores it in its protected &lt;code&gt;woocommerce_uploads&lt;/code&gt; folder. If you upload through the general Media Library instead, the file URL can be public.&lt;/p&gt;

&lt;p&gt;Virtual and downloadable orders are completed automatically once paid, so the buyer gets the download link right away. You can also set a download limit and an expiry in days.&lt;/p&gt;

&lt;p&gt;Docs: &lt;a href="https://woocommerce.com/document/digital-downloadable-product-handling/" rel="noopener noreferrer"&gt;https://woocommerce.com/document/digital-downloadable-product-handling/&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Offer a reading sample
&lt;/h2&gt;

&lt;p&gt;A free sample of the first pages helps readers decide. Cut the first pages into a small PDF with a tool such as &lt;code&gt;qpdf&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;qpdf book.pdf --pages . 1-12 -- sample.pdf
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Publish the sample as a separate file and keep the full eBook protected. (pdftk and Ghostscript do the same job.) BookNex has a "reading sample" button on the product page, but any theme can link a sample file in the description.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Shipping messages that follow the cart
&lt;/h2&gt;

&lt;p&gt;If the cart holds only eBooks, hide shipping notes and the "free shipping" progress bar. Mixed carts should still show them. Also check how your tax settings treat digital products in your country.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Filters readers actually use
&lt;/h2&gt;

&lt;p&gt;Format, author, language, price and series are the filters people expect in a bookshop. Use attributes for them, not tags, so WooCommerce can filter by them.&lt;/p&gt;

&lt;h2&gt;
  
  
  Mistakes to avoid
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Two products for one book (split reviews, double the pages)&lt;/li&gt;
&lt;li&gt;Uploading eBook files to the public Media Library&lt;/li&gt;
&lt;li&gt;Forgetting to set a price on a variation&lt;/li&gt;
&lt;li&gt;Asking for a shipping address on eBook-only orders&lt;/li&gt;
&lt;li&gt;No sample, so readers leave to compare elsewhere&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Launch checklist
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;One variable product per title, with Paperback and eBook variations&lt;/li&gt;
&lt;li&gt;eBook uploaded from the product edit screen&lt;/li&gt;
&lt;li&gt;A test order of an eBook-only cart and a mixed cart&lt;/li&gt;
&lt;li&gt;Download link in the order email works&lt;/li&gt;
&lt;li&gt;Sample file opens on a phone&lt;/li&gt;
&lt;li&gt;Shipping and tax messages checked for both cart types&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Where to read more
&lt;/h2&gt;

&lt;p&gt;The full version, with a FAQ and screenshots, is on our blog: &lt;a href="https://nodethemes.com/sell-books-online-with-wordpress/" rel="noopener noreferrer"&gt;https://nodethemes.com/sell-books-online-with-wordpress/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you want a theme built for this, BookNex is a paid theme (&lt;a href="https://nodethemes.com/product/booknex-bookstore-woocommerce-theme/" rel="noopener noreferrer"&gt;https://nodethemes.com/product/booknex-bookstore-woocommerce-theme/&lt;/a&gt;). The steps above need no theme at all.&lt;/p&gt;

</description>
      <category>wordpress</category>
      <category>woocommerce</category>
      <category>ecommerce</category>
      <category>webdev</category>
    </item>
    <item>
      <title>WooCommerce Card Testing: Why Your CAPTCHA Is Not Enough</title>
      <dc:creator>rahim</dc:creator>
      <pubDate>Wed, 11 Nov 2026 13:36:49 +0000</pubDate>
      <link>https://dev.to/nodethemes/woocommerce-card-testing-why-your-captcha-is-not-enough-3fdb</link>
      <guid>https://dev.to/nodethemes/woocommerce-card-testing-why-your-captcha-is-not-enough-3fdb</guid>
      <description>&lt;p&gt;If your WooCommerce store suddenly shows dozens of failed orders for your cheapest product, with names like "asdf qwer", you are probably being used for card testing: a script checking which stolen card numbers still work. The checkout form is not the only target, and that is why a CAPTCHA plugin alone often does not stop it.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Disclosure: I'm part of the team behind NodeThemes Security AI, a WordPress security plugin with a card-testing feature in its Pro version. Everything else here is plain WooCommerce and Stripe.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  How the attack works
&lt;/h2&gt;

&lt;p&gt;Stripe's &lt;a href="https://docs.stripe.com/disputes/prevention/card-testing" rel="noopener noreferrer"&gt;card testing guide&lt;/a&gt; describes two methods: small payments, and saving a card without paying. Attackers like the second one because those checks rarely show up on the cardholder's statement. On WooCommerce that means three routes:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Route&lt;/th&gt;
&lt;th&gt;Endpoint&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Classic checkout&lt;/td&gt;
&lt;td&gt;&lt;code&gt;?wc-ajax=checkout&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Block checkout&lt;/td&gt;
&lt;td&gt;&lt;code&gt;POST /wp-json/wc/store/v1/checkout&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Save a card&lt;/td&gt;
&lt;td&gt;My Account › Payment methods › Add payment method&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Scripts don't need your checkout page at all. They call the Store API directly. If your CAPTCHA only hooks into the classic checkout form, the bot never sees it. WooCommerce's developer blog covers this in &lt;a href="https://developer.woocommerce.com/2024/12/18/card-testing-attacks-and-the-store-api/" rel="noopener noreferrer"&gt;Card testing attacks and the Store API&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to tell it's card testing
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;A spike in orders with the status &lt;strong&gt;Failed&lt;/strong&gt;, often with declined-card notes.&lt;/li&gt;
&lt;li&gt;Many tiny orders, or the same cheap product again and again.&lt;/li&gt;
&lt;li&gt;Random names and e-mail addresses, billing addresses that don't match the card country.&lt;/li&gt;
&lt;li&gt;New customer accounts that add several cards and never buy.&lt;/li&gt;
&lt;li&gt;In Stripe: a jump in failed or blocked payments and &lt;code&gt;generic_decline&lt;/code&gt; errors.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The cost is not only the fees. A high decline rate makes card issuers trust your shop less, so real customers' payments start failing too, and successful fraudulent payments turn into disputes later.&lt;/p&gt;

&lt;h2&gt;
  
  
  First hour checklist
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Refund the fraudulent payments that succeeded. A dispute costs more than a refund.&lt;/li&gt;
&lt;li&gt;Hide products with a tiny or zero price, and pay-what-you-want products.&lt;/li&gt;
&lt;li&gt;Turn off guest checkout for a day or two.&lt;/li&gt;
&lt;li&gt;Ask your payment provider to tighten fraud rules (for Stripe, look at Radar rules).&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Turn on Store API rate limiting
&lt;/h2&gt;

&lt;p&gt;WooCommerce ships with rate limiting for the Store API, &lt;strong&gt;off by default&lt;/strong&gt; (&lt;a href="https://developer.woocommerce.com/docs/apis/store-api/rate-limiting/" rel="noopener noreferrer"&gt;docs&lt;/a&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;'woocommerce_store_api_rate_limit_options'&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="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;'enabled'&lt;/span&gt;       &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;  &lt;span class="c1"&gt;// default: false&lt;/span&gt;
        &lt;span class="s1"&gt;'proxy_support'&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="c1"&gt;// true only behind a proxy such as Cloudflare&lt;/span&gt;
        &lt;span class="s1"&gt;'limit'&lt;/span&gt;         &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;25&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;    &lt;span class="c1"&gt;// requests ...&lt;/span&gt;
        &lt;span class="s1"&gt;'seconds'&lt;/span&gt;       &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;    &lt;span class="c1"&gt;// ... per 10 seconds (the defaults)&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;Recent WooCommerce versions also have a stricter limit for the Place order request only, under &lt;strong&gt;WooCommerce › Settings › Advanced › Features&lt;/strong&gt; ("Rate limiting Checkout block and Store API"), which allows at most 3 Place order requests per 60 seconds.&lt;/p&gt;

&lt;p&gt;One trap: behind Cloudflare, without &lt;code&gt;proxy_support&lt;/code&gt;, every customer has Cloudflare's IP and shares one limit.&lt;/p&gt;

&lt;h2&gt;
  
  
  Pause IPs with too many failures
&lt;/h2&gt;

&lt;p&gt;Rate limits slow a script down; they don't stop a patient one. A rule that works well in practice: if one IP has several failed payments, or many orders, within an hour, pause checkout and "Add payment method" for that IP for a few hours. Real customers almost never fail three payments in a row. Shop managers and your own IP should be exempt.&lt;/p&gt;

&lt;p&gt;In Security AI Pro this is a setting: by default 3 failed payments or 10 orders per hour pause that IP for 6 hours. It hooks into the classic checkout validation, the Store API checkout and the add-payment-method form, and writes every pause to the firewall log. If you'd rather build it yourself, those are the three places to hook.&lt;/p&gt;

&lt;h2&gt;
  
  
  What not to rely on
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;IP blocking alone.&lt;/strong&gt; Attackers rotate IPs; this is one layer.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;CAPTCHA alone.&lt;/strong&gt; Only if it also protects the Store API and Add payment method.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Your plugin instead of your payment provider.&lt;/strong&gt; Stripe Radar and similar tools see patterns across many shops. Use both.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Full guide, with the signs of an attack and a first-hour table: &lt;a href="https://nodethemes.com/woocommerce-card-testing/" rel="noopener noreferrer"&gt;WooCommerce card testing attacks: how to spot and stop them&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>woocommerce</category>
      <category>security</category>
      <category>ecommerce</category>
      <category>wordpress</category>
    </item>
    <item>
      <title>Hardening WordPress Without Locking Yourself Out: A Risk-Sorted Checklist</title>
      <dc:creator>rahim</dc:creator>
      <pubDate>Wed, 11 Nov 2026 13:35:50 +0000</pubDate>
      <link>https://dev.to/nodethemes/hardening-wordpress-without-locking-yourself-out-a-risk-sorted-checklist-3ckp</link>
      <guid>https://dev.to/nodethemes/hardening-wordpress-without-locking-yourself-out-a-risk-sorted-checklist-3ckp</guid>
      <description>&lt;p&gt;Most WordPress security advice is a list of switches. The problem is not the list, it is the order: people turn on ten things at once, the login page breaks, and they are locked out of their own site. Here is the checklist I use, sorted by risk, with the commands behind it.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Disclosure: I'm part of the team behind NodeThemes Security AI, a WordPress security plugin. The steps below work with or without it.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The 10 steps, sorted by lock-out risk
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Step&lt;/th&gt;
&lt;th&gt;Stops&lt;/th&gt;
&lt;th&gt;Lock-out risk&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Update core, plugins, themes; delete unused ones&lt;/td&gt;
&lt;td&gt;Known vulnerabilities&lt;/td&gt;
&lt;td&gt;Low&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Off-site backups (and one test restore)&lt;/td&gt;
&lt;td&gt;Losing everything&lt;/td&gt;
&lt;td&gt;None&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Unique passwords + password manager&lt;/td&gt;
&lt;td&gt;Credential stuffing&lt;/td&gt;
&lt;td&gt;None&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Remove unused admin accounts&lt;/td&gt;
&lt;td&gt;Forgotten logins&lt;/td&gt;
&lt;td&gt;Low&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;HTTPS + a supported PHP version&lt;/td&gt;
&lt;td&gt;Old server bugs&lt;/td&gt;
&lt;td&gt;Low&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Firewall, monitor mode first&lt;/td&gt;
&lt;td&gt;SQLi, XSS, scanners&lt;/td&gt;
&lt;td&gt;Low&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Malware + core checksum scans&lt;/td&gt;
&lt;td&gt;Hidden backdoors&lt;/td&gt;
&lt;td&gt;None&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Login limits&lt;/td&gt;
&lt;td&gt;Brute force&lt;/td&gt;
&lt;td&gt;Medium (wrong IP header)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Two-factor login&lt;/td&gt;
&lt;td&gt;Stolen passwords&lt;/td&gt;
&lt;td&gt;Medium (no backup codes)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Server hardening&lt;/td&gt;
&lt;td&gt;Uploaded shells, file editing&lt;/td&gt;
&lt;td&gt;Medium (untested rules)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Do the top half today. Do the bottom half one item at a time.&lt;/p&gt;

&lt;h2&gt;
  
  
  The three that lock people out
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Login limits behind a proxy.&lt;/strong&gt; If your site sits behind Cloudflare or a load balancer and the plugin reads &lt;code&gt;REMOTE_ADDR&lt;/code&gt;, every visitor has the proxy's IP. Ten failed logins from anyone, and everyone is locked out. Read the IP from the header your proxy sets (&lt;code&gt;CF-Connecting-IP&lt;/code&gt; for Cloudflare), and only that header, because any visitor can fake the others.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2FA without a way back.&lt;/strong&gt; Save the backup codes before you log out. Keep access to your hosting file manager or SFTP: renaming a plugin folder in &lt;code&gt;wp-content/plugins&lt;/code&gt; always turns that plugin off.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Hardening rules you never tested.&lt;/strong&gt; Two classics from the &lt;a href="https://developer.wordpress.org/advanced-administration/security/hardening/" rel="noopener noreferrer"&gt;WordPress hardening handbook&lt;/a&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="c1"&gt;// wp-config.php – no theme/plugin editor in the dashboard&lt;/span&gt;
&lt;span class="nf"&gt;define&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt; &lt;span class="s1"&gt;'DISALLOW_FILE_EDIT'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt; &lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight apache"&gt;&lt;code&gt;&lt;span class="c1"&gt;# wp-content/uploads/.htaccess (Apache 2.4) – uploaded PHP files cannot run
&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="s2"&gt;"\.(?:php|phtml|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;Both are safe on most sites. But on some hosts &lt;code&gt;.htaccess&lt;/code&gt; directives cause a 500 error. So after every rule: load the home page, the login page and (for a shop) the checkout. If one fails, remove the rule before you add the next.&lt;/p&gt;

&lt;h2&gt;
  
  
  Be honest about what a plugin firewall does
&lt;/h2&gt;

&lt;p&gt;A firewall inside WordPress blocks SQL injection, XSS and scanner traffic before your theme and other plugins handle the request. That is useful. It does not stop a large flood of traffic, because the request already reached your server. For that you need your host's firewall or a CDN. A plugin firewall that runs through &lt;code&gt;auto_prepend_file&lt;/code&gt; starts earlier and costs less CPU, but it still runs on your server.&lt;/p&gt;

&lt;p&gt;Scanners have limits too. Pattern-based malware scans find known backdoors and obvious obfuscation; brand-new malware can slip through. Comparing core files with the official checksums from WordPress.org catches changed files regardless of what is inside them.&lt;/p&gt;

&lt;h2&gt;
  
  
  How we built this into a plugin
&lt;/h2&gt;

&lt;p&gt;We built NodeThemes Security AI around the "never lock yourself out" idea:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Administrators are never blocked by the firewall rules.&lt;/li&gt;
&lt;li&gt;Every hardening switch requests your home page and login page right after it is turned on, and turns itself off again if one of them fails.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;define( 'NTSA_SAFE_MODE', true );&lt;/code&gt; in &lt;code&gt;wp-config.php&lt;/code&gt; pauses everything; &lt;code&gt;NTSA_DISABLE_2FA&lt;/code&gt; turns off two-factor login if you lose your phone.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The free version (GPL, &lt;a href="https://github.com/nodethemes/nodethemes-security-ai" rel="noopener noreferrer"&gt;code on GitHub&lt;/a&gt;) has the firewall, login limits, 2FA for one account, a core file check and a weekly malware scan. Pro adds the early firewall, 2FA for every user, scheduled scans, alerts and all 11 hardening switches.&lt;/p&gt;

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

&lt;p&gt;Update, back up, use unique passwords. Then add login limits, 2FA and hardening one at a time, test after each change, and always keep a way back in.&lt;/p&gt;

&lt;p&gt;The full checklist, with every step explained, is here: &lt;a href="https://nodethemes.com/secure-wordpress/" rel="noopener noreferrer"&gt;How to secure WordPress without locking yourself out&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>wordpress</category>
      <category>security</category>
      <category>webdev</category>
      <category>php</category>
    </item>
    <item>
      <title>Why "defer" breaks WordPress sites (and how to test it before your visitors notice)</title>
      <dc:creator>rahim</dc:creator>
      <pubDate>Tue, 10 Nov 2026 14:41:05 +0000</pubDate>
      <link>https://dev.to/nodethemes/why-defer-breaks-wordpress-sites-and-how-to-test-it-before-your-visitors-notice-3d9b</link>
      <guid>https://dev.to/nodethemes/why-defer-breaks-wordpress-sites-and-how-to-test-it-before-your-visitors-notice-3d9b</guid>
      <description>&lt;p&gt;Adding &lt;code&gt;defer&lt;/code&gt; to your scripts is one of the cheapest speed wins on a WordPress site. It is also the setting most likely to break a menu, a slider or a checkout field. This post explains why, with a small example, and shows a safe way to roll it out.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Disclosure: I'm part of the team behind NodeThemes Cache AI, a free WordPress cache plugin that tests changes like this one. The technique below works with or without it.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What &lt;code&gt;defer&lt;/code&gt; actually changes
&lt;/h2&gt;

&lt;p&gt;A classic &lt;code&gt;&amp;lt;script src&amp;gt;&lt;/code&gt; in the &lt;code&gt;&amp;lt;head&amp;gt;&lt;/code&gt; blocks parsing: the browser downloads and runs it before it builds the rest of the page. With &lt;code&gt;defer&lt;/code&gt;, the browser keeps parsing and runs the script later. According to &lt;a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/script" rel="noopener noreferrer"&gt;MDN&lt;/a&gt;, deferred scripts:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;run after the document has been parsed, before &lt;code&gt;DOMContentLoaded&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;run in the order they appear&lt;/li&gt;
&lt;li&gt;only apply to external scripts (&lt;code&gt;defer&lt;/code&gt; on an inline script does nothing)&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Attribute&lt;/th&gt;
&lt;th&gt;Blocks parsing?&lt;/th&gt;
&lt;th&gt;When it runs&lt;/th&gt;
&lt;th&gt;Order kept?&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;none&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;Immediately&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;defer&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;After parsing&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;async&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;As soon as it downloads&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  The WordPress-specific problem: inline scripts
&lt;/h2&gt;

&lt;p&gt;WordPress themes and plugins love to print a small inline script right after a file. &lt;code&gt;wp_add_inline_script()&lt;/code&gt; does exactly that, and many themes echo their own:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;script&lt;/span&gt; &lt;span class="na"&gt;src&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"/wp-includes/js/jquery/jquery.min.js"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/script&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;script&amp;gt;&lt;/span&gt;
  &lt;span class="nf"&gt;jQuery&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;function&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="nv"&gt;$(&lt;/span&gt;&lt;span class="s1"&gt;'.hero-slider'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;slick&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;span class="nt"&gt;&amp;lt;/script&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now defer the file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;script&lt;/span&gt; &lt;span class="na"&gt;src&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"/wp-includes/js/jquery/jquery.min.js"&lt;/span&gt; &lt;span class="na"&gt;defer&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/script&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;script&amp;gt;&lt;/span&gt;
  &lt;span class="nf"&gt;jQuery&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;function&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="nv"&gt;$(&lt;/span&gt;&lt;span class="s1"&gt;'.hero-slider'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;slick&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;span class="c1"&gt;// runs NOW&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/script&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The inline block is not deferred, so it runs while jQuery hasn't loaded yet:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Uncaught ReferenceError: jQuery is not defined
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The slider stays empty, and unless someone opens the console, nobody knows why. The same thing happens with &lt;code&gt;… is not a function&lt;/code&gt; when a plugin's script is deferred and another script calls it early.&lt;/p&gt;

&lt;h2&gt;
  
  
  A safe rollout, step by step
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Defer everything except jQuery.&lt;/strong&gt; Keep &lt;code&gt;jquery.min.js&lt;/code&gt; and &lt;code&gt;jquery-migrate&lt;/code&gt; loading normally; they are the most common dependency of inline code.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Test the pages that matter:&lt;/strong&gt; home, a post, a page, the shop and a product. Open menus, tabs and sliders, not just the first screen.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Read the console.&lt;/strong&gt; The error names the file and line. Add that file to a "do not defer" list.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Repeat until there are no new errors&lt;/strong&gt;, then ship.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Retest after theme and plugin updates.&lt;/strong&gt; An update can add new inline code.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;A quick way to spot new errors is to compare the console before and after the change. Errors that were already there without &lt;code&gt;defer&lt;/code&gt; are not your problem today; new ones are.&lt;/p&gt;

&lt;h2&gt;
  
  
  Automating the comparison
&lt;/h2&gt;

&lt;p&gt;Doing this by hand means a lot of reloading with DevTools open, so we automated it in the free &lt;a href="https://nodethemes.com/free-plugins/" rel="noopener noreferrer"&gt;NodeThemes Cache AI&lt;/a&gt; plugin. It opens each test page in hidden frames in the admin's own browser: twice without the new settings and once with them. Then it compares:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;JavaScript errors (new ones only, so existing errors on the site don't fail the test)&lt;/li&gt;
&lt;li&gt;files and images that fail to load&lt;/li&gt;
&lt;li&gt;the size of the main page parts and the page height&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Settings that fail are not applied, and every change can be rolled back with one click. The Pro add-on goes a step further when a test fails: it splits the deferred scripts in halves and retests until it finds the few files that must not be deferred, and keeps everything else deferred.&lt;/p&gt;

&lt;h2&gt;
  
  
  Does it help Core Web Vitals?
&lt;/h2&gt;

&lt;p&gt;Often, yes, mainly LCP, because the page can render before the scripts run. Measure on mobile, compare like with like, and confirm with real-visitor data over the following days.&lt;/p&gt;

&lt;p&gt;The full guide, with a FAQ and more WordPress specifics, is here: &lt;a href="https://nodethemes.com/defer-javascript-wordpress/" rel="noopener noreferrer"&gt;Defer JavaScript in WordPress without breaking your site&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>wordpress</category>
      <category>javascript</category>
      <category>webperf</category>
      <category>php</category>
    </item>
    <item>
      <title>Why an AI writer should grade its own page before it saves it</title>
      <dc:creator>rahim</dc:creator>
      <pubDate>Wed, 04 Nov 2026 09:58:56 +0000</pubDate>
      <link>https://dev.to/nodethemes/why-an-ai-writer-should-grade-its-own-page-before-it-saves-it-1gdk</link>
      <guid>https://dev.to/nodethemes/why-an-ai-writer-should-grade-its-own-page-before-it-saves-it-1gdk</guid>
      <description>&lt;p&gt;Most "AI article" tools for WordPress work the same way: one prompt, 2,000 words, paste into the editor, done. The text reads fine, but the page usually fails basic SEO checks. The keyword is missing from the opening, paragraphs run long, there are no sources, and nothing on the site links to the new page.&lt;/p&gt;

&lt;p&gt;We build NodeThemes SEO AI, a WordPress SEO plugin, so we already had a list of checks that every page is scored against. When we added an Auto Writer, we set one rule: the writer may not hand a page back until it has run those same checks on its own output and fixed what it can.&lt;/p&gt;

&lt;p&gt;This post explains how that pipeline works and why we split it into small steps. The full guide on what AI can and cannot do for WordPress SEO is linked at the end.&lt;/p&gt;

&lt;h2&gt;
  
  
  One prompt is the wrong unit
&lt;/h2&gt;

&lt;p&gt;A single long prompt has three problems:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It repeats itself after about 1,000 words.&lt;/li&gt;
&lt;li&gt;It cannot be checked halfway, so one bad section ruins the whole run.&lt;/li&gt;
&lt;li&gt;It hits PHP and host time limits on cheap hosting.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So the Auto Writer works in three kinds of steps, and each step is one AI call:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Step&lt;/th&gt;
&lt;th&gt;What it does&lt;/th&gt;
&lt;th&gt;AI calls&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Plan&lt;/td&gt;
&lt;td&gt;Focus keyword, title, SEO title, meta description, direct-answer opening, takeaways, section outline, table, FAQ&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Section&lt;/td&gt;
&lt;td&gt;Writes one H2 section from the outline&lt;/td&gt;
&lt;td&gt;1 per section&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Finish&lt;/td&gt;
&lt;td&gt;Builds the page, adds links, scores it, repairs failures, saves&lt;/td&gt;
&lt;td&gt;0 to 2&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The steps run as a background job, so a slow AI provider does not freeze the editor.&lt;/p&gt;

&lt;h2&gt;
  
  
  Budget the keyword per section
&lt;/h2&gt;

&lt;p&gt;Keyword density is easy to get wrong when sections are written separately. If every section is told "use the keyword", a 1,500-word page ends up near 3%, which looks spammy.&lt;/p&gt;

&lt;p&gt;Instead, each section gets a share of the budget. The total target is about 1.2% of the words, and each section is told how many times it may use the exact keyword. The opening, two headings and one FAQ question use it first, because the checker looks for the keyword in those places.&lt;/p&gt;

&lt;h2&gt;
  
  
  Facts the AI was not given become gaps, not guesses
&lt;/h2&gt;

&lt;p&gt;This is the part we care about most. A language model does not know your prices, your opening hours or how many clients you have. If you ask it to write a page anyway, it will invent plausible numbers.&lt;/p&gt;

&lt;p&gt;The writer is told to use only what it was given: your notes, your business description and, for WooCommerce products, the product's own name, price, attributes and categories. Anything else must be written as a visible placeholder:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Our team has helped [ADD: number of clients] businesses since [ADD: year].
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A page with any &lt;code&gt;[ADD: ...]&lt;/code&gt; left in it is never published automatically.&lt;/p&gt;

&lt;h2&gt;
  
  
  Links: out, in, and checked
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Outbound:&lt;/strong&gt; the AI suggests up to two sources. Before one is added, the plugin sends a HEAD request to the URL. If it does not answer, the link is dropped. Invented URLs are a real problem with AI writing, and this check removes them.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Internal:&lt;/strong&gt; the plugin's own link map picks related pages on your site and inserts links to them.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Inbound:&lt;/strong&gt; a new page that nothing links to is an orphan. The writer plans links from related existing pages to the new one, and adds them only when the new page goes live.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Score, repair, then decide
&lt;/h2&gt;

&lt;p&gt;After the page is assembled, the plugin runs its normal analysis: the same SEO score and AI-search score you see on any post. Then it repairs what failed:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Mechanical fixes first, such as splitting paragraphs that are too long.&lt;/li&gt;
&lt;li&gt;Up to two small AI passes that replace one sentence at a time, aimed only at the checks that still fail.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Then it decides what to do with the result:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;if score &amp;gt;= 98 and ai_score &amp;gt;= 98 and no [ADD: ...] left and user can publish:
    publish   (only if you chose "publish")
else:
    save as draft for review
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The default is always a draft. In our tests, a page on a site with related content reached 100 in both scores. An orphan page on an empty site stopped lower, at 92, because there was nothing to link from. That is the honest result, so the writer reports it instead of hiding it.&lt;/p&gt;

&lt;h2&gt;
  
  
  What we learned
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Small steps beat one big prompt for quality and for reliability.&lt;/li&gt;
&lt;li&gt;A writer that can read its own score fixes most problems before a human sees them.&lt;/li&gt;
&lt;li&gt;The checker matters more than the prompt. The prompt gets you close; the checks get you to 100.&lt;/li&gt;
&lt;li&gt;Never let AI fill in facts. A visible gap is better than a confident wrong number.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Try it
&lt;/h2&gt;

&lt;p&gt;The free version of NodeThemes SEO AI writes 2 complete pages a month, up to 1,200 words each, using your own OpenAI, Claude or Gemini key. The code is GPL-2.0 on GitHub: &lt;a href="https://github.com/nodethemes/nodethemes-seo-ai" rel="noopener noreferrer"&gt;https://github.com/nodethemes/nodethemes-seo-ai&lt;/a&gt;. The free download is at &lt;a href="https://nodethemes.com/free-plugins/" rel="noopener noreferrer"&gt;https://nodethemes.com/free-plugins/&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Disclosure: we are the developers of this plugin.&lt;/p&gt;

&lt;p&gt;For the full guide, including when AI is a bad fit and how to review AI edits safely, read &lt;a href="https://nodethemes.com/what-ai-can-and-cannot-do-for-wordpress-seo/" rel="noopener noreferrer"&gt;What AI can and cannot do for WordPress SEO&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>wordpress</category>
      <category>seo</category>
      <category>ai</category>
      <category>php</category>
    </item>
    <item>
      <title>What a booking system on WordPress really has to handle (lessons from building one)</title>
      <dc:creator>rahim</dc:creator>
      <pubDate>Tue, 03 Nov 2026 20:07:37 +0000</pubDate>
      <link>https://dev.to/nodethemes/what-a-booking-system-on-wordpress-really-has-to-handle-lessons-from-building-one-2ok2</link>
      <guid>https://dev.to/nodethemes/what-a-booking-system-on-wordpress-really-has-to-handle-lessons-from-building-one-2ok2</guid>
      <description>&lt;p&gt;"Let people pick a time" sounds like a one-day feature. We build WordPress themes at NodeThemes, and when we added appointment booking and a class schedule to our theme &lt;strong&gt;Avelyn&lt;/strong&gt; (for coaches, beauty and yoga studios), the calendar was the easy part. Here is what actually took the time, in case you are building or choosing one.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Disclosure: we make Avelyn. The full, non-technical guide for business owners is on our blog: &lt;a href="https://nodethemes.com/online-booking-wordpress-coaches-studios/" rel="noopener noreferrer"&gt;Online booking on WordPress for coaches and studios&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  1. A free time is not just "not booked"
&lt;/h2&gt;

&lt;p&gt;A start time is offered only when all of these are true:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;it lies inside the opening hours of that weekday (with an optional second range for a lunch break),&lt;/li&gt;
&lt;li&gt;the date is not in the closed-dates list,&lt;/li&gt;
&lt;li&gt;it is later than &lt;em&gt;now + minimum notice&lt;/em&gt; and earlier than &lt;em&gt;today + days ahead&lt;/em&gt;,&lt;/li&gt;
&lt;li&gt;the service length &lt;strong&gt;plus the break after it&lt;/strong&gt; fits before the range ends,&lt;/li&gt;
&lt;li&gt;it does not overlap another booking, including that booking's break.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In code that is an interval check, not an equality 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="c1"&gt;// $start / $end in Unix time; $buffer = break after, in seconds.&lt;/span&gt;
&lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="n"&gt;overlaps&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt; &lt;span class="nv"&gt;$start&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;$end&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;$buffer&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;$booked&lt;/span&gt; &lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;foreach&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt; &lt;span class="nv"&gt;$booked&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nv"&gt;$b&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="nv"&gt;$start&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="nv"&gt;$b&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;'end'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nv"&gt;$b&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;'buffer'&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="nv"&gt;$b&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;'start'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="nv"&gt;$end&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nv"&gt;$buffer&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="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  2. Two people, one slot, same second
&lt;/h2&gt;

&lt;p&gt;Two clients can click the last free time at the same moment. Re-checking availability just before saving is not enough. You need a short lock around "check + insert" so the second request sees the first booking. We use an option-based lock with a short expiry, which works on shared hosting without extra database tables.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Time zones
&lt;/h2&gt;

&lt;p&gt;Everything is stored in UTC and shown in the site time zone from &lt;strong&gt;Settings → General → Timezone&lt;/strong&gt;. Choose a &lt;em&gt;city&lt;/em&gt;, not a UTC offset, so summer time is handled. The booking widget shows the time zone label next to the times; coaches with international clients get far fewer "is that my time or yours?" e-mails.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Calendar files and links
&lt;/h2&gt;

&lt;p&gt;Every confirmation e-mail has:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;What&lt;/th&gt;
&lt;th&gt;Why&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;An &lt;code&gt;.ics&lt;/code&gt; file (RFC 5545)&lt;/td&gt;
&lt;td&gt;Opens in Apple Calendar, Outlook and Google Calendar&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;An "Add to Google Calendar" link&lt;/td&gt;
&lt;td&gt;Most clients use Google Calendar on their phone&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;A "Manage booking" link with a secret token&lt;/td&gt;
&lt;td&gt;Cancel online without an account&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The cancel link respects a limit (for example 24 hours before), and the client gets a reminder e-mail a set number of hours before the start.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Classes are a different problem
&lt;/h2&gt;

&lt;p&gt;A class is a fixed weekly time with a capacity, so the questions change:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;How many spots are left right now?&lt;/li&gt;
&lt;li&gt;Has this e-mail address already reserved this exact class time?&lt;/li&gt;
&lt;li&gt;When the class is full, can people join a &lt;strong&gt;waitlist&lt;/strong&gt;?&lt;/li&gt;
&lt;li&gt;When someone cancels, the first person on the waitlist is confirmed automatically and gets an e-mail.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;We also keep a small "My bookings" list in the visitor's browser (localStorage), so people can see which classes they reserved on that device without creating an account.&lt;/p&gt;

&lt;h2&gt;
  
  
  6. The boring parts that matter
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Spam:&lt;/strong&gt; a hidden honeypot field plus a rate limit per visitor on every public endpoint.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;E-mail delivery:&lt;/strong&gt; many hosts do not deliver mail sent by WordPress. The docs tell users to install an SMTP plugin, and the first test booking proves it works.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Privacy:&lt;/strong&gt; bookings are registered with WordPress's personal data exporter and eraser, so a "delete my data" request covers them too.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Payments:&lt;/strong&gt; we deliberately do not charge at booking time. Packages, passes and gift cards are WooCommerce products. It keeps booking simple and lets each business choose its payment provider.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  7. Settings people can actually find
&lt;/h2&gt;

&lt;p&gt;Our first version used the WordPress Site Editor for page design. Business owners wanted one place for everything, so version 1.1 moved to a single settings panel: business details, colors and fonts, header and footer, and the sections, texts and photos of every page, next to the booking rules.&lt;/p&gt;

&lt;h2&gt;
  
  
  Checklist if you are choosing a booking tool
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Breaks between appointments and two ranges per day&lt;/li&gt;
&lt;li&gt;Minimum notice and "days ahead"&lt;/li&gt;
&lt;li&gt;Time zone shown on the booking page&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;.ics&lt;/code&gt; file, Google Calendar link and an online cancel link&lt;/li&gt;
&lt;li&gt;Waitlist for classes&lt;/li&gt;
&lt;li&gt;No double bookings under load&lt;/li&gt;
&lt;li&gt;Works with WordPress's privacy tools&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The long version, written for coaches and studio owners rather than developers, is here: &lt;strong&gt;&lt;a href="https://nodethemes.com/online-booking-wordpress-coaches-studios/" rel="noopener noreferrer"&gt;Online booking on WordPress for coaches and studios&lt;/a&gt;&lt;/strong&gt;.&lt;/p&gt;

</description>
      <category>wordpress</category>
      <category>php</category>
      <category>webdev</category>
      <category>productivity</category>
    </item>
    <item>
      <title>How to see ChatGPT and Perplexity traffic in your WordPress analytics</title>
      <dc:creator>rahim</dc:creator>
      <pubDate>Thu, 29 Oct 2026 08:40:59 +0000</pubDate>
      <link>https://dev.to/nodethemes/how-to-see-chatgpt-and-perplexity-traffic-in-your-wordpress-analytics-5efj</link>
      <guid>https://dev.to/nodethemes/how-to-see-chatgpt-and-perplexity-traffic-in-your-wordpress-analytics-5efj</guid>
      <description>&lt;p&gt;More people now ask ChatGPT, Perplexity, Gemini or Claude instead of typing a query into Google. When the assistant links to a source and the reader clicks, a visitor arrives on your site from an AI assistant. In most analytics setups you will not see that clearly: the visit is filed under "referral", "campaigns" or even "direct".&lt;/p&gt;

&lt;p&gt;This post explains how an AI visit actually reaches your site, why it hides, and how to measure it properly in WordPress.&lt;/p&gt;

&lt;h2&gt;
  
  
  Two signals tell you a visit came from an AI assistant
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;1. The referrer.&lt;/strong&gt; When someone clicks a link, the browser usually sends the origin of the page they came from. With the default policy (&lt;code&gt;strict-origin-when-cross-origin&lt;/code&gt;) that is only the domain, for example &lt;code&gt;https://chatgpt.com/&lt;/code&gt;, which is enough to identify the source.&lt;/p&gt;

&lt;p&gt;The referrer is missing when:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;the link has &lt;code&gt;rel="noreferrer"&lt;/code&gt;,&lt;/li&gt;
&lt;li&gt;the click happens inside a mobile or desktop app,&lt;/li&gt;
&lt;li&gt;privacy tools strip it,&lt;/li&gt;
&lt;li&gt;the visitor copies the link into a new tab.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;2. A UTM tag in the link.&lt;/strong&gt; ChatGPT adds &lt;code&gt;utm_source=chatgpt.com&lt;/code&gt; to many links in its answers. The tag is part of the URL, so it survives even when the referrer is gone.&lt;/p&gt;

&lt;p&gt;A good analytics setup checks both: first the referrer, then the UTM source.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why AI traffic hides
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Where it ends up&lt;/th&gt;
&lt;th&gt;Why&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Referral / websites&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;chatgpt.com&lt;/code&gt; and &lt;code&gt;perplexity.ai&lt;/code&gt; sit in a long list next to blogs and forums, so there is no single AI total.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Campaigns&lt;/td&gt;
&lt;td&gt;Tools that treat every UTM tag as marketing put &lt;code&gt;utm_source=chatgpt.com&lt;/code&gt; next to your newsletters and ads.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Direct&lt;/td&gt;
&lt;td&gt;No referrer and no tag: the source is unknown. A rise in "direct" visits to deep pages nobody types by hand is often a hint.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The fix is a dedicated &lt;strong&gt;AI assistants&lt;/strong&gt; channel that recognises the known AI referrer domains &lt;em&gt;and&lt;/em&gt; their UTM sources.&lt;/p&gt;

&lt;h2&gt;
  
  
  The referrers worth recognising
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;ChatGPT: &lt;code&gt;chatgpt.com&lt;/code&gt;, &lt;code&gt;chat.openai.com&lt;/code&gt;, &lt;code&gt;utm_source=chatgpt.com&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Perplexity: &lt;code&gt;perplexity.ai&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Gemini: &lt;code&gt;gemini.google.com&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Claude: &lt;code&gt;claude.ai&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Microsoft Copilot: &lt;code&gt;copilot.microsoft.com&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Others: &lt;code&gt;chat.deepseek.com&lt;/code&gt;, &lt;code&gt;grok.com&lt;/code&gt;, &lt;code&gt;meta.ai&lt;/code&gt;, &lt;code&gt;chat.mistral.ai&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;One caveat: clicks from AI Overviews inside Google Search usually arrive with a normal Google referrer, so they count as search traffic, not as AI traffic.&lt;/p&gt;

&lt;h2&gt;
  
  
  Visitors are not the same as AI bots
&lt;/h2&gt;

&lt;p&gt;Before an assistant can cite a page, a bot has to read it. Most AI companies run three kinds of agents:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Training crawlers&lt;/strong&gt; such as &lt;code&gt;GPTBot&lt;/code&gt; and &lt;code&gt;ClaudeBot&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;AI search bots&lt;/strong&gt; such as &lt;code&gt;OAI-SearchBot&lt;/code&gt;, &lt;code&gt;Claude-SearchBot&lt;/code&gt; and &lt;code&gt;PerplexityBot&lt;/code&gt;. They build the index assistants search when they answer with live results.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;User-triggered fetchers&lt;/strong&gt; such as &lt;code&gt;ChatGPT-User&lt;/code&gt;, &lt;code&gt;Claude-User&lt;/code&gt; and &lt;code&gt;Perplexity-User&lt;/code&gt;. They open a page because a person asked the assistant something.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Blocking &lt;code&gt;GPTBot&lt;/code&gt; signals that you do not want your content used for training. It does not remove you from ChatGPT search; that depends on &lt;code&gt;OAI-SearchBot&lt;/code&gt;. If you want AI traffic but no training, a robots.txt along these lines does it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;User-agent: OAI-SearchBot
Allow: /

User-agent: PerplexityBot
Allow: /

User-agent: GPTBot
Disallow: /

User-agent: ClaudeBot
Disallow: /

User-agent: Google-Extended
Disallow: /
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Keep bots out of your visitor numbers. If crawler requests are counted as page views, AI looks far bigger than it really is.&lt;/p&gt;

&lt;h2&gt;
  
  
  Measuring it in WordPress
&lt;/h2&gt;

&lt;p&gt;I build &lt;a href="https://github.com/nodethemes/nodethemes-analytics-ai" rel="noopener noreferrer"&gt;NodeThemes Analytics AI&lt;/a&gt;, a free, open-source (GPL) analytics plugin that runs on your own server, so this is the setup I know best:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Install the plugin. AI assistants are recognised by referrer and UTM source out of the box and appear under &lt;strong&gt;Acquisition → AI assistants&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Turn on &lt;strong&gt;Log crawlers &amp;amp; AI agents&lt;/strong&gt; to see which bots read which pages. Bots are logged separately and never counted as visitors.&lt;/li&gt;
&lt;li&gt;Create goals for the actions that matter (contact form, sign-up, order).&lt;/li&gt;
&lt;li&gt;Save a segment "Channel is AI assistants" and compare it with search visitors: pages per visit, conversion rate, revenue per visit.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The same ideas work in any analytics tool: build an AI channel from the domains and UTM sources above, and keep bots out of your visitor statistics.&lt;/p&gt;

&lt;h2&gt;
  
  
  Takeaways
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;AI visits arrive as referrals or as UTM-tagged links; check both signals.&lt;/li&gt;
&lt;li&gt;Treat AI numbers as a minimum, because some app clicks arrive without either.&lt;/li&gt;
&lt;li&gt;Separate training crawlers, AI search bots and user-triggered fetchers before you block anything.&lt;/li&gt;
&lt;li&gt;Judge the channel by conversions, not by volume alone.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The full guide, with a 60-day plan, a reporting template and an FAQ, is on the NodeThemes blog: &lt;a href="https://nodethemes.com/how-to-track-chatgpt-ai-traffic-in-wordpress-2026-guide/" rel="noopener noreferrer"&gt;How to Track ChatGPT &amp;amp; AI Traffic in WordPress&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>wordpress</category>
      <category>analytics</category>
      <category>ai</category>
      <category>seo</category>
    </item>
  </channel>
</rss>
