How can I recover MediaWiki pages from an old MAMP install?

388 Views Asked by At

I have a three year old or so MAMP install (a copy of the application folder and all its contents, databases, etc.) with a three year old MediWiki (version 1.19) installed on it, several pages, and a few images. I would like to know how I can access those pages (or at least the content on them) and import them or copy them over to a fresh install I made today with the latest versions of MAMP and MediaWiki.

I already tried copying the database folder (MAMP/db/mysql/my_database; contains .frm files) from the old install to the same location in the new install but it doesn't seem to have changed anything. I even looked at the contents of the tables with phpMyAdmin but I didn't find any of the old content. Where do I go from here?

I installed MAMP on my MacBook Pro running OSX Yosemite. I'm hosting locally (e.g. using localhost). I am able to install a fresh MediaWiki on my localhost MAMP server and it works fine (there's just no content).

UPDATE: After seeing this I changed $wgMainCacheType = CACHE_ACCEL to $wgMainCacheType = CACHE_ANYTHING in the MediaWiki local settings file and now I get an error page that looks like this:

enter image description here

Do I need to somehow upgrade my databases? They are old after all. How should I go about doing this?

2

There are 2 best solutions below

3
On

Shutdown mysql

Just copying the MAMP/db/mysql/my_database is not enough

Copy the contents of your db folder and below to the new MAMP db folder

Note i assume your new MAMP is pretty virgin

Poached it from here :

http://joejoomla.com/sound-off/157-how-to-upgrade-mamp.html

Start new mysql

Will incl necessary config files

It is not as if you should have expected MAMP to recurse directories

It needs config files from old and you don't have them yet

I have never done it on MAMP


Edit: Concerning warning that resulted

Make sure that XCache is installed with the new version of PHP. The most likely cause is the new version of PHP simply doesn't have xcache installed. You can do this by creating a php file with just the code

<?php phpinfo(); ?>

and then viewing it in a web browser.

Setting $wgMainCacheType = CACHE_NONE; will disable all caching, which would prevent the error, but make things slow.

From: http://m.mediawiki.org/wiki/Thread:Project:Support_desk/%22CACHE_ACCEL_requested_but_no_suitable_object_cache_is_present.%22

3
On

Advice : for this kind of software, use a Virtual Machine, it will save your time : my own mediawiki is running for 8 years under debian, hosted on a several different Apple machines.

But for now, if you still have the former stack running :

0 . (always) save your database content + files

This will allow you to rollback if something goes wrong

  1. Export your content and history
    • go to the special page : "Export pages", list your pages.
    • if needed, use the special page : "List all pages".

this will produce an xml file.

  1. Save your images somewhere on your file system

    • use the special page : "List all files".

you now have exported your pages and files

3) Switch stack

check that the new virgin mediawiki is working well

  1. import your pages

    • go to the special page : "import pages", upload the xml file produced in step 1

you now have a similar wiki, minus the files

  1. import your images :
    • after the step 4, each file page has been created without its content.
    • you can upload manually each image exported at step 2) if you have only some of them,
    • if that is too much files (>30), you can use this procedure : https://www.mediawiki.org/wiki/Manual:ImportImages.php

keep in mind also to reinstall any extensions installed previously.