[WordPress] Bitnami wordpress change domain name

bitnami安裝wordpress似乎不是那麼困難

不過後續轉網址還是花了一點時間摸索

後台一般設定不管用,根本不給改

mysql的default密碼還是頭一回知道

真的要看說明手冊啊…

機器背景是AWS上一個ec2、用bitnami裝了wordpress一切就緒準備換domain name,俗稱換網址、網址是在godaddy上買的。

Step1: 到godaddy DNS管理的地方 A後面的IP更換成AWS public IP

其實我本來忘記這一步,所以wp-config怎麼改就是沒效…

Step2: 到wp-config.php檔案修改網址

vim /opt/bitnami/apps/wordpress/htdocs/wp-config.php

DEFAULT USERNAMES AND PASSWORDS

The WordPress administrative user and password are the ones you set at installation time. MySQL admin user is called ‘root’, and its password is the same as the WordPress administrative user password. The default MySQL non-root account used to access the bitnami_wordpress database is named bn_wordpress, and its password is random. The phpMyAdmin administrative user is ‘root’.

https://bitnami.com/stack/wordpress/README.txt

原本的檔案內容會有這段

define('WP_SITEURL', 'http://' . $_SERVER['HTTP_HOST'] . '/');
define('WP_HOME', 'http://' . $_SERVER['HTTP_HOST'] . '/');

改成你要的新網址,例如http://domain/。

define('WP_SITEURL', 'http://DOMAIN/');                   
define('WP_HOME', 'http://DOMAIN/');    

Step3: 重新啟動apache

apache重新啟動指令 sudo /opt/bitnami/ctlscript.sh restart apache

2017-06



發表迴響

You must be logged in to post a comment.


total of 2264730 visits