Last active
October 30, 2022 19:03
-
-
Save linuxkeepup/3a27cc2c5b7f75f537b35372af642b3b to your computer and use it in GitHub Desktop.
Install WordPress with LEMP Stack on Ubuntu Linux
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment