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.
WHMCS guide
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
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.
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.
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
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);
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));
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;
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';
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
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.

$39 per year
Finds the price and catalog setups that give away money or block a sale.
DMS.S5 — Questions
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.
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.
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.
DMS.S6 — Start a project
Tell us how it was set up. If other hosts would hit it, it may become a check.