* API: All pages list
[mediawiki.git] / maintenance / rebuildall.php
blob7c44e300285fa8bf09ca754139978a6acad896ea
1 <?php
2 /**
3 * Rebuild link tracking tables from scratch. This takes several
4 * hours, depending on the database size and server configuration.
5 * @todo document
6 * @package MediaWiki
7 * @subpackage Maintenance
8 */
10 /** */
11 require_once( "commandLine.inc" );
13 #require_once( "rebuildlinks.inc" );
14 require_once( "refreshLinks.inc" );
15 require_once( "rebuildtextindex.inc" );
16 require_once( "rebuildrecentchanges.inc" );
18 $database = Database::newFromParams( $wgDBserver, $wgDBadminuser, $wgDBadminpassword, $wgDBname );
20 print "** Rebuilding fulltext search index (if you abort this will break searching; run this script again to fix):\n";
21 dropTextIndex( $database );
22 rebuildTextIndex( $database );
23 createTextIndex( $database );
25 print "\n\n** Rebuilding recentchanges table:\n";
26 rebuildRecentChangesTablePass1();
27 rebuildRecentChangesTablePass2();
29 # Doesn't work anymore
30 # rebuildLinkTables();
32 # Use the slow incomplete one instead. It's designed to work in the background
33 print "\n\n** Rebuilding links tables -- this can take a long time. It should be safe to abort via ctrl+C if you get bored.\n";
34 refreshLinks( 1 );
36 print "Done.\n";
37 exit();