Install WordPress on Ubuntu
> apt install nginx
> ufw allow ‘Nginx HTTP’
> apt install mysql-server
> apt install php-fpm php-mysql
> nano /etc/php/7.2/fpm/php.ini
update as `cgi.fix_pathinfo=0`
> systemctl restart php7.2-fpm
> nano /etc/nginx/sites-available/default
server { listen 80 default_server; listen [::]:80 default_server; root /var/www/html; index index.php index.html index.htm index.nginx-debian.html; server_name server_domain_or_IP; location / { try_files $uri $uri/ =404; } location ~ \.php$ { include snippets/fastcgi-php.conf; fastcgi_pass unix:/run/php/php7.2-fpm.sock; # your php’s sock runtime path } location ~ /\.ht { deny all; } }
> systemctl reload nginx