Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email

Magento Forum

Jr. Member
Total Posts:  2
Joined:  2010-02-06

I was trying to edit some roles for a user to gain admin access inside magento when I accidently excluded myself out of the role and now I don’t even have access into my own control panel can someone please help me?

Magento Community Magento Community
Magento Community
Magento Community
Total Posts:  349
Joined:  2009-02-28


Assuming you just removed yourself from the admin role, try to have a look at the tables admin_users and admin_role using PHPMyAdmin.

On my fresh installation I can see the entry for me (the admin provided during installation) in the table admin_users. Then in the table admin_role I have (amongst others) the following entry:

role_id: 3
parent_id: 1 ==> this seems to relate to the entry 1 in the table admin_role, which is the administrator group
tree_level: 2
sort_order: 0
role_type: U
user_id: 2 ==> this seems to be the user id of the entry in the table admin_users
role_name: xxx ==> this was simply my first name - I don’t know what the purpose of this field is

So try the following:
Make a full backup of your database (or at least of the two tables in question).
Find your user_id in the table admin_users.
Then find the corresponding row in the table admin_role.
Change the value of the parent_id column to in this row to 1 (assuming this is your administrator group, which it should be).

If you are logged in Magento, log out, clear your session and log in again.

Please note that there are no guarantees that this will work - so do not forget to make a backup!!!

Good luck


Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top