Skip to main content
Version: Current (3.x)

Getting Started - WordPress

Preparing WordPress​

info
  • We have replaced the Wordpress folder in the front/wordpress folder with the data-viz/wordpress image.
  1. 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​

  1. Run dev_services.sh to start docker container using development environment

  2. Open your browser and go to http://localhost/wp to access the WordPress dashboard.

  3. Login with the username and password you created in the WordPress installation.

  4. You will be redirected to the WordPress dashboard.

  5. Follow the Wordpress Configuration guide to configure WordPress.