Skip to content

rubidot/WPUtil

Repository files navigation

WP Util

Utilities for managing a Docker-based local WordPress development environment.

This is designed to be used with Docker Compose alongside WordPress and database containers.

Initialize WordPress

To initialize a WordPress install for http://localhost with test credentials:

wp-init

http://localhost

Admin
username: test
password: test

Initialize Multisite

If you want a Multisite install, use:

multisite-init

http://multisite.local

Network admin
username: test
password: test

Hosts File

You will need to add entries for multisite.local and each of your subdomains to your hosts file for this to work:

127.0.0.1 multisite.local yoursubdomain.multisite.local anothersubdomain.multisite.local

SFTP Credentials

For SFTP utilities, a sftp-config file must be mounted at root with format:

HOSTNAME=
USERNAME=
PASSWORD='password'
PORT=

For Backups

Set Varibales

CONTAINERNAME=wputil
BACKUPS= # backups volume
WP= # wordpress install volume
NETWORK= # wordpress container network

To specify directories relative to your current working directory, you can use:

`pwd`/rest/of/path

Start Container

docker run -it --rm \
--name $CONTAINERNAME \
-v "$BACKUPS:/backups" \
-v "$WP:/var/www/html" \
--network=$NETWORK \
rubidot/wputil

Detach

CTRL+p CTRL+q

Re-attach

docker attach $CONTAINERNAME

Exit

exit

About

Utility container for WordPress on Docker

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published