The primary purpose of using a Custom Admin URL is due to security reasons - as a preventive measurement for brute-force attacks, hacker attacks, and other threats. The default X-Cart Admin URL can be easily identified and become a target for hackers attempting to corrupt your website. Configuring a Custom Admin URL can limit the potential risk of being hacked.
Before you step further to making any sort of changes, we strongly advise you to ensure you have a backup copy of your website files and database.
To change your Admin URL, you have to edit the X-Cart configuration file (config.php). You can do that using your favorite FTP Client, the "File Manager" tool integrated into your cPanel account, or via SSH. For the purpose of our tutorial, we are going to be using the "File Manager". However, please feel free to choose the most convenient method for you.
First, you have to find the config.php file. It is located under xcart_root_foler/etc folder.
Once you spot it, you have to open it in "Edit" mode so you can apply the required changes.
Now that you have opened the config.php file, you are ready to edit it.
Please locate the "[host_details]" section and more specifically the "admin_self = "admin.php"" line. The "admin.php" string represents the default X-Cart Admin URL.
Please change it to the desired value. Make sure to include the .php suffix and use only lower case letters and, if needed, underscores (_) to replace spaces.
For example, if you input "customurl.php", the Admin URL is going to be "yourdomain.com/customurl.php". We strongly believe you can come up with something more creative and secure than that.
When ready, please make sure to save the file to apply the changes.
Now, you have to rename the "config.php" file to the new value (e.g., "customurl.php").
Make sure to save the new file name before you continue further.
There a few additional you should perform to finalize the process.
First, in X-Cart, there are given files with hardcoded references to the admin.php file. They need to be updated as well. Note that this strictly depending on the set of addons installed on your store. Therefore, your configuration might be missing these files.
Second, you need to update the robots.txt file with the new value.
# Files
Disallow: /customadminurl.php
With this done, the process of configuring your Custom Admin URL is completed. Please bear in mind that the change might require time to propagate successfully.
In case your new Admin URL is not displayed correctly, please redeploy your X-Cart store by going to System tools > Cache management.
Before checking out again, please make sure to clear your browser cache.
That is it - pretty straightforward, right? We hope you have found our tutorial easy to follow, and you have managed to configure your Custom Admin URL successfully. As usual, we would like to thank you for trusting our guidance and encourage you to contact our Support Team in case any further instructions are needed.
Sebahat is a young and bright woman who has become an invaluable part of our team. She started as a Customer Care Representative, mastering that role and, along the way, growing into a tech-savvy individual who is well acquainted with every support layer of the company. Driven by her aim to improve our customers’ experience constantly, she is committed to enhancing the extraordinary support we deliver.