如何更改WordPress預設的admin帳號?


※請注意,本站文章未經授權,嚴禁轉載!謝謝。

如果你是第一次接觸架設WordPrss的使用者,當您架設完成後,你會發現它和一般常見的論壇程式不同,第一位使用者的帳號與密碼都不能自訂,都必須接受預設的帳號(admin)與亂數密碼。但是多數使用者登入其它服務應該都有自己習慣的使用帳號,那該如何改變預設的admin帳號呢?



記得很久以前我自己也有這樣的問題,就是不習慣使用預設的admin帳號當成自己的部落格管理帳號,當時使用了最簡單的方法,就是以admin身分登入WordPress後台,然後新建一個自己習慣的帳號身分並且給予該帳號管理員的權限,接著改用自己習慣的帳號登入WordPress後台,再將原本的admin帳號刪除,這樣就完成了。

但是聽被貓養的阿貓說,在WordPress2.7.1版,似乎不能使用以上那種簡單的修改方式,所以如果你想要改掉預設的admin帳號的話,還是認命點,乖乖開啟資料庫來進行修改吧!

修改admin帳號除了是因為方便我們使用習慣的帳號,當然還有部分原因就是減少被別人猜到自己網站後台帳號是什麼?減少別人使用密碼暴力破解的方式來攻陷你的後台。關於資訊安全這部分的探討,先前corausir的這篇文章,替大家做了詳盡的說明囉!

第1步 在此我們以cPanel後台為例子,先進到您的主機後台,找到phpMyAdmin並點擊進入。

WordPress-修改預設admin帳號

第2步 進入資料庫後,請點擊左方的「wp_users」在點擊上方的【瀏覽】,接著請找到「user_login」的欄位名稱為「admin」,點擊其左方的「鉛筆圖」。

WordPress-修改預設admin帳號

第3步 請在「user_login」該橫排的「值」欄位,將本來的「admin」改成你習慣使用的帳號,最後點擊﹝執行﹞。

WordPress-修改預設admin帳號

第4步 當修改完成後,畫面會顯示「影響列數: 1」。

WordPress-修改預設admin帳號

第5步 回到WordPress後台的【帳號】→【作者與帳號】的頁面,是不是原本的管理員帳號(admin)不見了呢?

WordPress-修改預設admin帳號




