Set Domain Renewal Restrictions
Many TLDs have restrictions on renewal before and after expiration (the grace period). For example, you can typically renew a .com
domain 40 days after the expiry date, while you can renew .uk
domains between 180 days prior to expiration up to 97 days afterwards, depending on the registrar. You can customize your own grace periods for other extensions.
Customize a Domain Renewal Grace Period
To do this, use your preferred method to edit the configuration.php
file for your WHMCS installation.
configuration.php
file, see The configuration.php File.Add lines to set the desired values:
Grace Period Length
To set a grace period length, specify the desired number of days for $DomainRenewalGracePeriod
for that TLD. For example, you could add the following line to set a 40 day grace period for .com
domains:
$DomainRenewalGracePeriods[".com"] = "40";
Domain Renewal Minimum
To set the number of days before expiration during which you can renew a domain, specify the desired number of days for $DomainRenewalMinimums
for that TLD. For example, you could add the following line to set a 180 day period before expiration for .co.uk
domains:
$DomainRenewalMinimums[".co.uk"] = "180";
Setting Multiple Periods
You can also set multiple grace periods and minimum advance renewal restrictions in a single line. For example:
$DomainRenewalGracePeriods = array(".com"=>"30",".net"=>"40",".uk"=>"97");
$DomainRenewalMinimums = array(".com"=>"180",".com.au"=>"90");
Last modified: January 2, 2025