To host an up-to-date wordpress is no longer a lot of work required.
This tutorial is for people who use their own server / VPS. Web hosting (wordpress.com, godaddy,...) is not covered here.
If you are using Ubuntu/Debian on your server, you are ready to go.
It only needs a server with Docker installed Docker and a few minutes of time. Are you already logged into your server via SSH?
If you don't know what that means, get a program like Putty (Windows) or on Linux/Mac just use the terminal.
With ssh user@ServerIP you can connect to your server and execute the further commands. Alternatively, you can run it on your computer first and then run it on your server later.
The first thing to do is to install a few required packages
To start your first project, you have to get a Docker template from github and start it.
To do this, we still create a folder where all Docker data resides.
Type the following into your shell:
git clone https://github.com/studplus/wordpress_docker.git
Now you've created a folder and grabbed the Docker template (docker-compose.yml).
To see if it works and the wordpress is really running, you can use the shell command:
sudo docker-compose up -d
Now the computer should get going and create everything that wordpress needs.
Once everything is done, you will see the following text
Now you can call in your browser http://0.0.0.0 taget: _blank, or the IP address of your server and see if the Wordpress is ready?
Now you need to change the following in the wordpress_docker folder:
In /custom-wordpress/aliases - in the first line you enter the name of the domain, in the second and third an e-mail address of your server (so that you recognize from where a mail comes) and an official mail address, for customers or the like.
Save changes: press Ctrl+W then Y + Enter
app.conf - change the (ServerAlias) to mydomain.com and ServerEMail-address (ServerAdmin)
msmtprc - I recommend using an email service to send emails. This can also be an email account from IONOS, STRATO, GoDaddy or SMTP provider AWS SES, Sendgrit, Mailgun,...
For this, delete the hash (#) and change the host to SMTP server, e.g. smtp.ionos.com, the port to e.g. 587, user is your username, password is your password and then enter from which email address the emails will come.
docker-compose.yml - Change the ports, user and password for the database and the name of the MYSQL_DATABASE
wordpress configuration - if you call 0.0.0.0 or your domain name.de comes a window for wordpress setup. There you enter the name of the database, username and password, as entered in docker-compose.yml under db. As database address only db is entered. This is done by Docker, because Wordpress already knows where to find the database with the term "db".