How to deploy Nginx in CentOS

SSH to VPS ssh root@ip Update yum to install Nginx yum -y update Install Nginx yum install nginx Start Nginx and start Nginx when server launch systemctl start nginx systemctl enable nginx Check Nginx status systemctl status nginx Set firewall for visiting sudo firewall-cmd –permanent –zone=public –add-service=http sudo firewall-cmd –permanent –zone=public –add-service=https sudo firewall-cmd –reload …

Solve “Error Establishing Database Connection” on WordPress

Connect to server console. In my case, I just log in digitalocean and click console from my droplet. Check mysql status: sudo netstat -plt If we can’t see mysql appear in output from previous step, restart mysql manually: sudo systemctl start mysql Problem should be fixed if you are lucky 🙂