WHMCS guide

Find the domains still renewing at an old price.

Raising a price in Domain Pricing changes new orders only. Every domain already on the books keeps renewing at the amount saved when it was ordered. On our own Brazilian install the last query below found 117 active domains renewing 10 reais under today's price.

DMS.S2 — Before you start

Before you run anything.

Read only

Every query below is a SELECT. It changes nothing. Run it in phpMyAdmin or the mysql client, on a copy of the database if you have one.

Default prices only

The queries read the price list every client sees. If you sell domains at a different price to a client group, check that slab on the Pricing screen by hand.

Tested on our two installs

Queries 1 to 4 return nothing on both of our live installs, and the free transfers on .br are left out on purpose: that registry moves domains at no cost. We also ran each query on a test database with rows that should match and rows that should not.

DMS.S3 — The queries

Five ways to find them.

Registration or renewal at 0.00

A blank field saved as 0.00 instead of -1. Unless it is a real offer, every order or renewal is paid to the registrar out of your pocket.

SELECT t.extension, c.code AS currency, r.msetupfee AS register_1y, n.msetupfee AS renew_1y
FROM tbldomainpricing t
JOIN tblpricing r ON r.type = 'domainregister' AND r.relid = t.id AND r.tsetupfee = 0
JOIN tblcurrencies c ON c.id = r.currency
JOIN tblpricing n ON n.type = 'domainrenew' AND n.relid = t.id AND n.currency = r.currency AND n.tsetupfee = 0
WHERE r.msetupfee >= 0 AND n.msetupfee >= 0
  AND (r.msetupfee = 0 OR n.msetupfee = 0);

Sold, but never renewable

Registration is on and every renewal term is off or missing, so the client cannot renew and the domain lapses.

SELECT t.extension, c.code AS currency, r.msetupfee AS register_1y
FROM tbldomainpricing t
JOIN tblpricing r ON r.type = 'domainregister' AND r.relid = t.id AND r.tsetupfee = 0
JOIN tblcurrencies c ON c.id = r.currency
LEFT JOIN tblpricing n ON n.type = 'domainrenew' AND n.relid = t.id AND n.currency = r.currency AND n.tsetupfee = 0
WHERE r.msetupfee >= 0
  AND (n.id IS NULL OR (n.msetupfee < 0
       AND GREATEST(n.qsetupfee, n.ssetupfee, n.asetupfee, n.bsetupfee, n.monthly,
                    n.quarterly, n.semiannually, n.annually, n.biennially) <= 0));

Renewal under half of the registration

Usually the two columns were swapped, or an old registrar price was left in the renewal column.

SELECT t.extension, c.code AS currency, r.msetupfee AS register_1y, n.msetupfee AS renew_1y
FROM tbldomainpricing t
JOIN tblpricing r ON r.type = 'domainregister' AND r.relid = t.id AND r.tsetupfee = 0
JOIN tblcurrencies c ON c.id = r.currency
JOIN tblpricing n ON n.type = 'domainrenew' AND n.relid = t.id AND n.currency = r.currency AND n.tsetupfee = 0
WHERE r.msetupfee > 0 AND n.msetupfee > 0 AND n.msetupfee < r.msetupfee * 0.5;

Transfers at 0.00

A transfer in carries a paid year at the registrar, so at 0.00 you pay that year for the client. .br and .uk are left out because those registries transfer for free.

SELECT t.extension, c.code AS currency, x.msetupfee AS transfer_1y
FROM tbldomainpricing t
JOIN tblpricing r ON r.type = 'domainregister' AND r.relid = t.id AND r.tsetupfee = 0
JOIN tblcurrencies c ON c.id = r.currency
JOIN tblpricing x ON x.type = 'domaintransfer' AND x.relid = t.id AND x.currency = r.currency
  AND x.tsetupfee = 0
WHERE r.msetupfee >= 0 AND x.msetupfee = 0
  AND t.extension NOT LIKE '%.br' AND t.extension NOT LIKE '%.uk';

Active domains renewing under today's price

Compares what each active domain will be invoiced at renewal with today's renewal price for the same term, in the client's currency. Domains set to Do Not Renew and free domains are left out.

SELECT d.id, d.userid, d.domain, d.registrationperiod AS years,
       d.recurringamount AS renews_at, ELT(d.registrationperiod, p.msetupfee, p.qsetupfee, p.ssetupfee, p.asetupfee, p.bsetupfee) AS price_today
FROM tbldomains d
JOIN tblclients c ON c.id = d.userid
JOIN tbldomainpricing t ON t.extension = SUBSTRING(d.domain, LOCATE('.', d.domain))
JOIN tblpricing p ON p.type = 'domainrenew' AND p.relid = t.id AND p.currency = c.currency
  AND p.tsetupfee = 0
WHERE d.status = 'Active' AND d.donotrenew = 0 AND d.recurringamount > 0
  AND d.registrationperiod BETWEEN 1 AND 5
  AND d.recurringamount < ELT(d.registrationperiod, p.msetupfee, p.qsetupfee, p.ssetupfee, p.asetupfee, p.bsetupfee) - 0.01
ORDER BY d.recurringamount - ELT(d.registrationperiod, p.msetupfee, p.qsetupfee, p.ssetupfee, p.asetupfee, p.bsetupfee);

DMS.S4 — The addon

Or get queries 1 to 4 inside the WHMCS admin.

Brasa Pricing Audit checks every extension and currency in your domain pricing, along with products, promo codes and tax, and e-mails admins when a new finding appears. Query 5 is not in the addon. It never changes a price.

Brasa Pricing Audit screen in the WHMCS admin, with sample data

Brasa Pricing Audit

$39 per year

Finds the price and catalog setups that give away money or block a sale.

  • Billing cycle at 0.00 and no price row in a currency
  • Promo code with no limit that makes an order free
  • Free domain on a term whose first payment does not cover the registration
  • Visible item with every cycle off, automatic setup with no server, 56 checks in all
First run in 16 seconds, on sample data: the summary, then each finding with what to fix. Brasa Pricing Audit on the WHMCS Marketplace
Buy for $39

DMS.S5 — Questions

Getting renewals to the right price.

Why did existing domains keep the old renewal price?

WHMCS saves the recurring amount on each domain when it is ordered. A change in Domain Pricing applies to new registrations and transfers only, as the WHMCS documentation says, so renewals keep the amount saved on the domain.

How do I move existing domains to the new price?

Use Addons > Bulk Pricing Updater, which ships with WHMCS: pick the extensions that share one price, the Active and Pending statuses, one registration period and one currency, then the new price. Run it once per term and currency. It cannot be undone, so run query 5 first and keep the list. Whether to tell clients first, or keep loyal ones at the old price, is your call.

Can WHMCS keep my domain prices in line with the registrar?

Utilities > Registrar TLD Sync imports the registrar's cost and adds a percentage or fixed margin, for registrar modules that support it. It updates the price list, so run query 5 again afterwards for the domains already registered.