Getting Started - WordPress
Preparing WordPress​
info
- We have replaced the Wordpress folder in the
front/wordpressfolder with thedata-viz/wordpressimage.
- Add the data viz WordPress image to your docker-compose.yaml file and ensure you have configured MySQL before running Wordpress.
docker-compose.yaml
wordpress:
image: registry.developmentgateway.org/data-viz/wordpress:latest
Volumes Configuration​
- Wordpress needs to be configured to use the following volumes:
wordpress:/var/www/html./custom/wp-customizer:/var/www/html/wp-content/plugins/wp-customizer-blocks- This is where you can add your custom blocks.
docker-compose.yaml
wordpress:
# Existing configuration...
volumes:
- wordpress:/var/www/html
- ./custom/wp-customizer:/var/www/html/wp-content/plugins/wp-customizer-blocks
volumes:
wordpress:
- Wordpress needs to be configured to use the following environment variables:
WORDPRESS_DB_HOST: mysql # This is the name of the MySQL container or the IP address of the MySQL server
WORDPRESS_DB_USER: wordpress # This is the username for the WordPress database
WORDPRESS_DB_PASSWORD: wordpress # This is the password for the WordPress database
WORDPRESS_DB_NAME: wordpress # This is the name of the WordPress database
docker-compose.yaml
wordpress:
environment:
WORDPRESS_DB_HOST: mysql
WORDPRESS_DB_USER: wordpress
WORDPRESS_DB_PASSWORD: wordpress
WORDPRESS_DB_NAME: wordpress
Running the project​
-
Run
dev_services.shto start docker container using development environment -
Open your browser and go to
http://localhost/wpto access the WordPress dashboard. -
Login with the username and password you created in the WordPress installation.
-
You will be redirected to the WordPress dashboard.
-
Follow the Wordpress Configuration guide to configure WordPress.