Would you like to learn how to install WordPress using Docker on Ubuntu Linux? In this tutorial, we are going to show you all the steps required to perform the WordPress installation using Docker on a computer running Ubuntu Linux in 5 minutes or less.
• Ubuntu 20.04
• Ubuntu 18.04
• Ubuntu 19.04
• WordPress 5.5.1
• MariaDB 10.5.5
Tutorial WordPress – Docker Installation
Install the Docker service.
Download the MariaDB docker image from the online repository.
Download the WordPress docker image from the online repository.
List the Docker images installed on your system.
Here is the command output:
Create a docker volume to store the MariaDB persistent data.
Verify the persistent data directory.
Here is the command output:
Optionally, create a symbolic link to an easier access location.
Start a MariaDB container with persistent data storage.
Here is the command output:
In our example, the MariaDB image was used to start a new container.
The new container has persistent data storage.
The container ID is a3d93b7fd16f0c033f224852d7c5d67609e7f308be19cd9237d32a4986d4e378.
The database ROOT account password configured was kamisama123.
A database named WORDPRESS was created.
A database account named WORDPRESS was created and the password kamisama123 was configured.
Create a docker volume to store WordPress persistent data.
Verify the persistent data directory.
Here is the command output:
Optionally, create a symbolic link to an easier access location.
Start a WordPress container with persistent data storage.
Here is the command output:
In our example, the WordPress image was used to start a new container.
The new container has persistent data storage.
The container ID is 6c3fb5af9250cc2c151e95d3a9b3f95f4a1827aaf7ad4708045b3cdb2fa442ba.
The WordPress container was linked to the MariaDB container.
Tutorial Docker – WordPress installation
Open your browser and enter the IP address of your web server.
In our example, the following URL was entered in the Browser:
• http://192.168.100.10
The WordPress web installation interface will be presented.
After finishing the installation, the WordPress dashboard should be presented.
Congratulations! You have finished the WordPress Docker installation.
Tutorial WordPress – Docker container management
Verify the status of all Docker containers using the following command:
Verify the status of a container.
To stop a container, use the following command:
To start a container, use the following command:
To restart a container, use the following command:
In case of error, use the following command to verify the container logs.
In our examples, we demonstrated how to manage WordPress containers.