Launching WordPress
Let's launch WordPress, view the default site, and then make our own theme.
We'll cover the following...
We'll cover the following...
Launch your WordPress environment
Let’s launch it using:
docker-compose up
Click on the Run button to launch Docker Compose.
📌 You will be able to see the output in the “Output” tab or after clicking on the URL in front of “Your app can be found at:”. Click
OK
when you see a prompt similar to the image shown on the right side.
Prompt
After waiting a few seconds you will be able to see a page where you can
📌 If you face any error, refresh the tab as shown below:
version: '3' services: mysql: image: mysql:5 container_name: mysql environment: - MYSQL_DATABASE=wpdb - MYSQL_USER=wpuser - MYSQL_PASSWORD=wpsecret - MYSQL_ROOT_PASSWORD=mysecret volumes: - wpdata:/var/lib/mysql ports: - "3306:3306" networks: - wpnet restart: on-failure wordpress: image: wordpress container_name: wordpress depends_on: - mysql environment: - WORDPRESS_DB_HOST=mysql - WORDPRESS_DB_NAME=wpdb - WORDPRESS_DB_USER=wpuser - WORDPRESS_DB_PASSWORD=wpsecret volumes: - wpfiles:/var/www/html - ./wp-content:/var/www/html/wp-content ports: - "80:80" networks: - wpnet restart: on-failure volumes: wpdata: wpfiles: networks: wpnet:
Launching WordPress
The process usually takes several minutes on the first run since Docker must download the images, initialize the database, and copy application files.
A wp-content
directory will be created in your project directory. It should ...
Add terminal option