This post applies to when you’ve installed your WordPress site on your local machine using Docker for development. Updating WordPress from with its admin panel does not persist the update if you restart the Docker container. To keep it updated:
- Backup the databases & files
- Stop the docker container
- It is not required to run
docker compose down, you could just stop in Docker Dashboard GUI or rundocker compose stop.
- It is not required to run
- Ensure that the site’s
compose.yaml‘s WordPress service section is set toimage: wordpress:latest. - Navigate to the site’s folder and run
docker compose pull - Start the docker container from the GUI or by running the
docker compose startcommand - Login to your site’s
wp-adminand update WordPress again using the option in the WordPress Dashboard - The site will now remain updated even if you restart your Docker container

Leave a Reply