Skip to content

Instantly share code, notes, and snippets.

@matthewpick
Created July 29, 2019 02:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save matthewpick/c7d35a4b48c09db1fae35d2ecf08528c to your computer and use it in GitHub Desktop.
Save matthewpick/c7d35a4b48c09db1fae35d2ecf08528c to your computer and use it in GitHub Desktop.
Docker-Compose Wordpress + MySQL + Large File uploads (htaccess)
# BEGIN WordPress
php_value upload_max_filesize 20280M
php_value post_max_size 20280M
php_value memory_limit 256M
php_value max_execution_time 300
php_value max_input_time 300
# END WordPress
version: '3.3'
services:
db:
image: mysql:5.7
volumes:
- db_data:/var/lib/mysql
restart: always
environment:
MYSQL_ROOT_PASSWORD: somewordpress
MYSQL_DATABASE: wordpress
MYSQL_USER: wordpress
MYSQL_PASSWORD: wordpress
wordpress:
depends_on:
- db
image: wordpress:latest
volumes:
- ./wordpress/:/var/www/html
ports:
- "8000:80"
restart: always
environment:
WORDPRESS_DB_HOST: db:3306
WORDPRESS_DB_USER: wordpress
WORDPRESS_DB_PASSWORD: wordpress
WORDPRESS_DB_NAME: wordpress
volumes:
db_data: {}
@matthewpick
Copy link
Author

If you are using a plugin like All-In-One WP Migration... you will likely need to modify the .htaccess file to allow larger uploads.

@matthewpick
Copy link
Author

This can be helpful to reset a user in the database: https://gist.github.com/yani-/28ebe1670cd28364d871cc7de77c07c7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment