1. Buka putty lalu login dengan user root.
2. Install wordpress : cd /home/namadomain/public_html
3. Kemudian download wordpress : wget https://wordpress.org/latest.tar.gz
4. Jika wget belum terinstall, ketikkan : yum install wget
5. Ekstrak file wordpress : tar -xvf latest.tar.gz
6. Hasil ekstrak berada dalam folder “wordpress”, maka semua file dalam folder tersebut perlu dipindah ke root public_html:
cp -r wordpress/* /home/namadomain/public_html
rm -rf wordpress
7. Setelah itu, memberi permission file dan folder
Set user group semua folder dan file menjadi nginx:
chown userdomain:userdomain -R *
Di sini, user group menggunakan user yang dipakai login FTP. tulisan “userdomain” disesuaikan dengan user saat membuat virtual server.
Ubah permission folder menjadi 755: find . -type d -exec chmod 755 {} \;
Ubah permission file menjadi 644 : find . -type f -exec chmod 644 {} \;
Buka web dengan browser : http://namadomain/
Akan muncul halaman instalasi wordpress, klik next sampai selesai. ( Install WordPress di XAMPP Localhost )
Setting permalink
Di sini karena menggunakan nginx, maka htaccess tidak akan jalan, jadi perlu dikonfigurasi nginx diserver.
1. Buka menu Webmin -> Servers -> Nginx Webserver
2. Klik “Edit Configuration File”
Setting seperti dibawah ini jika websitenya non https
server {
listen 80 default_server;
#listen [::]:80 default_server;
server_name _;
root /usr/share/nginx/html;
# Load configuration files for the default server block.
include /etc/nginx/default.d/*.conf;
location / {
try_files $uri $uri/ /index.php?$args;
}
error_page 404 /404.html;
location = /40x.html {
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
}
}
Setting seperti ini jika websitenya https
server_names_hash_bucket_size 128;
server {
server_name namadomain.com www.namadomain.com;
listen 123.123.123.123;
root /home/namadomain/public_html;
index index.html index.htm index.php;
access_log /var/log/virtualmin/namadomain.com_access_log;
error_log /var/log/virtualmin/namadomain.com_error_log;
fastcgi_param GATEWAY_INTERFACE CGI/1.1;
fastcgi_param SERVER_SOFTWARE nginx;
fastcgi_param QUERY_STRING $query_string;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param CONTENT_LENGTH $content_length;
fastcgi_param SCRIPT_FILENAME /home/namadomain/public_html$fastcgi_script_name;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
fastcgi_param REQUEST_URI $request_uri;
fastcgi_param DOCUMENT_URI $document_uri;
fastcgi_param DOCUMENT_ROOT /home/namadomain/public_html;
fastcgi_param SERVER_PROTOCOL $server_protocol;
fastcgi_param REMOTE_ADDR $remote_addr;
fastcgi_param REMOTE_PORT $remote_port;
fastcgi_param SERVER_ADDR $server_addr;
fastcgi_param SERVER_PORT $server_port;
fastcgi_param SERVER_NAME $server_name;
fastcgi_param HTTPS $https;
location ~ \.php$ {
try_files $uri =404;
fastcgi_pass localhost:8000;
}
location / {
try_files $uri $uri/ /index.php?$args;
}
listen 123.123.123.123:443 default ssl;
ssl_certificate /home/namadomain/ssl.combined;
ssl_certificate_key /home/namadomain/ssl.key;
}
Dari konfigurasi di atas, sebenarnya hanya menambahkan kode dibawah ini:
location / {
try_files $uri $uri/ /index.php?$args;
}
Simpan atau Save and close.
Lalu restart nginx, dengan cara klik button “Apply Nginx Configuration”
Jika menggunakan putty
systemctl restart php-fpm
systemctl restart nginx