Login ke MySQL anda, baik lewat phpMyAdmin ataupun CLI. Bila menggunakan phpMyAdmin perintah dibawah ini di ketik di SQL
di kolom sql phpmyadmin

sebagai gambaran data yang akan digunakan

username : jarangudauser
database : dbjaranguda
password : passwordjaranguda
domain lama : jaranguda.id
domain baru : jaranguda.com
IP MySQL : 192.168.10.10

Menggunakan CLI

mysql -u jarangudauser -ppasswordjaranguda -h 192.168.10.10 dbjaranguda

Setelah login, jalankan perintah dibawah ini untuk merubah WordPress Address (URL) dan Site Address (URL)

SELECT * FROM wp_options WHERE option_name = 'home';
## output
+-----------+-------------+-------------------------------+----------+
| option_id | option_name | option_value                  | autoload |
+-----------+-------------+-------------------------------+----------+
|         2 | home        | http://jaranguda.id | yes      |
+-----------+-------------+-------------------------------+----------+
1 row in set (0.00 sec)

ganti nilai option_value diatas dengan

UPDATE wp_options SET option_value="https://jaranguda.com" WHERE option_name = "home";
## output
Query OK, 1 row affected (0.00 sec)
Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM wp_options WHERE option_name = 'siteurl';
## output
+-----------+-------------+-------------------------------+----------+
| option_id | option_name | option_value                  | autoload |
+-----------+-------------+-------------------------------+----------+
|         1 | siteurl     | http://jaranguda.id | yes      |
+-----------+-------------+-------------------------------+----------+
1 row in set (0.00 sec)

ganti nilai option_value diatas dengan

UPDATE wp_options SET option_value="https://jaranguda.com" WHERE option_name = "siteurl";
## output
Query OK, 1 row affected (0.00 sec)
Rows matched: 1  Changed: 1  Warnings: 0

setelah selesai, sekarang anda bisa mengakses WordPress anda di URL/Domain yang baru.

Leave a comment

Your email address will not be published. Required fields are marked *