Video

This guide is available as a video:

Renaming the WHMCS admin directory

YouTube Subscribe

This tutorial is part of our WHMCS tutorials series.

In this tutorial I will show you how to rename your WHMCS admin directory. This is a quick and easy process and a vital step to enhance the security of your WHMCS installation.

By default WHMCS will use the directory of admin so a hacker will know the path to attempt to access your WHMCS admin area.

Let's go ahead and change this so it's unique and not possible for someone to guess.

For the sake of this video we will use cPanel's file manager but the process is the same if you're using an FTP client.

First login to cPanel and access your WHMCS directory using file manager.

Edit the configuration.php file within the WHMCS root and add the custom admin path variable:

$customadminpath = "mycustomfoldername";

This variable needs to be added below the opening PHP tags. Within the two double quotes we need to add the name we'd like to use for the directory.

Save the file and then return to the WHMCS files.

The final step is to re-name the admin directory to the name you set within the double quotes.

From this point the old /admin/ path will no longer work and your new WHMCS admin URL will use your unique name.

Notes

  • If you manually update WHMCS in future you will need to re-name the admin directory to your unique directory name prior to uploading the update. This is handled automatically if you're updating from within the WHMCS admin area.
  • If you receive a permission error when saving the configuration.php file you will need to change the permission to 644 prior to saving the file then back to the previous permission after it's been saved. We have added a link to our video explaining the permission of this file in the description.
  • By default WHMCS does not use the admin directory for cron jobs however some 3rd party modules may do. Check your crons to see if any need to be updated to the new path

Request Support

We hope you found this documentation useful. If you run into any issues we will be happy to assist you.