So, you install a fresh copy of nopCommerce, enjoying all the feature and excited about setting up the store but suddenly you realize that while placing around with different options, you have deleted the administrator account by mistake.
How to recover your administrator account now?
No need to panic, as long as you have the access to your nopCommerce database, you can recover the deleted account.
Simply follow these steps:
1) Login to the database inSQL Server (using tool like SSMS etc)
2) Open the database and run this sql query
UPDATE Customer SET Deleted = 0 WHERE Id = 1
(a) Id is the account id from the “Customer” table of your admin account. Usually id=1 for default admin account. If you create any extra admin account and trying to recover the account, then you will need to check the “Customer” table to get the correct id for the specific account (or record).
(b) All the account records if deleted, never gets permanently deleted from the database. Only the value of column “Delete” change from “False” to “True” if you delete any account. In the sql script, we are simply changing the value back from “True” to “False”.
You can also change the sql script like this (if you remember username):
WHERE Username = 'EnterUsernameHere'