關於本文章有 19 則留言。

  1. You Yu
    2009-05-12 @ 22:14:47 
    1

    好文!
    幫你推一個~
    甭回我啦! :P

    香腸回應:
    噗哧~ 幹嘛突然換暱稱XD

  2. 拆組達人
    2009-05-13 @ 09:09:48 
    2

    這樣不是又變相的將自己的管理者帳號公佈?
    sofree發完文章後,記得刪除喔!

    香腸回應:
    我沒有公開阿~
    我手上有好幾個WordPress測試站...怎會把自己放在太陽下曬,變成香腸乾呢XD

  3. Ausir
    2009-05-13 @ 10:59:49 
    3

    嗯嗯 admin 帳號記得要改掉
    如果不改掉也可以啦~
    盡量把密碼設定難一點
    然後在禁止他人強迫登入~ 也可以有不錯的防範
    做的測底一點的話
    連頁面內都不能出現帳號喔
    呵呵~

    修改方式我有 PO 出來 或是使用外掛

    我的部落格被駭客了 – wordpress 後台登入修補

    香腸回應:
    你那篇我有看過了~XD
    不過我覺得到是沒那麼誇張~
    密碼設強一點基本上就不用擔心了。
    如果只是一直注意WEB部分而忘了FTP或是空間後台,那也囧了~

  4. 小俊
    2009-05-13 @ 16:45:36 
    4

    香腸寫了~~~~~ 前幾天才有小朋友問我這個問題...

    香腸回應:
    速誰....快點自己招來~

  5. 幻嵐
    2009-05-13 @ 17:36:52 
    5

    前幾天也有人問我這個問題

    有沒有辦法在一開始安裝WP的時候就將admin改成自己要的帳號名呢?即從頭到尾都不會出現"admin"這個帳號。

    香腸回應:
    理論上應該可以,因為程式是人寫出來的,不過我覺得直接改資料庫就好哩~
    如果你想要一開始就不出現admin,那可能要翻翻WordPress源碼囉~

  6. 天才事務所
    2009-05-14 @ 01:10:49 
    6

    我記得...前天吧~ 有一隻貓問過我這問題~
    = = WP_USERS 哈~ 我順便笑他英文程度差了...哇哈哈哈

    香腸回應:
    我知道那隻貓是誰....

  7. 小千
    2009-05-14 @ 21:20:56 
    7

    想請問香腸大一個題外問題>"< 請問如果wordpress有設定讓別人註冊的話
    要如何管理會員系統呢?我如果要刪掉帳號怎麼辦?

    我因為有使用whisper的悄悄話功能
    所以才會想開放註冊的,這樣別人才看得到板主回應的話

    另外,開放給別人註冊會不會有風險呢??

    香腸回應:
    開放註冊並不會有危險,註冊後預設的身分應該都是「訂閱者」,只能留言而已。
    除非你亂調設定,不然都不會有問題。
    但是我建議不要開放註冊,因為沒意義。

  8. 小千
    2009-05-14 @ 21:27:22 
    8

    香腸大Q///Q
    對不起,我收回上面的問題
    對不起,問了這麼愚蠢的問題
    我剛剛按後台的「帳號」就看到了(好丟臉///)

    香腸回應:
    不會啦~剛接觸一定比較模糊的~

  9. muki
    2009-05-14 @ 23:06:59 
    9

    晤...目前看不到圖片(破圖orz)
    不過這個方法我也先記下來 謝啦XD

    香腸回應:
    圖片已經即時修正。

  10. Alan
    2009-05-18 @ 21:26:36 
    10

    推~~

    香腸回應:
    XD

  11. 鈞仔
    2009-05-19 @ 09:12:29 
    11

    推~推~
    我之前都直接在建一個管理者帳號
    再把admin砍掉
    常常出現解決不了的問題
    終於懂了˙ˇ˙

    香腸回應:
    :)

  12. F
    2009-05-19 @ 23:58:15 
    12

    咦...我剛才才把admin刪除說...
    好像沒甚麼異狀呀? 會怎麼樣嗎= =? 剛才突然想把他點刪除...

    香腸回應:
    不會怎樣啦~

  13. F
    2009-05-24 @ 11:09:24 
    13

    哦 好險= = 以為會怎麼樣...

    香腸回應:
    呵呵~

  14. killfox
    2009-05-31 @ 20:59:33 
    14

    很不错呀,找了很久了,谢谢

    香腸回應:
    :)

  15. 广告主义
    2009-06-09 @ 09:33:10 
    15

    多谢香肠兄 嘿嘿

    香腸回應:
    :)

  16. Marty
    2009-07-22 @ 14:19:18 
    16

    終於找到whisper comment外掛無法使用的原因了!

    香腸回應:
    喔?

  17. Poyu
    2009-07-31 @ 15:49:53 
    17

    剛剛裝完2.8
    沒看到這篇文章
    就用您第二段的方法
    好像沒什麼問題?

    香腸回應:
    嗯~

  18. 銀狐
    2009-10-08 @ 23:09:27 
    18

    我在更改預設帳號之後,要登出的時候出現這些字

    Warning: Cannot modify header information - headers already sent by (output started at /home/fjufoxfr/public_html/wp-content/plugins/ChineseVersionsSwither/cvs_trodi.php:1) in /home/fjufoxfr/public_html/wp-login.php on line 290

    Warning: Cannot modify header information - headers already sent by (output started at /home/fjufoxfr/public_html/wp-content/plugins/ChineseVersionsSwither/cvs_trodi.php:1) in /home/fjufoxfr/public_html/wp-login.php on line 302

    Warning: Cannot modify header information - headers already sent by (output started at /home/fjufoxfr/public_html/wp-content/plugins/ChineseVersionsSwither/cvs_trodi.php:1) in /home/fjufoxfr/public_html/wp-includes/pluggable.php on line 689

    Warning: Cannot modify header information - headers already sent by (output started at /home/fjufoxfr/public_html/wp-content/plugins/ChineseVersionsSwither/cvs_trodi.php:1) in /home/fjufoxfr/public_html/wp-includes/pluggable.php on line 690

    Warning: Cannot modify header information - headers already sent by (output started at /home/fjufoxfr/public_html/wp-content/plugins/ChineseVersionsSwither/cvs_trodi.php:1) in /home/fjufoxfr/public_html/wp-includes/pluggable.php on line 691

    Warning: Cannot modify header information - headers already sent by (output started at /home/fjufoxfr/public_html/wp-content/plugins/ChineseVersionsSwither/cvs_trodi.php:1) in /home/fjufoxfr/public_html/wp-includes/pluggable.php on line 692

    Warning: Cannot modify header information - headers already sent by (output started at /home/fjufoxfr/public_html/wp-content/plugins/ChineseVersionsSwither/cvs_trodi.php:1) in /home/fjufoxfr/public_html/wp-includes/pluggable.php on line 693

    Warning: Cannot modify header information - headers already sent by (output started at /home/fjufoxfr/public_html/wp-content/plugins/ChineseVersionsSwither/cvs_trodi.php:1) in /home/fjufoxfr/public_html/wp-includes/pluggable.php on line 694

    Warning: Cannot modify header information - headers already sent by (output started at /home/fjufoxfr/public_html/wp-content/plugins/ChineseVersionsSwither/cvs_trodi.php:1) in /home/fjufoxfr/public_html/wp-includes/pluggable.php on line 697

    Warning: Cannot modify header information - headers already sent by (output started at /home/fjufoxfr/public_html/wp-content/plugins/ChineseVersionsSwither/cvs_trodi.php:1) in /home/fjufoxfr/public_html/wp-includes/pluggable.php on line 698

    Warning: Cannot modify header information - headers already sent by (output started at /home/fjufoxfr/public_html/wp-content/plugins/ChineseVersionsSwither/cvs_trodi.php:1) in /home/fjufoxfr/public_html/wp-includes/pluggable.php on line 699

    Warning: Cannot modify header information - headers already sent by (output started at /home/fjufoxfr/public_html/wp-content/plugins/ChineseVersionsSwither/cvs_trodi.php:1) in /home/fjufoxfr/public_html/wp-includes/pluggable.php on line 700

    Warning: Cannot modify header information - headers already sent by (output started at /home/fjufoxfr/public_html/wp-content/plugins/ChineseVersionsSwither/cvs_trodi.php:1) in /home/fjufoxfr/public_html/wp-includes/pluggable.php on line 703

    Warning: Cannot modify header information - headers already sent by (output started at /home/fjufoxfr/public_html/wp-content/plugins/ChineseVersionsSwither/cvs_trodi.php:1) in /home/fjufoxfr/public_html/wp-includes/pluggable.php on line 704

    Warning: Cannot modify header information - headers already sent by (output started at /home/fjufoxfr/public_html/wp-content/plugins/ChineseVersionsSwither/cvs_trodi.php:1) in /home/fjufoxfr/public_html/wp-includes/pluggable.php on line 705

    Warning: Cannot modify header information - headers already sent by (output started at /home/fjufoxfr/public_html/wp-content/plugins/ChineseVersionsSwither/cvs_trodi.php:1) in /home/fjufoxfr/public_html/wp-includes/pluggable.php on line 706

    Warning: Cannot modify header information - headers already sent by (output started at /home/fjufoxfr/public_html/wp-content/plugins/ChineseVersionsSwither/cvs_trodi.php:1) in /home/fjufoxfr/public_html/wp-includes/pluggable.php on line 865

    可是外掛能裝
    其他的功能都沒問題
    不知道這樣會不會影響到其他運作

    香腸回應:
    應該不會~ 只是有些頁面要轉向會失敗而以。
    相關討論: http://sofree.tw/thread-1316-1-1.html

  19. Jessie
    2010-05-28 @ 21:05:29 
    19

    正愁怎麼解決這個問題呢!!
    感謝香腸大分享,按照步驟已經把問題解決掉了^^

    香腸回應:
    恭喜你~