Posts Tagged ‘数据表前缀修改’

修改WORDPRESS数据表前缀(图解)

Sunday, April 5th, 2009

WORDPRESS建立成后,也需要一定的安全设置。如WORDPRESS数据表默认前缀是“WP_”,应该进行修改。虽然本站不会吸引Hacker,但是为了玩转WORDPRESS,修改WORDPRESS数据表前缀,来保障数据库的安全。

在网络上查得修改WordPress数据表前缀的方法:

1. backup your wordpress database to a sql file (you can use phpmyadmin)
2. open that *.sql file (make another copy first) using text editor, then find and replace all “wp_” prefix to “something_”.
3. now, drop all tables of your wordpress databases (don’t drop the database)
4. import the *.sql file which has been edited before into your wordpress databases.
5. and lastly, edit your wp-config.php file and change the $table_prefix = ‘wp_’; to $table_prefix = ’something_’;
6. you may find that your plugins are deactivated automatically when this happens, so you’ll want to activate them again if that’s the case… I’d recommend deactivating them prior to doing this anyway as a precaution.

让我们一步一步来做一做:

(more…)