WordPress:Installasi di VPS: Difference between revisions
Appearance
No edit summary |
|||
| Line 1: | Line 1: | ||
Berikut adalah cara singkat menginstall [[WordPress]] di VPS [[Ubuntu]] | Berikut adalah cara singkat menginstall [[WordPress]] di VPS [[Ubuntu]] | ||
==Extension PHP== | ==Extension PHP== | ||
sudo apt install php7.4-mbstring php7.4-xml php7.4-mysql php7.4-common php7.4-gd php7.4-bcmath php7.4-json php7.4-cli php7.4-curl php7.4-zip | sudo apt install php7.4-mbstring php7.4-xml php7.4-mysql php7.4-common php7.4-gd php7.4-bcmath php7.4-json php7.4-cli php7.4-curl php7.4-zip | ||
==Virtual Host Nginx== | ==Virtual Host Nginx== | ||
server { | server { | ||
| Line 46: | Line 46: | ||
==Source== | ==Source== | ||
*[https://www.nginx.com/resources/wiki/start/topics/recipes/wordpress/ nginx.com] | *[https://www.nginx.com/resources/wiki/start/topics/recipes/wordpress/ nginx.com] | ||
[[Category:WordPress]] | [[Category:WordPress]] | ||
Revision as of 16:33, 22 July 2022
Berikut adalah cara singkat menginstall WordPress di VPS Ubuntu
Extension PHP
sudo apt install php7.4-mbstring php7.4-xml php7.4-mysql php7.4-common php7.4-gd php7.4-bcmath php7.4-json php7.4-cli php7.4-curl php7.4-zip
Virtual Host Nginx
server {
## Your website name goes here.
server_name domain.tld;
## Your only path reference.
root /var/www/wordpress;
## This should be in your http block and if it is, it's not needed here.
index index.php;
location = /favicon.ico {
log_not_found off;
access_log off;
}
location = /robots.txt {
allow all;
log_not_found off;
access_log off;
}
location / {
# This is cool because no php is touched for static content.
# include the "?$args" part so non-default permalinks doesn't break when using query string
try_files $uri $uri/ /index.php?$args;
}
location ~ \.php$ {
fastcgi_pass unix:/run/php/php7.4-fpm.sock;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
include snippets/fastcgi-php.conf;
}
location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
expires max;
log_not_found off;
}
}