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

kylym1631's avatar

Help needed, migrate:fresh --seed on production

I just ran php artisan migrate:fresh --seed on hosting. Now all my data is gone. Is there a way to go get the data back?🙏🏻

0 likes
4 replies
Yorki's avatar

There are two types of people :

  1. People who do backup
  2. People who will start doing backup

Only way to get your data back is backup. Ask your hosting company about it.

1 like
azimidev's avatar

Sorry 😂 this is bad but funny. if you have run the php artisan migrate:fresh --seed command, it has wiped out all existing data in your database and seeded it with new data.

it's best practice to always make a backup of your database before making any destructive changes, ie running migrate:fresh.

Sinnbeck's avatar

Reach out to your hosting provider as soon as possible. There is a chance that they have backups, but not forever (backups gets deleted after a bit of time)

AddWebContribution's avatar

@kylym1631 you can connect with hosting provider for that, also remember one thing in your project always set up backup file. laravel provide cron functionality you can use that to take a backup everyday

Please or to participate in this conversation.