0% found this document useful (0 votes)
18 views1 page

Wordpress On Docker

The document provides a detailed guide on installing WordPress with Docker on Ubuntu 20.04, including setting up a MariaDB database and configuring Nginx as a reverse proxy. It includes commands for pulling Docker images, creating necessary directories, and running Docker containers for WordPress and MariaDB. Additionally, it covers configuring PHP settings and setting up Nginx to serve the WordPress site securely.

Uploaded by

SureshVitus
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views1 page

Wordpress On Docker

The document provides a detailed guide on installing WordPress with Docker on Ubuntu 20.04, including setting up a MariaDB database and configuring Nginx as a reverse proxy. It includes commands for pulling Docker images, creating necessary directories, and running Docker containers for WordPress and MariaDB. Additionally, it covers configuring PHP settings and setting up Nginx to serve the WordPress site securely.

Uploaded by

SureshVitus
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

https://www.atlantic.

net/vps-hosting/install-wordpress-with-docker-on-ubuntu-20-04/

wordpress with ssl


https://www.digitalocean.com/community/tutorials/how-to-install-wordpress-with-
docker-compose

Wordpress SSL
https://wordpress.org/support/article/administration-over-ssl/#using-a-reverse-
proxy

docker pull mariadb

docker pull wordpress:4.7

mkdir ~/wordpress
mkdir -p ~/wordpress/database
mkdir -p ~/wordpress/html

docker run -e MYSQL_ROOT_PASSWORD=r00t123 -e MYSQL_USER=brnuser -e


MYSQL_PASSWORD=brnpasswd -e MYSQL_DATABASE=brndb -v
/root/wordpress/database:/var/lib/mysql --name wordpressdb -d mariadb

docker inspect -f '{{ .NetworkSettings.IPAddress }}' wordpressdb

mysql -u brnuser -h 172.17.0.2 -p

docker run -e WORDPRESS_DB_USER=brnuser -e WORDPRESS_DB_PASSWORD=brnpasswd -e


WORDPRESS_DB_NAME=brndb -p 8081:80 -v /root/wordpress/html:/var/www/html --link
wordpressdb:mysql --name wpcontainer -d wordpress

uploads.ini

file_uploads = On
memory_limit = 500M
upload_max_filesize = 500M
post_max_size = 500M
max_execution_time = 600

docker cp uploads.ini wpcontainer:/usr/local/etc/php/conf.d

On Host:
yum install nginx

nano /etc/nginx/sites-available/wordpress

server {
listen 80;
server_name wp.example.com;
location / {
proxy_pass http://localhost:8081;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}

ln -s /etc/nginx/sites-available/wordpress /etc/nginx/sites-enabled/

You might also like