Do you use wp-env
/@wordpress/env
? I highly suggest you use it.
Your WordPress inside your docker container can not just magically import the mySQL database for you.
If you have mapped the folder correctly you should be seeing the plugins and themes you have in there but not the data.
You should install WP-CLI locally to export your database from your existing local site.
wp db export
will export your database to a file that is displayed.
WP-CLI is also already installed inside the docker container if you use wp-env. So you can run commands through npm. The command should be something like this:
With npm run wp 'db import local.sql'
I never done this and you should read the docs on it. Especially the weird arguments quirks, that is why the quotes are this way.
I pulled this command from someones package.json on Github. They have npm scripts setup for database import and export for wp-cli. This this is probably a perfect starting point for you.
Related Posts:
- How to fix “VirtualBox Interface has active connections” error in Windows?
- How to fix “VirtualBox Interface has active connections” error in Windows?
- Docker: How to delete all local Docker images
- Docker: How to delete all local Docker images
- How to list containers in Docker
- How to copy files from host to Docker container?
- How to fix “SSL certificate problem: self signed certificate in certificate chain” error?
- Downloading docker image for transfer to non-internet-connected machine
- How do I pass environment variables to Docker containers?
- How do I get into a Docker container’s shell?
- Copy directory to another directory using ADD command
- Copy directory to another directory using ADD command
- Error with pre-create check: “VBoxManage not found. Make sure VirtualBox is installed and VBoxManage is in the path”
- Error with pre-create check: “VBoxManage not found. Make sure VirtualBox is installed and VBoxManage is in the path”
- Error “The input device is not a TTY”
- “OSError: [Errno 8] Exec format error” when trying to run simple flask app in a docker container
- Copy directory to another directory using ADD command
- What is the difference between a Docker image and a container?
- denied: requested access to the resource is denied : docker
- What is the difference between CMD and ENTRYPOINT in a Dockerfile?
- docker : invalid reference format
- What is the difference between the ‘COPY’ and ‘ADD’ commands in a Dockerfile?
- Failed to get D-Bus connection: Operation not permitted
- docker push error “denied: requested access to the resource is denied”
- Where are Docker images stored on the host machine?
- Docker: Having issues installing apt-utils
- How to force Docker for a clean build of an image
- Docker how to change repository name or rename image?
- Issues while installing Docker on Windows 10 home edition
- How to fix docker: Got permission denied issue
- Can’t connect to docker from docker-compose
- Docker: Copying files from Docker container to host
- Docker error: invalid reference format: repository name must be lowercase
- installing cPickle with python 3.5
- Docker: unable to prepare context: unable to evaluate symlinks in Dockerfile path: GetFileAttributesEx
- How does docker compare to openshift?
- Error response from daemon: getsockopt: connection refused
- docker: “build” requires 1 argument. See ‘docker build –help’
- Correct way to detach from a container without stopping it
- build context for docker image very large
- Docker – Name is already in use by container
- Docker: How to clear the logs properly for a Docker container?
- Why am I getting an RTNETLINK Operation Not Permitted when using Pipework with Docker containers?
- How can I expose more than 1 port with Docker?
- Docker – Bind for 0.0.0.0:4000 failed: port is already allocated
- How to get IP address of running docker container
- Running docker container : iptables: No chain/target/match by that name
- How to remove old Docker containers
- kubectl get pods shows ErrImagePull
- Change directory command in Docker?
- Docker container will automatically stop after “docker run -d”
- How to search images from private 1.0 registry in docker?
- Docker compose, running containers in net:host
- Docker compose with wordpress:cli-php7.4 stalls on ‘The site you have requested is not installed’?
- How do i export my database from docker
- WordPress on Docker: how to update website/plugin?
- Using docker with wordpress, how to handle backups correctly?
- Database access using docker
- What is the best way to install a WordPress starter theme into a Docker environment?
- docker on windows 10 with VVV [closed]
- WPTerm ssh connection not working [closed]
- How and where are the provisioning script set up in WordPress?
- WordPress docker page is missing VIRTUAL_HOST variable
- How to remove an image tag in Docker without removing the image itself?
- How can I override CMD when running a docker image?
- How to install tzdata on a ubuntu docker image?
- How can I debug a docker container initialization?
- Is it possible to rerun kubernetes job?
- Multiple commands in Docker CMD directive
- Why isn’t ifconfig available in Ubuntu Docker container?
- Trouble Finding Error Logs in wp-env
- Cannot connect to the Docker daemon at unix:/var/run/docker.sock. Is the docker daemon running?
- How can I use environment variables in Nginx.conf
- docker command not found even though installed with apt-get
- standard_init_linux.go:178: exec user process caused “exec format error”
- “docker build” requires exactly 1 argument(s)
- Docker-compose container using host DNS server
- What is the use of PYTHONUNBUFFERED in docker file?
- How to get the IP address of the docker host from inside a docker container
- Where is the Docker daemon log?
- Docker WordPress can’t update/install plugins
- bitnami/WordPress chart – embed uploads in a custom image
- bitnami/WordPress chart – embed uploads in a custom image
- Can’t install local plugin (zip) with wp-cli [closed]
- Implement ssl to a WP docker container [closed]
- Volume mounts when setting up WordPress with docker [closed]
- Deploy WordPress From Local Docker to Hosting Provider
- wordpress in nginx docker container connected to php:8-fpm container and mariadb container isn’t creating any tables on plugin activation
- ERROR: No such service: nginx when building wordpress with docker [closed]
- WordPress on Apache behind nginx using letsencypt issue with loginizer/limit login attempts
- WordPress Permissions on my Local with Docker
- Should I use docker in wordpress production?
- New wordpress keep redirecting to localhost/wp-admin/install.php
- Duplicator Pro plugin with Docker on local?
- WordPress DevOps – Environments (Rancher, Kubernetes, etc…)
- How to handle security updates within Docker containers?
- Can you run Docker natively on the new Windows 10 (Ubuntu) bash userspace?
- Why do we use a OS Base Image with Docker if containers have no Guest OS?
- How do I auto-start docker containers at system boot?
- Make a Docker application write to stdout