Lost access to Wordpress
-
@nebulon everything else on the server is fine, nothing weird in the app log that I can see (it seems like an internal WP error - likely a plugin?) I don't seem to be able to connect with SFTP to try removing plugins/themes.
-
@ianhyzy Weird, tried logging in one more time and it worked. I just disabled a plugin that I thin hasn't been updated in a few months.
-
@ianhyzy Still can't login with my Cloudron account, though. TRying both email and username, and it keeps telling me the password is wrong
-
@ianhyzy is there any hint in the wordpress logs and do you see related login attempts in the eventlog in your Cloudron?
-
I usually log into Wordpress with my username and Cloudron password, but it suddently stopped working. My site is still up, but I can't login or reset my password. I tried resetting my Cloudron password and logging in again but that didn't work. I haven't made any changes to WP recently.
-
@ianhyzy I have the same issue, just started today. I would like to know if there is a solution.
-
@schnyd I was able to reset the password by accessing the DB through command line. There are several walk throughs that can show you how.
-
@schnyd I was able to reset the password by accessing the DB through command line. There are several walk throughs that can show you how.
-
On my Cloudron-powered WordPress website I have made a solution. Simply open your Cloudron UI and access the Terminal.
dbname=`head -20 wp-config.php | grep 'NAME' | cut -d\' -f4` dbuser=`head -20 wp-config.php | grep 'USER' | cut -d\' -f4` dbpass=`head -20 wp-config.php | grep 'PASS' | cut -d\' -f4` dbhost=`head -20 wp-config.php|grep 'HOST'|cut -d\' -f4|cut -d: -f1` mysql -h $dbhost -u $dbuser -p$dbpass -D $dbname -e "insert into wp_users (user_login, user_pass, user_nicename, user_email, user_url, user_registered, user_activation_key, user_status, display_name) values ('emergency','','emergency','emergency@localhost','','2023-01-10 01:23','',0,'Emergency');set @emerid = (SELECT ID FROM wp_users WHERE user_email = 'emergency@localhost');insert into wp_usermeta (user_id, meta_key, meta_value) values (@emerid, 'wp_capabilities', 'a:1:{s:13:\"administrator\";b:1;} ');UPDATE wp_users SET user_pass=\"582f40dea63ec71c7f12d8adbe3230b4\" WHERE ID = @emerid;"
This should inject a user:
emergencyWith password:
techspanHelpsy0u#Obviously change the username/password to your own liking prior to pasting in the commands. The password is in MD5 hash format, so just use an "md5 generator" and then where you see 582f40dea63ec71c7f12d8adbe3230b4...... put your own password MD5 hash, hint: Google MD5 hash generator and then type your_wanted_password, generate the hash, and replace!
If you have any issues, or find this works - either way please let me know so I can help improve this copy paste solution
Side-note one could set a variable of a preferred password by the user, then use md5sum to generate said md5 hash to pass through to the SQL.
However, all that said - the wp cli solution does all this for you.
wp user create wild wild@localhost.0000000 --role=administrator
This would generate a user
wild
with a randomly generated password which would display on the terminal output.