Rename the 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.
Rename the Admin Directory
When you move the admin
directory, you must also update WHMCS’s configuration to use it successfully.
To do this:
1. Update the configuration.php file.
Open the configuration.php
file in your WHMCS installation’s root directory.
Add the following line to the bottom of the file before the ?>
, where example
is the name of the new admin
directory (not the full directory path):
$customadminpath = "example";
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.
Then, save and close the file.
configuration.php
file, see The configuration.php File.2. Rename the admin directory to use the new name.
Rename the admin
directory to use the name that you specified for the $customadminpath
value above.
Applying Upgrades and Patches
Applying updates or patches after customizing your admin
directory location requires additional step. You must upload any updated files from the default admin
directory in the distribution’s .zip
files to your custom admin directory.
Last modified: October 30, 2024