Wordpress
The world’s most popular tool for building websites & blogs
#CMS
Getting Started
- Create a folder and move to it
mkdir wordpress && cd wordpress
- Create a
docker-compose.yml
file and add the following content:services: wp: image: wordpress:latest ports: - 80:80 volumes: - wp_app:/var/www/html environment: WORDPRESS_DB_HOST: db WORDPRESS_DB_NAME: wordpress WORDPRESS_DB_USER: root WORDPRESS_DB_PASSWORD: password depends_on: - db links: - db db: image: mysql:latest ports: - 3306:3306 command: [ '--character-set-server=utf8mb4', '--collation-server=utf8mb4_unicode_ci' ] volumes: - db_data:/var/lib/mysql environment: MYSQL_DATABASE: wordpress MYSQL_ROOT_PASSWORD: password volumes: wp_app: db_data:
- Start the service using docker compose.
docker compose up -d
- Open the browser and go to the following URLs to access the Wordpress
- Web site: http://localhost
- Wordpress Admin: http://localhost/wp-admin