Where are the WordPress files with Docker? Where are the WordPress files with Docker? wordpress wordpress

Where are the WordPress files with Docker?


Wordpress files are kept inside the container, for example you can find wp-content at:

/var/www/html/wp-content

But, to get "inside" your running container you will have to do something like docker container exec -it <your_container_name> bash. More here: How to get into a docker container?


Containers are considered ephemeral, which means that a good practice is to work in a way that lets you easily stop/remove a container and spin up a new one without losing your stuff. To persist your data you have the option to use volumes.


You might also want to take a look at this, which worked for me: Volume mount when setting up Wordpress with docker. If your case is to develop wordpress on docker containers, then... it's a different case.


If you have not set a binding when running the docker image for the first time you can still do the following.

docker volume ls 

will list all of your volumes used by your local docker.What you can do is the following :

docker volume inspect "VOLUME NAME"e.g. docker volume inspect "181f5c9916a29e9f654317988f49237ea9067157bc94041176ab6ae5f9a57954"

you will find the Mountpoint of each docker volume. There could more than 1, every one of those will have a mount point.