Website not working after restarting the containers with available volume

Hello. I am starting to learn docker and the idea behind docker-compose.

What happened was I starting a WordPress website locally using docker-compose and everything works fine. After a some days I reopen the same site using (docker-compose up) but it shows me a white page whenever I try to open the same page.

The only solution to fix this that I have to erase the volume data and redo it again as new. And it did happen with me with another software which is nextcloud.

Please advice me on this issue as the volume data should save and keep the data regardless if I start or stop the container.

Note: I have using Kubuntu 18.04 as host.