Topic on Project:Support desk

Which table are all of the pages stored in?

8
174.140.182.136 (talkcontribs)

I had a hacker attack my server, so I had to reinstall MediaWiki, but for some reason restoring the database as a whole gives me an error.

I need to manually restore each table, but I am only worried about the pages for now.

the table "page" restores all of the links in Special:AllPages, but it doesn't restore the page contents itself.

Example; if I go to page "Clay", it says

"The revision #0 of the page named "Clay" does not exist. This is usually caused by following an outdated history link to a page that has been deleted. Details can be found in the deletion log."

88.130.117.154 (talkcontribs)

The tables "pages" and "text" contain ... well, you know. Both are connected through the table "revision".

I added some information on how the data is connected and retrieved to Manual:Page_table.

Only restoring parts of a database is a bad idea. You can restore the tables step by step, that is no problem, but you cannot leave tables out.

GeorgeRu (talkcontribs)

Try to run php maintenance/rebuildall.php

88.130.121.172 (talkcontribs)

The rebuildall maintenance script can rebuild links and indices used for searching the wiki. However, when page records, revisions or actual texts are missing, it is just useless - running the script cannot' fix these issues.

15.219.169.72 (talkcontribs)

"The revision #0 of the page named "Page1" does not exist." After deleting page1 details manually from page,revision,text tables in mediawiki (1.20.5) and once again added the same page getting above issue how to resolve the above issue

88.130.121.172 (talkcontribs)

The error message you get sounds like in the page table, the entry of the according page points to a non-existing revision. This might be fixable by running the maintenance script attachLatest.php. This should make the page point to the newest revision again. This would be what I would try first.

If that does not work and you in fact want to delete the page, I would try running the maintenance script nukePage.php. This script allows you to permanently(!) delete a page from the database. Afterwards you can use the script purgeOldText.php to delete unused rows from the text table.

However, note that your database currently is in an inconsistent state; although the scripts I mentioned were partly written for situations of brokenness, there is no guarantee that they can solve this.

Ciencia Al Poder (talkcontribs)

It's also worth noting that you shouldn't fiddle directly with the database unless you know what are you doing.

15.219.169.72 (talkcontribs)
Reply to "Which table are all of the pages stored in?"