Skip to content

shahin8r/wp-docker-stack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

wp-docker-stack

Features

  • WordPress
  • nginx
  • MariaDB
  • PHP-FPM 7.2
  • WP-CLI
  • MailCatcher
  • Composer
  • Memcached
  • phpMyAdmin
  • phpMemcachedAdmin
  • PHPUnit
  • Xdebug

Folder Structure

  • wordpress/ contains the WordPress files.
  • config/ contains the config files.
  • logs/ contains the logs.
  • data/ contains the database files.

Requirements

Setup

  1. git clone https://github.com/shahin8r/wp-docker-stack.git <project-name>
  2. cd <project-name>
  3. docker-compose up
  4. Open http://localhost in your browser.

Default MySQL connection information:

Database: wordpress
Username: wordpress
Password: password
Host: mysql

Tools

phpMyAdmin runs on port 8092.

phpMemcachedAdmin runs on port 8093.

MailCatcher runs on port 1080

WP-CLI

Run the wp.sh shell script inside of bin/. Following command will execute as wp plugin install advanced-custom-fields.

./bin/wp.sh plugin install advanced-custom-fields

Bash access

Run the shell.sh shell script inside of bin/.

./bin/shell.sh

By default the shell runs as www-data but you can also run as other users. Following command will run the shell as root.

./bin/shell.sh root

Import DB

Run the wp_db_restore.sh shell script inside of bin/.

./bin/wp_db_restore.sh import.sql

You can also search-replace the site URL in the new database.

./bin/wp_db_restore.sh import.sql '//oldsite.com' '//localhost'

Credits

About

A simple Docker based WordPress environment.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages