Skip to main content

Wordpress

version: '3.3'

services:

  wordpress:
    image: wordpress
    restart: always
    ports:
      - 8282:80  # or whatever:80
    environment:
      WORDPRESS_DB_HOST: db
      WORDPRESS_DB_USER: user
      WORDPRESS_DB_PASSWORD: password
      WORDPRESS_DB_NAME: db
    volumes:
      - /srv/path/to/Wordpress/wp:/var/www/html
    links:
      - db:db

  db:
    image: mysql:5.7
    restart: always
    environment:
      MYSQL_DATABASE: db
      MYSQL_USER: user
      MYSQL_PASSWORD: password
      MYSQL_RANDOM_ROOT_PASSWORD: '1'
    volumes:
      - /srv/path/to/Wordpress/db:/var/lib/mysql

volumes:
  wordpress:
  db:

How to Increase Media File Maximum Upload Size in WordPress

Create or Edit php.ini File

This is a default file used to configure any application which runs on PHP. This file contains parameters required for file timeout, upload size, and resource limits. Access your WordPress root directory using SSH or FTP and look for a php.ini file. In some cases, this file is not visible; the other option would be to create a new file instead.

Open any text editor and create a new file on your desktop. Copy the following code and save it as php.ini.

upload_max_filesize = 64M
post_max_size = 128M
memory_limit = 264M
max_execution_time = 180

edit-php-ini-file.jpg