Skip to content

soifou/wpcli-alpine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 

Repository files navigation

WP-CLI on Alpine Linux

WP-CLI baked from PHP Composer build on top of Alpine Linux.

Available Docker tags

Bash alias

Minimal:

wp() {
    docker run -it --rm \
        -v $(pwd):/mnt \
        soifou/wpcli-alpine:latest ${@:1}
}

Bells and whistles:

wp() {
    tty=
    tty -s && tty=--tty
    docker run \
        $tty \
        --interactive \
        --rm \
        -v $(pwd):/mnt \
        -u `id -u`:`id -g` \
        --net=my-network \
        soifou/wpcli-alpine:latest ${@:1}
}

Create a wordpress project

$ mkdir wp-test && cd wp-test
$ wp core download
$ wp core config --dbhost=db --dbname=wptest --dbuser=root --dbpass=root
$ wp core install \
    --url=http://wp-test \
    --title="Awesome website" \
    --admin_user=admin --admin_password=admin --admin_email admin@admin.com

Database operations

Since the --path point inside the container, your dump must be available inside.

$ cd /path/to/wordpress/project
$ wp db dump /mnt/dump.sql
$ wp db import /mnt/dump.sql

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published