Was made for Linux
# git clone https://github.com/rainjeck/wpdocker.git .
-
Change DB prefix in
docker-compose.yml
-
# docker-compose up -d
-
Set file permissions:
# sudo chown -R <user>:www-data public && sudo chmod -R 777 public
public
- Wordpress files folder from docker-compose.yml -
Add in
wp-config.php
define( 'FS_METHOD', 'direct' ); define( 'DISALLOW_FILE_EDIT', true );
-
Hide WP -
wp-content
toassets
folder. Add lines before install. Renamewp-content
toassets
.# mv public/wp-content public/assets
define( 'WP_CONTENT_DIR', dirname(__FILE__) . '/assets' ); define( 'WP_CONTENT_URL', 'http://' . $_SERVER['HTTP_HOST'] . '/assets' ); define( 'WP_PLUGIN_DIR', dirname(__FILE__) . '/assets/plugins' ); define( 'WP_PLUGIN_URL', 'http://' . $_SERVER['HTTP_HOST'] . '/assets/plugins' ); define( 'UPLOADS', 'assets/uploads' );
-
Start Wordpress installation
Site:
localhost:5000
Adminer:
localhost:8080
-
Create link to theme folder # ln -r -s public/assets/themes/<theme> <link_name>
# docker-compose ps
<container_id> - wordpress container
# docker exec -it <container_id> bash
# apt-get update
# apt-get install jpegoptim pngquant optipng
thumbnail 100
medium 1024
medium_large 1440
large 2048
thumblarge 500x500 crop (from theme template)