8 months ago
After deploying WordPress on Railway, the platform automatically reinstalls WordPress and deletes all previously uploaded WordPress files (including themes, plugins, and media uploads). I need a way to prevent data loss and retain my custom files across deployments.
4 Replies
8 months ago
Can you share details re: how you’re deploying WordPress to Railway? Is it via one of the Railway Templates, or the WordPress Dockerfile — https://hub.docker.com/_/wordpress — or some other means?
From what you’re describing, it sounds like maybe you aren’t using a Docker Volume — https://docs.docker.com/engine/storage/volumes/ — so all your customizations are being saved within the container, which are essentially ephemeral, and will disappear with the container whenever it’s recreated in the future.
You need to configure the WordPress instance to save any changes that you need to be persistent, somewhere outside the container, e.g. a mounted volume, or the associated database, etc.
8 months ago
As @case mentioned you are probably not storing to a volume ^
8 months ago
Have you seen this wordpress template? It will set everything up for you https://railway.com/deploy/EP4wIt
8 months ago
Hello,
case and sim are correct, nitish - you are not using a volume for data persistence.
I would recommend using the template sim has linked, it will set you up for success.
Best,
Brody