[Plugin: WP-DB-Backup] Here’s how to OPTIMIZE tables during backup
While I do not wish to start a debate why one needs to OPTIMIZE one’s WordPress tables as often as one backs them up*, regular optimizing is crucial for tables with several variable-length rows that get many INSERTs and DELETEs, e.g.,
As it happens with the
wp-db-backupplugin, this is easily done by adding only one line to the source code.
$wpdb->get_results("OPTIMIZE TABLE ".implode(", ",$tables));
The line should be added just before the
foreach ($tables as $table)line in the
db_backupfunction. It’s at line 897. Note that this affects only the scheduled backup process and not the one via the Admin screen — that would require another line. 🙂
*It’s debatable, but Yoast seems to agree with me (Tip #17/slide #37).
- The topic ‘[Plugin: WP-DB-Backup] Here’s how to OPTIMIZE tables during backup’ is closed to new replies.