1. seting DNS (lihat video)
2. Install apache
# sudo apt-get install apache2
3. Install database MySQL
# sudo apt-get install mysql-server
4. Install PHP
# sudo apt-get install php7.4 libapache2-mod-php7.4
Jika terjadi error di tahap ini sesuaikan versi php-nya dengan versi ubuntu-nya. lihat video ini untuk troubleshoot-nya
5. Install WordPress
pindah directory
# cd /var/www/html
hapus file index.html
# rm -rvf index.html
download wordpress source code
# wget http://wordpress.org/latest.zip
unzip source code wordpress
# unzip latest.zip
jika perintah unzip belum tersedia install dulu dengan cara seperti ini
# sudo apt-get install unzip
pindah semua file di folder wordpress
# mv -vf wordpress/* ./
hapus folder wordpress
# rm -rvf wordpress/
Backup wp-config
# cp wp-config-sample.php wp-config.php
oke, sebelum setting file wp-config kita perlu buat dulu databasenya. caranya gampang, ikuti saja ini.
masuk ke mysql
# mysql
buat database
mysql> create database db_name;
kusus untuk ubuntu 20.04 keatas, Anda harus membuat user terlebih dulu. Caranya:
# mysql
mysql> CREATE USER 'user'@'localhost' IDENTIFIED BY 'P@ssW0rd';
mysql> GRANT ALL ON *.* TO 'user'@'localhost';
mysql> FLUSH PRIVILEGES;
kusus untuk ubuntu 18.04, caranya:
# mysql
m
ysql> GRANT ALL PRIVILEGES ON *.* TO ‘username’@’localhost’ IDENTIFIED BY ‘password’;
mysql> create database db_name;
setting wp-config
# nano wp-config.php
6. Install ekstensi-ekstensi tambahan
install mysql extension
# apt-get install php7.4-mysql
enable modul rewrite apache
# sudo a2enmod rewrite
install php-xml extension
# sudo apt-get install php-xml
install curl
# sudo apt-get install php7.0-curl
tambahkan swap
lihat di sini https://pakarbot.com/member/content/p/id/30/
Done.
Penjelasan Step-step tambahan
+ Muncul error missing MySQL extension
Your PHP installation appears to be missing the MySQL extension which is required by WordPress
Jika muncul error seperti di atas artinya module mysql untuk php belum terinstall.
cek dulu apa sudah terinstall atau belum
# dpkg –list | grep php7.0-mysql
jika tidak ada maka install dulu
# apt-get install php7.0-mysql
+ Install plugin gagal (minta akses ke FTP)
/var/www/html# chown -R www-data:www-data ./*
lihat video di sini https://pakarbot.com/vps-mastery-tambahan-2-troubleshoot-gagal-install-plugintheme-di-wordpress/
+ curl belum terinstall
# dpkg –list | grep php7.0-curl
# sudo apt-get install php7.0-curl
+ wordpress permalink error 404
lihat video nya यहां
# chown -R www-data:www-data .htaccess
# chmod -R 666 .htaccess
# sudo a2enmod rewrite
setting apache
# sudo nano /etc/apache2/apache2.conf
kemudian cari baris script yang seperti ini
<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
pastikan allowoverride nya all
+ connect ke jetpack tidak bisa, muncul error
The Jetpack server was unable to communicate with your site [HTTP 500]
# sudo apt-get install php-xml