Renaming Admin Broke Site Help!

I went to config.local.php and changed the line $config[‘admin_index’] = ‘tonewname.php’;

when I go to settings:company and save it I get a 404 error?

Is there a way to actually as well move admin to a protected directory or not needed?'


no need to move it to a protected directory. Just via ftp rename the folder admin.php to your new name and again via ftp rename the line admin.php to the same new name in config.local.php


Or you can use EZ Admin Helper. It has a rename admin object that will rename the file, update config.local.php and then clear the cache. All by simply entering a new name.php and clicking Submit.

The step I think you forgot is to clear the cache. The cached pages will have the old admin url in them.

the only problem it seems is when I try to change the company settings and click on save I get a 404 error which I am thinking a cache problem I guess. Where is the cache get saved in? Can I delete that whole folder using FTP? it seems to me that its looking for the old admin file

var/cache or [your_domain_admin.php]?cc

I deleted the whole var/cache directory in FTP and still

In your OP, you did not state that you changed the name of the admin.php file to the new name. I have assumed you have done so. If not, it is necessary.

yes I changed the admin name in the config.local.php file and renamed it as well. It seems strange that it's the only thing that is broken is trying to change company settings. I even deleted my browser cache and tried both chrome and IE

I am about to try a different cart but I like the features of cs-cart. Could it be possibly the host? I wanted to try this before I bought a license and than go with VPS hosting. With VPS you will basically able to control it like your own server am I correct compared to shared hosting?

Which company settings specifically?

any suggestions? I really dont want to pay a ton a month. I have just started looking.

If you provide us with the temporary FTP access, we can examine the issue and help you to stay with CS-Cart

just to get this clear, did it work with the default installation, and stopped working after you changed the names?

yes it worked until I changed the name

Did you get it sorted ?

Not sure what Settings > Company would have to do with the admin.php file though.

Had the same thing happen to me once.

I renamed the admin.php file as recommended but forgot to edit the config.local.php file …lol

Just a thought. Did you change all the file permissions as spelled out in the installation guide ?

I fixed it and I dont know what I did, lol

All's well that ends well.

For us non-php people it can feel like our cart is 'haunted' at times…lol


I have the exact same problem - running a trail on Xampp and have changed the admin.php file name AND reflected that in the config.local file a number of times now but every time I get a 404 error.

Any ideas please?

Kind regards


3 things need to occur:[list=1]

[]change in config.local.php

]change admin.php to new name

[*]clear the cache


If you have permissions issues on your site, your cache may not clear. More than likely you have an old template cached that is using the old admin name.


Many thanks for responding.

I have followed the instructions a number of times to clear the cache immediately after renaming the admin.php file which is in Htdocs within Xampp - and the config.local file but still all I get is a 404 error for every page - both the admin home page and the test site.

“More than likely you have an old template cached that is using the old admin name.” - how do I clear this please???

Kind regards