Skip to content

Instantly share code, notes, and snippets.

@ArchTaqi
Created July 6, 2022 16:53
Show Gist options
  • Save ArchTaqi/a8192c66ce74596c2b2afacc8f053e0d to your computer and use it in GitHub Desktop.
Save ArchTaqi/a8192c66ce74596c2b2afacc8f053e0d to your computer and use it in GitHub Desktop.
How to Install WordPress with Nginx on Ubuntu 20.04 LTS

How to Install WordPress with Nginx on Ubuntu 20.04 LTS

https://www.linuxcapable.com/install-wordpress-with-nginx-mariadb-php-on-ubuntu-22-04-lts/

sudo apt update && sudo apt upgrade -y
sudo apt install curl git wget unzip -y
sudo add-apt-repository ppa:ondrej/nginx -y
sudo apt update
sudo apt install nginx-core nginx-common nginx nginx-full
nano /etc/nginx/nginx.conf
  brotli on;
  brotli_comp_level 6;
  brotli_static on;
  brotli_types application/atom+xml application/javascript application/json application/rss+xml
  application/vnd.ms-fontobject application/x-font-opentype application/x-font-truetype
  application/x-font-ttf application/x-javascript application/xhtml+xml application/xml
  font/eot font/opentype font/otf font/truetype image/svg+xml image/vnd.microsoft.icon
  image/x-icon image/x-win-bitmap text/css text/javascript text/plain text/xml;

sudo nginx -t
sudo systemctl restart nginx
sudo systemctl enable nginx --now
systemctl status nginx


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment