Renaming the WHMCS Admin Directory

Customizing the name of your WHMCS admin directory makes it harder for bots and other malicious users to find the login URL for your WHMCS Admin Area.

To do this, you must create the custom directory and update WHMCS's configuration to use it successfully.

We recommend performing this task and other security measures immediately after installing WHMCS. For a full list, see More Ways to Secure Your WHMCS Installation.

Renaming Your Admin Directory

To customize your admin directory and update it in WHMCS:

1. Open the configuration.php file in your WHMCS installation's root directory.

2. Update the following line, where example is the custom name that you want to use:

$customadminpath = "example";
Click to copy
  • The admin directory name can only contain alphanumeric characters (a-z and 0-9), hyphens (-), and underscores (_) and it must exist within the WHMCS installation's root directory.
  • Only specify the directory name, not the full directory path.
  • If this line does not already exist in the file, add it to the bottom line, or above the final ?> if one exists.

3. Rename the admin directory to use the name that you specified for the $customadminpath value.

If you see errors after completing this process, see Troubleshooting Admin Directory Errors.

Custom Admin Directories and Upgrades

Applying updates or patches after customizing your admin directory requires an additional step. You must upload any updated files from the default admin directory in the distribution's .zip files to your custom admin directory.

If you do not move the files, you will see an error when you attempt to access the Admin Area. For more information, see Troubleshooting Admin Directory Errors.