Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save linuxkeepup/3a27cc2c5b7f75f537b35372af642b3b to your computer and use it in GitHub Desktop.
Save linuxkeepup/3a27cc2c5b7f75f537b35372af642b3b to your computer and use it in GitHub Desktop.
Install WordPress with LEMP Stack on Ubuntu Linux
Please send me your query for WordPress with LEMP Stack support service
WhatsApp: http://tiny.cc/linuxkeepup
sudo -i
apt update
apt install nginx
chown -R $USER:$USER /var/www/html
chmod -R 755 /var/www/html
nginx -t
ufw app list
ufw allow 'Nginx HTTP'
ufw status
systemctl start nginx
systemctl enable nginx
systemctl daemon-reload
systemctl restart nginx
systemctl reload nginx
systemctl status nginx
curl -4 icanhazip.com
# REMOVE ALL TEXT AND ADD BELOWS
server {
listen 80;
listen [::]:80;
root /var/www/wordpress;
index index.php index.html index.htm;
server_name example.com www.example.com localhost;
client_max_body_size 100M;
location / {
try_files $uri $uri/ /index.php?$args;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
}
# Save and exit ctrl+s and ctrl+x
nginx -t
systemctl restart nginx
systemctl reload nginx
systemctl mysql restart
# localhost or 0.0.0.0 or ip address
@linuxkeepup
Copy link
Author

Screenshot from 2022-10-29 11-36-37

@linuxkeepup
Copy link
Author

Screenshot from 2022-10-29 11-35-29

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