Mediawiki maintenance: Difference between revisions
From wikinotes
Line 39: | Line 39: | ||
== Static HTML == | == Static HTML == | ||
<blockquote> | |||
=== Tools === | |||
<blockquote> | |||
{| class="wikitable" | |||
|- | |||
| [[mw2html]] | |||
|- | |||
| [[static-wiki]] | |||
|- | |||
|} | |||
</blockquote><!-- Tools --> | |||
=== Home Grown === | |||
<blockquote> | |||
=== wikicode parsers === | |||
<blockquote> | <blockquote> | ||
See page of mediawiki parsers here: http://www.mediawiki.org/wiki/Alternative_parsers | See page of mediawiki parsers here: http://www.mediawiki.org/wiki/Alternative_parsers | ||
=== wget === | </blockquote><!-- wikicode parsers --> | ||
==== wget ==== | |||
<blockquote> | <blockquote> | ||
Captures/correct links, but not as relative links for me. technically can capture CSS too. | Captures/correct links, but not as relative links for me. technically can capture CSS too. | ||
Line 62: | Line 80: | ||
</source> | </source> | ||
</blockquote><!-- wget --> | </blockquote><!-- wget --> | ||
</blockquote><!-- Home Grown --> | |||
</blockquote><!-- | |||
</blockquote><!-- static html backup --> | </blockquote><!-- static html backup --> | ||
Revision as of 14:03, 12 June 2022
Documentation
mediawiki static dump tools https://meta.wikimedia.org/wiki/Static_version_tools mediawiki dumpBackup xml https://www.mediawiki.org/wiki/Manual:DumpBackup.php
Backups
Full Backups
To create a full backup, you'll need to:
Backup Database
mysqldump -u wiki -pPASSWORD wikidb > ~/wikidb-backup.sqlBackup Images
TODO
Backup LocalSettings.php
TODO
Static HTML
Tools
mw2html static-wiki Home Grown
wikicode parsers
See page of mediawiki parsers here: http://www.mediawiki.org/wiki/Alternative_parsers
wget
Captures/correct links, but not as relative links for me. technically can capture CSS too.
wget --recursive \ --page-requisites \ --adjust-extension \ --convert-links \ --no-parent \ -R "*Special*" \ -R "Special*" \ -R "*action=*" \ -R "*printable=*" \ -R "*oldid=*" \ -R "*title=Talk:*" \ -R "*limit=*" \ "https://yourwiki.com"Zim
wget-2-zim bash script to scrape mediawiki to zimfile zim-tools includes zimwriterfs which dumps mediawiki to zimfile mwoffliner scrape a mediawiki to zimfile
Delete Revision History
cd /usr/local/www/mediawiki/maintenance php deleteOldRevisions.php --delete