Wednesday, March 23, 2016

Install Wordpress on Nginx

Melanjutkan bahasan pada link berikut ini mengenai instalasi wordpress di web server berbasis nginx.
root@raspberrypi:~# cd /var/www/html/
root@raspberrypi:/var/www/html# wget https://wordpress.org/latest.tar.gz
Setelah terdownload, buka web server Anda. Ketika tidak mau langsung ke setup wordpress, pastikan default index nya menggunakan index.php, Cek konfigurasi nginx.conf

root@raspberrypi:/var/www/html# nano /etc/nginx/sites-enabled/default

Tambahkan index.php pada tag indexing
        # Add index.php to the list if you are using PHP
        index index.html index.php index.htm index.nginx-debian.html;
 *) saya tambahkan index.php pada file tersebut
Jangan lupa restart nginx
root@raspberrypi:/var/www/html# /etc/init.d/nginx restart
[ ok ] Restarting nginx (via systemctl): nginx.service.
root@raspberrypi:/var/www/html#
Buka lagi web servernya lalu muncul setup wordpress.
Langkah selanjutnya yakni buat akun mysql, Caranya :
Masuk ke mysql
root@raspberrypi:/var/www/html# mysql -u root -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 37
Server version: 5.5.46-0+deb8u1 (Debian)

Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql>

Lalu ikuti langkah-langkah seperti berikut
mysql> create database wordpress;
Query OK, 1 row affected (0.00 sec)

mysql> GRANT ALL PRIVILEGES ON wordpress.* TO "userku"@"localhost" IDENTIFIED BY "rahasia";
Query OK, 0 rows affected (0.00 sec)
keterangan :
wordpress = nama database
userku = user database
rahasia = passwordnya


Buka browser lagi dan ikuti langkah2nya instalasi Wordpress hingga selesai :)

No comments:

Post a Comment