Title: migration docker to docker
Last modified: March 6, 2024

---

# migration docker to docker

 *  [escubicat](https://wordpress.org/support/users/escubicat/)
 * (@escubicat)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/migration-docker-to-docker/)
 * Hi all,
 * I’ve done a page with wordpress in a docker in my local computer. Now I want 
   to copy/paste this docker in other computer. In the same directory i have a persistent
   data for wordpress data and database data. but when I start the docker in the
   other computer I have an error “error connection with db” and the instalation
   starts like new.
 * How can I solve this problem of database? Thanks a lot

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [Devinlabs Solutions](https://wordpress.org/support/users/devinlabsolutions/)
 * (@devinlabsolutions)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/migration-docker-to-docker/#post-17480849)
 * Hi [@escubicat](https://wordpress.org/support/users/escubicat/),
 * Try given below steps.
    1. Export the database from your original Docker setup.
    2. Copy the persistent data directory to the new computer.
    3. Import the database into the MySQL/MariaDB server in the new Docker setup.
    4. Update the database connection settings in the wp-config.php file.
    5. Restart the Docker container.
 * This should resolve the database connection error on your new computer.
 * Let me know if you problem still didn’t solved.
 *  Thread Starter [escubicat](https://wordpress.org/support/users/escubicat/)
 * (@escubicat)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/migration-docker-to-docker/#post-17483593)
 * Hi, thanks for yout answer,
 * sorry but I’m a beginner, how can I export the database from my original docker
   setup?
 * Thanks
 *  [Devinlabs Solutions](https://wordpress.org/support/users/devinlabsolutions/)
 * (@devinlabsolutions)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/migration-docker-to-docker/#post-17484921)
 * Hi [@escubicat](https://wordpress.org/support/users/escubicat/),
 * To export the database from your original docker setup. follow given below steps:-
    1. Access the Docker container running your database.
    2. Use database-specific tools like mysqldump or pg_dump to export the database.
    3. Exit the container.
    4. Copy the exported SQL file from the container to your local machine using docker
       cp.
    5. Optionally, stop and remove the Docker container.
 * let me know if you still facing any issue.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘migration docker to docker’ is closed to new replies.

## Tags

 * [database](https://wordpress.org/support/topic-tag/database/)
 * [docker](https://wordpress.org/support/topic-tag/docker/)
 * [migration](https://wordpress.org/support/topic-tag/migration/)

 * In: [Everything else WordPress](https://wordpress.org/support/forum/miscellaneous/)
 * 3 replies
 * 2 participants
 * Last reply from: [Devinlabs Solutions](https://wordpress.org/support/users/devinlabsolutions/)
 * Last activity: [2 years, 3 months ago](https://wordpress.org/support/topic/migration-docker-to-docker/#post-17484921)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
