メインメニューを開く

差分

MediaWikiを移行する

176 バイト追加, 2019年9月10日 (火) 14:41
編集の要約なし
いつも忘れて、いちから調べ直してるので、ここに上げておきます。
== バックアップの取得 ==
「maintenance」ディレクトリで以下を実行します。<br/>
履歴も含めてすべてのページをxmlで取得できます。
<syntaxhighlight lang="bash">php dumpBackup.php --current > dump.xml</syntaxhighlight>
== バックアップのインポート ==
新しいサーバー側で作業します。<br/>
「maintenance」ディレクトリで以下を実行します。<br/>
すべてのページをインポートできます。<br/>
<presyntaxhighlight lang="bash">php importDump.php < dumpfile.xml</presyntaxhighlight>
== 画像の移行 ==
サーバー移行でない(ディレクトリ移行)であれば、以下を実行すれば画像をインポートできます。
<presyntaxhighlight lang="bash">php importImages.php --search-recursively --user=[wiki_userid] /home/[server_userid]/www/[旧mediawikiのディレクトリ]/images/0
php importImages.php --search-recursively --user=[wiki_userid] /home/[server_userid]/www/[旧mediawikiのディレクトリ]/images/1
php importImages.php --search-recursively --user=[wiki_userid] /home/[server_userid]/www/[旧mediawikiのディレクトリ]/images/2
php importImages.php --search-recursively --user=[wiki_userid] /home/[server_userid]/www/[旧mediawikiのディレクトリ]/images/d
php importImages.php --search-recursively --user=[wiki_userid] /home/[server_userid]/www/[旧mediawikiのディレクトリ]/images/e
php importImages.php --search-recursively --user=[wiki_userid] /home/[server_userid]/www/[旧mediawikiのディレクトリ]/images/f</presyntaxhighlight>
更に、「.htaccess」を以下の様に編集します。<br/>
【修正前】
<presyntaxhighlight lang="xml" highlight="8"># Protect against bug T30235
<IfModule rewrite_module>
RewriteEngine On
# Fix for bug T64289
Options +FollowSymLinks
</IfModule></presyntaxhighlight>
【修正後】
<presyntaxhighlight lang="xml" highlight="8"># Protect against bug T30235
<IfModule rewrite_module>
RewriteEngine On
# Fix for bug T64289
# Options +FollowSymLinks
</IfModule></presyntaxhighlight>
[[Category:MediaWiki]]