2007年7月10日 星期二

How to change Wordpress’ default username

Frank:
這篇文章提到修改 WordPress 預設帳號名稱的方法,原文也是圖文並茂,文章有點長。

步驟說穿了就很簡單:
  1. 使用 phpMyAdmin 登入資料庫。
  2. 在左方資料庫選單中,選取要更改的資料庫。
  3. 選擇左方的 wp_users 欄位。
  4. 點選右上方的「瀏覽」兩字。
  5. 把畫面往下拉,會看到 admin 的資料,看到一隻筆的圖示,按下去編輯它。
  6. 然後會看到欄位:user_login,型態: varchar(60) 後面的值就是 admin,在這裡改成自己想要的名字。
  7. 按下最下方的「執行」即可。
After each installation, Wordpress gives you a deafult “admin” username and a random password to login to your control panel. Try to login with them and access your profile by clicking the “Profile” link on the top right section of the page.
##CONTINUE##
Wordpress installation

Wordpress default login

The profile page displays your user information such as your username, e-mail, and login password. You can easily change the password, but what about that username? Why do we want to change it anyway? Well, having a username as common as “admin” is not quite secure, not to mention hundreds if not thousands of other Wordpress bloggers use it as their login too.

Default profile page

Unfortunately, Wordpress doesn’t make it possible to change the username from the control panel. Yes, it is visible but no, it is locked for editing. To change it, you’ll have to access the database and do it from there.

Here are the steps on how to change Wordpress’ default username:

1. Login to your host’s control panel and access the MySQL database

In your web host control panel, you’ll find a link that goes to the database administration. On that page you’ll find a link to phpMyAdmin. Go and click it. Some web hosts might even have the link to phpMyAdmin directly on the control panel’s front page. After clicking the link you may or may not be presented by a login form. Enter your database login information to continue.

Your can see your database information in the “wp-cofig.php” file located in the root directory of your Wordpress installation.

2. Open your Wordpress database tables

On the left side of the screen, you’ll see a list of database. Find and click your Wordpress database. After you clicked it, the page will display the database tables, which stores all information about your Wordpress blog. Find the table named “wp_users“. This table holds information about users; e-mails, passwords, and of course usernames!

After you’ve located it, you need to browse it’s content. Along the table’s row you’ll see a series of action icons. Find the one that reads Browse. You can usully hover your mouse over the icon to see what action it wil do. Click it. On the screenshot below, Browse is the first icon after “wp_users”.

Database home

3. Open and edit the username

After clicking the Browse action, the page will display all users registered to your blog. If you happen to be a single user or just installed Wordpress, there will be only one admin user row. In the row’s heading you will see the user ID and next to it the user_login. This is the information that we want to edit. To do that, click on the Edit icon. On the screenshot below, it is the one next to the trash icon.

Database - select admin

You will then enter the table edit screen. Find the field that reads user_login that change its value to whatever you want your username will be. For example, I changed it from ‘admin’ to ’simba’. After you’ve typed the new user_login, hit the Go button located at the bottom of the page.

Change user login

That’s it. You can test your new username by refreshing your profile page in your Wordpress control panel. It will bounce you back to the login screen with a big red box stating your session has expired.

來源:http://blog.bindanaku.com/2007/03/how-to-change-wordpress-default-username/

沒有留言: