OpenCart: How to Secure the /admin/ folder

Since OpenCart is open source it can be a target for hackers since they already know the basic file structure and how the core code works. 

One of the easiest methods of securing your OpenCart dashboard is to rename the /admin/ folder. This will hide the folder from scripts and hackers specifically look for the "admin" folder of OpenCart. 

 

Follow the steps below to change the /admin/ folder's name. Don't forget that once you do this, you’ll need to use the new path to access your admin dashboard.

1. Log into "cPanel",

2. Click on "File Manager",

3. Use File Manager to navigate to the folder containing the "admin" folder,

4. Right-click on the "admin" folder and select "rename",

5. Type in your new name for the "admin" folder (you can change it to whatever you want but the more obscure the name the better, such as "ADMIN45823"),

6. Now, open the /admin/config.php with the code editor (Remember, you changed the name of the folder. Replace "admin" with the new folder name),

Important! There are several instances of "admin" throughout the config file. All instances must be changed for this to work.

7. There should be 5 instances referencing the /admin/ folder that would need to be updated to the new name you changed the folder, you can also add another layer of protection to the dashboard by Password Protecting the /admin/ folder. You can do this by following the tutorial on Password Protecting directories.

  • opencart
  • 74 Users Found This Useful
Was this answer helpful?

Related Articles

How to Create a Full cPanel Backup

1. From the home page of your HayHost client area, navigate to the "Your Active...

How to Install WordPress Manually Using cPanel

1. From the home page of your HayHost client area, navigate to the "Your Active...

How to Create a Database in cPanel (MySQL Database)

1. From the home page of your HayHost client area, then click  "SERVICES".   2. In the "My...

How to Create a Subdomain in cPanel

This article will go over creating a Subdomain under your cPanel account. Log into cPanel on...