如何更改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帳號

在Google News上追蹤我們最新文章
香腸
香腸

喜歡在網路上透過文字與圖片分文章教學,默默地用鍵盤烤了9年的香腸。另外還身兼阿腸接案餬口飯吃。對了,別叫我阿腸,請叫我香腸,這樣我才知道你看我部落格長大的。

文章: 1781

24 則留言

  1. 您好!不好意思打擾您了
    小弟遇到非常棘手的問題,我的網站無法登入後台了,被自動轉到前台,而在用wordpress帳號登入,點使用者資訊看見後台的編輯欄位以全消失,懷疑有駭客把我的使用者權限變成普通會員了(PS:我的網站有使用會員功能),現在非常著急,請問大大有什麼方法能解決呢?

  2. 不好意思 打擾一下
    最近要更新自己的部落格 發現我的登入頁面 出現”糟糕! 此連結已毀損。”的訊息 根本無法登入 請教可能的原因是甚麼? 如何解決 要重安裝嗎? 目前前台是ok的~

    ps.我前幾天才上傳一些東西

    香腸回應:
    可能wp-login.php檔案不見了?

  3. 多谢,修改成功!
    虽然在WP3.0开始的版本可以自定义第一个管理员的名称了.不过我从老版本升级上来的,还是需要手动在SQL里修改一下才行得通.

    香腸回應:
    對阿~~不然就要開新帳號轉換權限

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

    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

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

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

  6. 想請問香腸大一個題外問題>”< 請問如果wordpress有設定讓別人註冊的話 要如何管理會員系統呢?我如果要刪掉帳號怎麼辦? 我因為有使用whisper的悄悄話功能 所以才會想開放註冊的,這樣別人才看得到板主回應的話 另外,開放給別人註冊會不會有風險呢??

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

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

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

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

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

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

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

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

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

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

發佈留言

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *

這個網站採用 Akismet 服務減少垃圾留言。進一步了解 Akismet 如何處理網站訪客的留言資料