HUB
Sign inSign up

mangroveweb/wp-util

By mangroveweb

•Updated about 3 years ago

A Docker container for managing a Docker WordPress install.

Image
0

1.9K

mangroveweb/wp-util repository overview

⁠WP Util

Utilities for managing a Docker-based local WordPress development environment. This is a publically available Docker image hosted on the Docker Hub⁠.

This is part of the Mangrove local development setup. See the documentation for this image in the Mangrove DevDocs⁠.

⁠Download Commands

The download commands assume the remote server is a WPEngine environment. These will work with any SFTP server providing an identical file structure. These require the SFTP Config⁠ text file to be created before the util container is started.

  • download-plugins
    • This will sync your local wp-content/plugins folder with the remote plugins directory. Any local files that are not on the remote host will be deleted.
  • download-uploads
    • This will sync your local wp-content/uploads folder with the remote directory. Any local files that are not on the remote host will be deleted.
  • download-db
    • downloads the database SQL file to wordpress.sql

⁠Other Commands

These work whether or not an SFTP config file is created.

  • wp
  • import-db or multisite-import-db
    • Imports the wordpress.sql file at the root of the local project directory.
    • Make sure to use the appropriate command for a single vs multisite install.
  • wp-init or multisite-init
    • Initializes as a single or mult-site WP install with default values so you can skip the in-browser setup screens.

⁠SFTP-Credentials

Create a plain text file at docker-compose/sftp-config with no file extension. If there is a folder at that path, shut down any running Docker services and delete that folder.

Enter your SFTP credentials in this format:

HOSTNAME=
USERNAME=
PASSWORD=''
PORT=2222

Note: place password in 'single quotes' to avoid issues with special characters.

This is technically a shell script, so you can use shell syntax to enter multiple sets of credentials toggled via variable:

ENV=DEV

if [ $ENV = PROD ]; then
  HOSTNAME=
  USERNAME=
  PASSWORD=''
elif [ $ENV = STAGE ]; then
  HOSTNAME=
  USERNAME=
  PASSWORD=''
elif [ $ENV = DEV ]; then
  HOSTNAME=
  USERNAME=
  PASSWORD=''
fi
PORT=2222
Tag summary
Recent tags
Content type
Image
Digest
Size
45.2 MB
Last updated
about 5 years ago
docker pull mangroveweb/wp-util:latest