Skip to content

Instantly share code, notes, and snippets.

@fumikito
Created April 12, 2023 06:31
Show Gist options
  • Save fumikito/bbc62347f4808fd00efe4f97afd6f41d to your computer and use it in GitHub Desktop.
Save fumikito/bbc62347f4808fd00efe4f97afd6f41d to your computer and use it in GitHub Desktop.
Fix wp-env container
#! /usr/bin/env bash
# see https://otti.xyz/2021/05/how-to-fix-wp-env-mysqlcheck-error.html
LINE=$( docker ps | grep tests-wordpress- )
HERE=$(pwd)
LINE=${LINE##* }
LINE=${LINE%%-*}
echo "Restore container: $LINE"
echo $HERE
cd ~/.wp-env/$LINE
docker-compose down -v
docker-compose up -d
cd $HERE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment