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
1 Answer
Reset to default 21) 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.