How to Reset Password from MODX Admin Panel
If you have lost access to the MODX manager, you can reset the password directly in the database with phpMyAdmin. The steps differ a little between the two MODX branches:
- MODX Evolution (version 1.x);
- MODX Revolution (versions 2.x and 3.x).
Find the Database Name and Table Prefix
The database name and the table prefix are stored in the site configuration file. For MODX Evolution, the file is located at:
./manager/includes/config.inc.phpFor example:
/var/www/www-root/data/www/example.com/manager/includes/config.inc.phpFor MODX Revolution 2.x and 3.x:
./core/config/config.inc.phpFor example:
/var/www/www-root/data/www/example.com/core/config/config.inc.phpOpen the file in the file manager of your control panel and find these lines:
$dbase = 'frnx_db';
$table_prefix = 'modx_';Here frnx_db is the name of the database, and modx_ is the table prefix.
Then open phpMyAdmin in your control panel, find this database in the list and open it.
MODX Evolution
Find the table with manager users. With the default prefix, it is called modx_manager_users. Find the row with your login and click Edit.
Find the password field:
- in the Value column, delete the current value and enter your new password;
- in the Function column, choose MD5.
Click Go to save the changes.
MODX Revolution (2.x and 3.x)
Find the users table. With the default prefix, it is called modx_users. Find the row with your login and click Edit.
MODX Revolution does not store passwords as plain MD5 by default, so you need to change three fields:
- password: delete the current value, enter your new password and choose MD5 in the Function column;
- hash_class: replace the value with hashing.modMD5;
- salt: clear the field.
Click Go to save the changes and log in to the manager with the new password. After you log in, change the password once more in the MODX manager, so that it is saved with the secure default hashing method again.
If you need a server for your MODX site, take a look at our MODX VPS plans.
Blog