- WordPress
- nginx
- MariaDB
- PHP-FPM 7.2
- WP-CLI
- MailCatcher
- Composer
- Memcached
- phpMyAdmin
- phpMemcachedAdmin
- PHPUnit
- Xdebug
wordpress/
contains the WordPress files.config/
contains the config files.logs/
contains the logs.data/
contains the database files.
git clone https://github.com/shahin8r/wp-docker-stack.git <project-name>
cd <project-name>
docker-compose up
- Open http://localhost in your browser.
Default MySQL connection information:
Database: wordpress
Username: wordpress
Password: password
Host: mysql
phpMyAdmin runs on port 8092.
phpMemcachedAdmin runs on port 8093.
MailCatcher runs on port 1080
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
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
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'