最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

database - Wordpress mysql table double prefixes

programmeradmin1浏览0评论

Currently working on updating a wordpress website for a client of mine. The wordpress mysql database has double prefixes in it though.

The standard wp_ prefix and her own custom prefix for the tables. The custom prefix is currently being used. The wordpress install seems generator by installatron. Is it safe to remove all the wp_ prefixed tables or does wordpress still use those?

Currently working on updating a wordpress website for a client of mine. The wordpress mysql database has double prefixes in it though.

The standard wp_ prefix and her own custom prefix for the tables. The custom prefix is currently being used. The wordpress install seems generator by installatron. Is it safe to remove all the wp_ prefixed tables or does wordpress still use those?

Share Improve this question asked Aug 24, 2015 at 10:01 Stephan-vStephan-v 1135 bronze badges 1
  • You should be safe to remove - backup first though! – TheDeadMedic Commented Aug 24, 2015 at 10:54
Add a comment  | 

1 Answer 1

Reset to default 2

1) In order to check what kind of prefix used by current installantion you can goto wp-config.php in a root directory and find line with $table_prefix = 'PREFIX_HERE'; variable

2) Backup the DB before making any action!

3) Additionally check if other tables with different prefixes/name_patters are not used by badly-written 3rd party plugins. They may not follow a good-practice:

Do not hardcode the WordPress database table prefix (usually "wp_") into your Plugins. Be sure to use the $wpdb->prefix variable instead.

4) Right after this done you can drop all tables using a UI mysql admin panel or using more advanced way:

a. Generate a DELETE query programmaticaly:

SELECT CONCAT( 'DROP TABLE ', GROUP_CONCAT(table_name) , ';' ) 
    AS statement FROM information_schema.tables 
    WHERE table_schema = 'YOUR_TABLE_NAME' AND table_name LIKE 'WORDPRESS-PREFIX_%';

b. Perform generated result.

发布评论

评论列表(0)

  1. 暂无评论