Difference between revisions of "Wordpress: Install openlitespeed di Ubuntu 20.04"

From OnnoWiki
Jump to navigation Jump to search
Line 19: Line 19:
 
Ambil [[source code]] [[Wordpress]] di
 
Ambil [[source code]] [[Wordpress]] di
  
* http://wordpress.org/download/
+
* https://wordpress.org/
* http://wordpress.org/latest.zip
+
* https://wordpress.org/download/
* http://wordpress.org/latest.tar.gz
+
* https://wordpress.org/latest.zip
 +
* https://wordpress.org/latest.tar.gz
  
 
Atau bagi anda yang ingin menggunakan [[Wordpress]] berbahasa Indonesia dapat mengambil [[source code]]-nya di
 
Atau bagi anda yang ingin menggunakan [[Wordpress]] berbahasa Indonesia dapat mengambil [[source code]]-nya di
* http://id.wordpress.org/
+
* https://id.wordpress.org/
  
 
Download & copy
 
Download & copy
  
 
  wget http://wordpress.org/latest.tar.gz
 
  wget http://wordpress.org/latest.tar.gz
  cp latest.tar.gz /var/www/html/
+
  cp latest.tar.gz /usr/local/lsws/Example/html
  cd /var/www/html
+
  cd /usr/local/lsws/Example/html
 
  tar zxvf latest.tar.gz
 
  tar zxvf latest.tar.gz
  cd /var/www/html/wordpress
+
  cd /usr/local/lsws/Example/html/wordpress
  chmod -Rf 777 /var/www/html/wordpress/wp-content/
+
  chmod -Rf 777 /usr/local/lsws/Example/html/wordpress/wp-content/
  
 
Konfigurasi [[Wordpress]] untuk menggunakan [[database server]] [[MySQL]]
 
Konfigurasi [[Wordpress]] untuk menggunakan [[database server]] [[MySQL]]
  
  cd /var/www/html/wordpress
+
  cd /usr/local/lsws/Example/html/wordpress
 
  cp wp-config-sample.php wp-config.php
 
  cp wp-config-sample.php wp-config.php
 
  vi wp-config.php
 
  vi wp-config.php
Line 54: Line 55:
 
  mysql
 
  mysql
 
  mysql> SET PASSWORD FOR root@localhost=PASSWORD('password');
 
  mysql> SET PASSWORD FOR root@localhost=PASSWORD('password');
 +
mysql> SET PASSWORD FOR root@localhost=PASSWORD('123456');  # untuk percobaan
  
 
Jika password Root [[MySQL]] [[database]] sudah di set maka  
 
Jika password Root [[MySQL]] [[database]] sudah di set maka  
Line 79: Line 81:
 
Restart Web Server
 
Restart Web Server
  
  /etc/init.d/apache2 restart
+
  sudo /usr/local/lsws/bin/lswsctrl restart
  /etc/init.d/mysql restart
+
  sudo /etc/init.d/mysql restart
  
 
Akses [[Web]] Wordpress ke [[IP address]] statik dari [[Web Server]] anda. Sangat tidak di sarankan ungtuk mengakses ke [[localhost]], kecuali jika [[Web]] Wordpress hanya digunakan untuk [[komputer]] anda sendiri tidak untuk orang lain. Cara mengakses-nya adalah,
 
Akses [[Web]] Wordpress ke [[IP address]] statik dari [[Web Server]] anda. Sangat tidak di sarankan ungtuk mengakses ke [[localhost]], kecuali jika [[Web]] Wordpress hanya digunakan untuk [[komputer]] anda sendiri tidak untuk orang lain. Cara mengakses-nya adalah,

Revision as of 05:35, 13 December 2020

Install OpenLiteSpeed


Edit Konfigurasi PHP

sudo vi /etc/php/7.4/apache2/php.ini
upload_max_filesize = 100M
post_max_size = 48M
memory_limit = 512M
max_execution_time = 600
max_input_vars = 3000
max_input_time = 1000


Install Wordpress

Ambil source code Wordpress di

Atau bagi anda yang ingin menggunakan Wordpress berbahasa Indonesia dapat mengambil source code-nya di

Download & copy

wget http://wordpress.org/latest.tar.gz
cp latest.tar.gz /usr/local/lsws/Example/html
cd /usr/local/lsws/Example/html
tar zxvf latest.tar.gz
cd /usr/local/lsws/Example/html/wordpress
chmod -Rf 777 /usr/local/lsws/Example/html/wordpress/wp-content/

Konfigurasi Wordpress untuk menggunakan database server MySQL

cd /usr/local/lsws/Example/html/wordpress
cp wp-config-sample.php wp-config.php
vi wp-config.php
define('DB_NAME', 'wordpress');
define('DB_USER', 'wordpress');
define('DB_PASSWORD', 'wordpress');
define('DB_HOST', 'localhost');

Siapkan database untuk Wordpress, disini akan digunakan database dengan nama wordpress, user database dengan nama wordpress dan password untuk akses database adalah wordpress. Sedang password root MySQL di set sebagai password. Perintah yang digunakan untuk mengkonfigurasi adalah

mysql
mysql> SET PASSWORD FOR root@localhost=PASSWORD('password');
mysql> SET PASSWORD FOR root@localhost=PASSWORD('123456');   # untuk percobaan

Jika password Root MySQL database sudah di set maka kita dapat langsung mengkonfigurasi MySQL menggunakan perintah

# mysql -u root -p
Enter password:
create database wordpress;
grant INSERT,SELECT on root.* to wordpress@localhost;
grant CREATE, INSERT, SELECT, DELETE, UPDATE on wordpress.* to wordpress@localhost identified by 'wordpress';
grant CREATE, INSERT, SELECT, DELETE, UPDATE on wordpress.* to wordpress identified by 'wordpress';
exit

Jika masih belajar dapat menggunakan perintah


# mysql -u root -p123456
CREATE DATABASE wordpress DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;
grant ALL on root.* to wordpress@localhost;
GRANT ALL ON wordpress.* TO 'wordpress'@'localhost' IDENTIFIED BY 'wordpress';
grant ALL on wordpress.* to wordpress identified by 'wordpress';
exit

Restart Web Server

sudo /usr/local/lsws/bin/lswsctrl restart
sudo /etc/init.d/mysql restart

Akses Web Wordpress ke IP address statik dari Web Server anda. Sangat tidak di sarankan ungtuk mengakses ke localhost, kecuali jika Web Wordpress hanya digunakan untuk komputer anda sendiri tidak untuk orang lain. Cara mengakses-nya adalah,

http://ip-address-web-server/wordpress
install.php

Masukan Data berikut

Judul Situs 	
Nama Pengguna 	
Kata sandi, dua kali
E-mail Anda

Klik pada "Install Wordpress"

Kita dapat login

http://ip-address-web-server/wordpress/wp-login.php