Skip to content

Instantly share code, notes, and snippets.

@dimitrystd
Last active August 25, 2017 20:30
Show Gist options
  • Save dimitrystd/42bdf5395a1e3f09a07519baf537c6c2 to your computer and use it in GitHub Desktop.
Save dimitrystd/42bdf5395a1e3f09a07519baf537c6c2 to your computer and use it in GitHub Desktop.
Minimal setup for reproducing the bug when MLP doesn't create tables if was activated by WP CLI

Build image

cd <folder with files>
docker build --rm --tag=mlp-wpcli-bug .

Run as container

docker run -it --rm -p 80:80 -e WP_URL=http://<docker_machine_ip_address> mlp-wpcli-bug
FROM kaihofstetter/wordpress-cli:latest
COPY run.sh /run.sh
RUN chmod +x /run.sh
ENV WP_TITLE WordPress Demo
ENV WP_ADMIN_USER admin
ENV WP_ADMIN_PASSWORD admin
EXPOSE 80
CMD ["/run.sh"]
#!/bin/bash
/config_and_start_mysql.sh
/config_apache.sh
/config_wordpress.sh
export WP_CLI="sudo -E -u www-data wp --path=/var/www/html"
$WP_CLI core multisite-convert
$WP_CLI site create --slug=es --title="Spanish site" [email protected]
$WP_CLI plugin install multilingual-press
$WP_CLI plugin activate multilingual-press --network
echo 'Start apache'
/usr/sbin/apache2ctl -D FOREGROUND
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment