It is such a very hard task to get WordPress up and running from scratch, but I set WordPress up three times to experiment with what could be done to get stuff running.
Option one follow the tutorial and set everything up as they should be. I found a comprehensive guide in here. This is the option to have the cleanest and most secure WordPress install possible and you have control over all the passwords and keys. I would say uninstalling one of Nginx and apache if you plan to use the other one in case something bad happens like a server port collision.
The more interesting option involves getting docker installed and pulling the WordPress image. Then, by composing this docker file, you can have WordPress up and running in five minute, it is still relatively safe even though you don’t control the password because the communication between the WordPress server and Mysql all happens in the docker network. This is personally my favorite way. It is still a bit trick to set up docker compose but they have the official guide here.
or just run the following code (as root or other privileged docker user):
apt update;
apt install docker.io wget -y;
wget https://github.com/docker/awesome-compose/raw/18f59bdb09ecf520dd5758fbf90dec314baec545/wordpress-mysql/compose.yaml;
DOCKER_CONFIG=${DOCKER_CONFIG:-$HOME/.docker};
mkdir -p $DOCKER_CONFIG/cli-plugins;
curl -SL https://github.com/docker/compose/releases/download/v2.27.0/docker-compose-linux-x86_64 -o $DOCKER_CONFIG/cli-plugins/docker-compose;
chmod +x $DOCKER_CONFIG/cli-plugins/docker-compose;
docker compose up -d
OR if you like a one-line command:
apt update;apt install docker.io wget -y;wget https://github.com/docker/awesome-compose/raw/18f59bdb09ecf520dd5758fbf90dec314baec545/wordpress-mysql/compose.yaml;DOCKER_CONFIG=${DOCKER_CONFIG:-$HOME/.docker};mkdir -p $DOCKER_CONFIG/cli-plugins;curl -SL https://github.com/docker/compose/releases/download/v2.27.0/docker-compose-linux-x86_64 -o $DOCKER_CONFIG/cli-plugins/docker-compose;chmod +x $DOCKER_CONFIG/cli-plugins/docker-compose;docker compose up -d;
Just execute one of the two above.
There is also a way to “cheat the system” this involves contacting the host provider to install the service for you, great host providers like Vultr do that, and they solve all the hassle for you. There is also the option to use localWP for that matter if you only wish to do local development.
As for hosting, I chose to save a bit of cash for my wallet and went with Cloudflare ZeroTrust. Hosting a local server in my LAN and asking Cloudflare to manage the connection for me.
Alternatively, you can always host your WordPress on a cloud hosting service. This video that I found helpful recommended Contabo and Scalahosting, I personally find Vultr very helpful.
There you have it, three ways of installing WordPress and two ways to host it.
Leave a Reply