WordPress adalah sebuah platform sistem manajemen konten (CMS) yang digunakan untuk membuat dan mengelola situs web atau blog. WordPress sangat populer karena kemudahan penggunaannya, tersedianya banyak tema dan plugin. Juga fleksibilitas yang memungkinkan pengguna untuk membuat situs web yang sesuai dengan kebutuhan mereka. Termasuk kamu yang menggunakan sistem operasi Linux Ubuntu.
Berikut adalah cara install WordPress menggunakan Ubuntu 20.4
Install apache
Update apt
sudo apt update
sudo apt upgrade
Kemudian install apache
sudo apt install apache2
Install mariaDB
sudo apt install mariadb-server mariadb-client
Cek status mariadb
sudo systemctl status mariadb
Hasilnya
● mariadb.service - MariaDB 10.3.37 database server Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset: e> Active: active (running) since Thu 2023-02-16 21:06:00 UTC; 26min ago Docs: man:mysqld(8) https://mariadb.com/kb/en/library/systemd/ Main PID: 53075 (mysqld) Status: "Taking your SQL requests now..." Tasks: 30 (limit: 560) Memory: 67.1M CGroup: /system.slice/mariadb.service └─53075 /usr/sbin/mysqld
Jalankan sekuriti script
sudo mysql_secure_installation
Set root password n sisanya Y
Set root password? [Y/n] n ... skipping. By default, a MariaDB installation has an anonymous user, allowing anyone to log into MariaDB without having to have a user account created for them. This is intended only for testing, and to make the installation go a bit smoother. You should remove them before moving into a production environment. Remove anonymous users? [Y/n] Y ... Success! Normally, root should only be allowed to connect from 'localhost'. This ensures that someone cannot guess at the root password from the network. Disallow root login remotely? [Y/n] Y ... Success! By default, MariaDB comes with a database named 'test' that anyone can access. This is also intended only for testing, and should be removed before moving into a production environment. Remove test database and access to it? [Y/n] Y - Dropping test database... ... Success! - Removing privileges on test database... ... Success! Reloading the privilege tables will ensure that all changes made so far will take effect immediately. Reload privilege tables now? [Y/n] Y ... Success! Cleaning up... All done! If you've completed all of the above steps, your MariaDB installation should now be secure. Thanks for using MariaDB!
Test login mysql
ubuntu@ip-172-26-5-245:~$ sudo mysql Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 48 Server version: 10.3.37-MariaDB-0ubuntu0.20.04.1 Ubuntu 20.04 Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
Bila sudah berhasil silahkan keluar dengan ketik exit
MariaDB [(none)]> exit Bye
Install PHP
Jalankan perintah berikut
sudo apt install php libapache2-mod-php php-mysql
Setelah selesai test hasilnya dengan perintah
php -v
Hasilnya
PHP 7.4.3-4ubuntu2.17 (cli) (built: Jan 10 2023 15:37:44) ( NTS ) Copyright (c) The PHP Group Zend Engine v3.4.0, Copyright (c) Zend Technologies with Zend OPcache v7.4.3-4ubuntu2.17, Copyright (c), by Zend Technologies
Test php proses di webserver dengan membuat info php
vi /var/www/idwebhosthostingmurah.my.id/info.php
Isi dengan contoh seperti berikut
<?php phpinfo(); ?>
Akses nama domain atau ip /info.php bila tampil info php maka berhasil
Buat user dan password database
Akses mysql dari root
sudo mysql
Buat database dengan perintah
CREATE DATABASE contoh_database;
Buat user database dengan nama contoh_user dan password password1
CREATE USER 'contoh_user'@localhost IDENTIFIED BY 'password1';
Berikan privilege untuk user yang dibuat
GRANT ALL PRIVILEGES ON *.* TO 'contoh_user'@localhost IDENTIFIED BY 'password1';
Flush privileges dan cek hasilnya
MariaDB [(none)]> FLUSH PRIVILEGES; Query OK, 0 rows affected (0.000 sec) MariaDB [(none)]> SHOW GRANTS FOR 'contoh_user'@localhost; +-----------------------------------------------------------------------------------------------------------------------------+ | Grants for contoh_user@localhost | +-----------------------------------------------------------------------------------------------------------------------------+ | GRANT ALL PRIVILEGES ON *.* TO `contoh_user`@`localhost` IDENTIFIED BY PASSWORD '*668425423DB5193AF921380129F465A6425216D0' | +-----------------------------------------------------------------------------------------------------------------------------+ 1 row in set (0.000 sec)
Download dan Install wordpress
Masuk ke folder virtual host sebelumnya
cd /var/www/idwebhosthostingmurah.my.id/
Kemudian download wordpress dengan wget
wget https://wordpress.org/wordpress-6.1.1.zip
Install unzip
sudo apt install unzip
Kemudian unzip file wordpress tadi
unzip wordpress-6.1.1.zip
Pindahkan hasil ekstrak dari folder wordpress ke folder dokumen root domain
Terima kasih telah setia bersama IDwebhost. Jika kamu punya pertanyaan seputar layanan kami, silakan hubungi tim customer service terbaik IDwebhost melalui kanal berikut:
APAKAH SUDAH MENEMUKAN PANDUAN YANG KAMU BUTUHKAN?
IDwebhost selalu memberikan produk dan layanan terbaik. Kamu akan mendapatkan panduan terbaru dan terlengkap untuk mengelola websitemu. Kami di sini 24/7 untuk membantumu.