Data is lost after redeploy

You’re most likely using sqlite in production rather than postgres (very common mistake). In my observation of the forum, this issue nearly comes up every 3 to 5 days.

Common mistakes:

  • Not injecting the environment variable properly and production runs in development mode (Strapi looks at the development environment variables)
  • Multiple environment files and misunderstanding when to use each file
  • If Docker, not building the docker image with the right environment variables