Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Massively's avatar

Lost Admin Password

Hi there,

I have just recently moved my new Laravel app to a fresh VPS, in the process I have somehow completely mislayed my very long and unrememberable admin password to log into management.

I believe the password table is hashed via MySQL, however would changing it using an SQL statement work?

Any help is greatly appreciated.

0 likes
3 replies
Snapey's avatar
Snapey
Best Answer
Level 122

you can do it with tinker

php artisan tinker

$u =App\User::find(1)

$u->password=bcrypt('newpassword')

$u->save()

just insert the correct user id

5 likes
dipankarb's avatar

Another way is

  1. Set mail driver as "log" ( .env file )
  2. click forgot password
  3. get password reset link(mail content) in laravel.log
  4. paste it in browser and reset password.
1 like

Please or to participate in this conversation.