Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue #14 : Add a task to pull a WordPress database #19

Merged
merged 2 commits into from
Oct 3, 2024

Conversation

gido
Copy link
Member

@gido gido commented Sep 2, 2024

πŸ’¬ Description

bundle exec cap test wordpress:database:download_locally

00:00 wordpress:database:download_locally
      01 mkdir -p dump
    βœ” 01 me@localhost 0.004s
      02 /var/www/myproject/shared/wp-cli.phar db export - | gzip > /tmp/wordpress_20240902_132618.sql.gz
    βœ” 02 user@db 2.237s
      Downloading dump/test_wordpress_db_20240902_132618.sql.gz 10.31%
      Downloading dump/test_wordpress_db_20240902_132618.sql.gz 20.13%
      Downloading dump/test_wordpress_db_20240902_132618.sql.gz 30.44%
      Downloading dump/test_wordpress_db_20240902_132618.sql.gz 40.26%
      Downloading dump/test_wordpress_db_20240902_132618.sql.gz 50.08%
      Downloading dump/test_wordpress_db_20240902_132618.sql.gz 60.39%
      Downloading dump/test_wordpress_db_20240902_132618.sql.gz 70.21%
      Downloading dump/test_wordpress_db_20240902_132618.sql.gz 80.02%
      Downloading dump/test_wordpress_db_20240902_132618.sql.gz 90.33%
      Downloading dump/test_wordpress_db_20240902_132618.sql.gz 100.0%
      03 rm /tmp/wordpress_20240902_132618.sql.gz
    βœ” 03 user@db 0.135s

      Database downloaded locally in dump/test_wordpress_db_20240902_132618.sql.gz
      Execute the following command to import the database in the Docker dev environment:

        docker-compose exec dev wp db create
        gunzip -c dump/test_wordpress_db_20240902_132618.sql.gz | docker compose exec -T dev wp db import -

🎟️ Issue(s)

@gido gido merged commit 22dc2cb into master Oct 3, 2024
@gido gido deleted the feature/wordpress-database branch October 3, 2024 10:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants