A little tip for all users of the existing beta of WordPress 2.9 and for all who wish to update soon to the new version. With version 2.9 WordPress conducts its own routine to optimize the database. Previously it was done by either Plugins or via SQL access. From the next version this function is implemented in the core …
… which you can activate with the help of a constant; stored in wp-config.php
, you have access to the script.
define('WP_ALLOW_REPAIR', true);
Call the script from the outside at the following address …
http://example.com/wp-admin/maint/repair.php
… where you either repair the database or run the optimization. Technically, there is no magic behind this work, but the familiar SQL statements ANALYZE TABLE
, REPAIR TABLE
and OPTIMIZE TABLE
.
I guess that will start a debate, why with the constant and why from the outside, etc. – leave your comment here. Alternatively, anyone can contribute to WordPress and discuss directly with the developers or enter changes directly to the code.
Comments
6 responses to “WordPress Database Repair Script In 2.9”
Works like a charm!
@Chris, good to hear!
Works as advertised. Even with the just released 2.9b1 – however it ONLY repairs/optimizes the core WP tables – not anything else added by other plugins etc.
FWIW, at this stage of 2.8.x I’d probably suggest looking at Lester Chan’s WP-DBManager which allows access, repair and optimization of ALL tables, records etc. http://lesterchan.net/portfolio/programming/php/#wp-dbmanager
[…] Y la opcion que mas me gusta de todas un sistema ayuda a reparar la base de datos. […]
The repair didnt work for me. Any other sugestion ?
Hi,
I’ve just opened a ticket including a patch that allows to repair all $wpdb->prefix tables.
Greetz,
Berny