Manual talk:Moving a wiki
Add topicPlease do not post support questions here.
Instead, use one of these channels:
Further options for contacting appropriate people can be found at Communication .
Any user names refer to users of that site, who are not necessarily users of MediaWiki.org (even if they share the same username).
Comments
[edit]Refactor to [backup, install, restore]
[edit]I was a bit surprised that
- MediaWiki had a backup manual, but no restore manual ... since, obviously, one needs to be able to restore a backup.
- This manual (appropriately) points to the backup manual (to avoid duplication and variant versions of information).
- This manual has essentially no information about installing MediaWiki onto the destination server (which may be required for a move or duplication).
- This manual has a considerable amount of material that was about restoring from a backup.
So I
- copied the restore-related sections from this manual to a new restore manual
- edited the new restore manual to remove the assumption that one was moving or duplicating onto a new MediaWiki instance (since one may restore onto the same instance from which one backed up)
- recommend that this manual be refactored to
- point to the new restore manual, deleting the copied restore-oriented material
- point to appropriate installation instructions, e.g., the installation guide
I.e., I recommend that this manual be replaced with essentially 3 links
- backup origin wiki
- (optional) install MediaWiki on destination server
- restore backup to new destination MediaWiki
with "glue text" as needed. I can do this if desired, just send email. --Tlroche 23:53, 9 December 2011 (UTC)
Still in need of more detail
[edit]in the back up the database section the article states "you need to backup the database" which is not only fantastically obvious but also not terribly helpful. Recommend that we actually create instructions on HOW to do this. it wouldn't be hard to adapt these wiki instructions for backing up a wordpress mysql file.
http://codex.wordpress.org/Backing_Up_Your_Database
- Actually, I put up a decent step-by-step instruction set for Ubuntu here: Manual talk:Backing up a wiki#Ubuntu 10.10 - Step by Step Instructions KermEd 18:10, 12 May 2011 (UTC)
Which directory to back up?
[edit]Thanks Rob for the rewrite. It is good. Is it only the images folder that needs to be backed up? If so, maybe the guide could just be tweaked to explain this. Also, perhaps it could be extended to explain that this can also be used as an operations guide for backup & restore. --Mydoghasworms 19:47, 31 May 2006 (UTC)
Complete rewrite
[edit]A complete rewrite of this guide is available at Help:How to move a wiki to another server. After a user complaint in the #mediawiki IRC channel, I lashed out and rewrote the lot. Rob Church Talk 20:14, 30 December 2005 (UTC)
- link is broken 69.251.20.244 19:00, 17 February 2007 (UTC)
I fixed it. Adamtheclown 03:17, 23 November 2010 (UTC)
Questions
[edit]Only for upgrades?
[edit]Newbie question: is this only for a situation of moving a database from one database server to another? It seems like upgrading would do the same thing as moving a database, unless it's on a different server. --Mr alex hall 08:55, 7 Dec 2004 (UTC)
- It's for moving from one server to another. Upgrading doesn't require nearly as much effort, although you should still be making backups. Rob Church Talk 20:20, 30 December 2005 (UTC)
Getting the Help pages
[edit]Also, I'd like to install the Help: pages. How does one download data from Meta-wiki, or any mediawiki that one doesn't have admin privileges on? Drauh 05:20, 24 Dec 2004 (UTC)
- Use Special:Export with a list of page titles. Rob Church Talk 20:20, 30 December 2005 (UTC)
Null password
[edit]Tony: I'm working on a shell script to auto back up my wiki, is there a way to pass a null password to mysqldump? I've tried every thing like --password="" and "echo "" | mysqldump..."
- If you have a null password, normally you'd just not pass a password parameter. --brion 08:06, 18 Mar 2005 (UTC)
Preparing for download
[edit]When i want to export the database like the devs do, with cur, old and so, what are the commands? They don't export all tables, or? -- MichaelDiederich 23:12, 23 Mar 2005 (UTC)
- Using the command-line client for mySQL, you can specify a list of tables to be included. Third-party utilities such as phpMyAdmin allow you to exclude certain tables from dumps too. Rob Church Talk 20:20, 30 December 2005 (UTC)
Clearing the cache
[edit]I moved the URL location of my wiki. This resulted in wrong URL for the topics in the wiki. I found out that wiki was using a cache to speed up things. To clear the cache I removed all records from object_cache. Is there another option to clear the cache or this the way to do so? Please advice. J.C. Wesdorp (212.238.212.92 21:34, 12 July 2005 (UTC))
- That should work fine. If moving to a new server, however, check the value of $IP and $wgScriptPath in LocalSettings.php or links will be generated without the correct URL. Rob Church Talk 20:20, 30 December 2005 (UTC)
Temporary files
[edit]It looks like there's a bunch of stuff in the images directory that doesn't need to be backed up. The timeline and tmp directories seem to contain images generated by EasyTimeline -- they'll be regenerated if deleted. What about the temp and thumbs directories? Will they be regenerated, too? --MarcSherman 19:06, 22 July 2005 (UTC)
- Temp does not need to be preserved at all. Thumbs can be discarded, but you should then also clear the parser cache to ensure that they are regenerated when pages using them are re-rendered. --brion 09:48, 23 July 2005 (UTC)
Shared hosting
[edit]What about remote webhosting. How can simple users backup all their data and move the wiki to a new server/location if they cannot run shell scripts?
- For these situations, I find third party tools such as phpMyAdmin do an adequate job; indeed, I prefer using it to the command-line client at times. Rob Church Talk 20:20, 30 December 2005 (UTC)
- You can not import using phpMyAdmin, can you?
Database Restore
[edit]Hi, I'm running a mediawiki 1.5.5 on my workstation at work. Quite unexpectedly, my workstation was swaped out without any notice. I did have a copy of my wiki installation and the MySQL/data/wiki/ folder with the wiki database in it saved on a network share from a week prior. After installing L.A.M.P. back on the new workstation (mysql 4.1, just like the old workstation) I tried to drop in the old \data folder hoping everything would work, but it doesn't. phpMyAdmin gives the following:
- #1016 - Can't open file: 'archive.ibd' (errno: 1)
Please help!
--bryce
P.S. - Let me know if this isn't the right place to post this, I couldn't find a help forum anywhere.
Reply
[edit]The wikidb database is an InnoDB database. The archive.idb isn't a real file, it's a virtual file within /var/lib/mysql/ibdata1. /var/log/mysqld.log should point you to http://www.innodb.com/ibman.html section 15.1, which in turn gets you to http://dev.mysql.com/doc/refman/5.0/en/innodb-troubleshooting-datadict.html for some background. Restore the top-level /var/lib/mysql files and you may be all set.
I'm not sure that this will fix your problem, but it's my best guess.
SQL syntax error after import
[edit]Hi, I'm running the newest mediawiki, and something went wrong with my previous installation (I got blank screen) so I exported the sql, reinstalled the newest wiki and got it working, and then overwrited the tables. When I set it up, it says:
Tietokantavirhe Tietokantakyselyssä oli syntaksivirhe. Syynä saattaa olla virheellinen kysely, tai se saattaa johtua ohjelmointivirheestä. Viimeinen tietokantakysely, jota yritettiin, oli: (SQL-kysely piilotettu) . Se tehtiin funktiosta ”Block::load”. MySQL palautti virheen ”1054: Unknown column 'ipb_anon_only' in 'where clause' (localhost)”.
Someone in the 'net suggested running maintenance/update.php from the command line, but it isn't an option, since all I have is a ftp connection, not ssh. Any suggestions?
--Timo H. / Finland
mysqldump
[edit]I just added an example command to back up the database using mysqldump. I'm a novice and don't know if this is sufficient; it would be lovely if someone could verify. Thanks - Tempshill2 18:26, 17 January 2006 (UTC)
Could someone add an example command for restoring the database? That'd be very nice :) Thanks --128.253.43.26 21:08, 7 February 2006 (UTC)
Can't import
[edit]So I followed the directions on exporting the wiki database, but I can't import in on my other server. I keep getting syntax errors with the import SQL. Is there a forum that I can go to and get help for this kind of trouble?
- Hi, prehaps some common errors should be mentioned here. You didn't mention the error number but the most common one is, that your mysql versions are not the same. In case you export the database with phpMyAdmin you can choose a compatible-mode. You should choose one which sounds like the version of your mysql on the destination server. Another common error is, InnoDB is not accepted. I worked around this by replacing InnoDB by MyISAM. I think its not the best way but it worked. (Most editors (kate) have a replace_all funktion included, I made use of this one). Lukas
Corrupt page titles after restore
[edit]I performed a backup of the database (using phpMyAdmin and also mysqldump) and then a restore and all the article titles that contained special Romanian characters were corrupted. Titles without special characters were not affected, and the body of all articles WITH or WITHOUT special characters were not affected. I'm running Wiki 1.6.3, source system is Linux with My SQL 4.1.19, destination system is Windows with My SQL 4.1.20
MySQL server collation is UTF-8, the database collation is latin1_swedish_ci, and columns are latin1_bin. I tried using the mysqldump --default-character-set=latin1 but that didn't work either.
- Hello. I've got the same problem with MW 1.5.4 and two GNU/Linux systems : before backup and after. Is there really nobody who knows the solution ?
- --Xiloynaha
Guarantees downtime
[edit]Doing it this way seems a bit amateurish as it guarantees downtime. I'm sure there has to be a better way, such as installing Mediawiki on the new host with the same settings, updating DNS to point there, and setting the new MySQL as a slave database until it's caught up? Then once DNS has propogated and the databases aligned, turn the old wiki off? I've no idea if this works in practice I might add :) --Kingboyk 18:10, 10 January 2007 (UTC)
Note that the above conversation may have been edited or added to since the transfer. If in doubt, check the edit history.
Need more details
[edit]The instructions don't help, they just refer to other places... annoying indeed. 69.251.20.244 18:57, 17 February 2007 (UTC)
Can I import pages from a moinmoin wiki?
[edit]I have a little wiki with just one user (me) that I created with moinmoin. I'd like to import the content to my new MediaWiki. How can I do it?
Changing the folder's name post-install
[edit]Hi, this is my first post here, I will try to keep a high SNR.
@Before: a freshly installed MediaWiki 1.11 (upgraded from 1.6), labelled mediawiki-1.11.0 @after: a non-working MediaWiki 1.11 simply labelled mediawiki.
Removing the version number from the folder name broek the wiki. I modified LocalSetting.php (the $wgScriptPath variable) but it still does not work.
Here is the text I get:
Warning: require_once(/srv/d_latapie/www/www.latapie.name/htdocs/mediawiki-1.11.0/includes/ProfilerStub.php) [function.require-once]: failed to open stream: No such file or directory in /srv/d_latapie/www/www.latapie.name/htdocs/mediawiki-1.11.0/StartProfiler.php on line 3 Fatal error: require_once() [function.require]: Failed opening required '/srv/d_latapie/www/www.latapie.name/htdocs/mediawiki-1.11.0/includes/ProfilerStub.php' (include_path='.:/usr/share/php:/usr/share/pear') in /srv/d_latapie/www/www.latapie.name/htdocs/mediawiki-1.11.0/StartProfiler.php on line 3
Any idea on how to solve it? Thank you. David Latapie 06:32, 17 January 2008 (UTC)
- Hi - I have a similar problem. I just want to change my wiki folder's name, but it breaks everything. Do I have to do a SQLDump, delete the DB, reinstall and import... or is there an easy solution? Thanks, --Thekryz 16:19, 18 May 2008 (UTC)
In your LocalSettings.php file, look for any mention of the old name and replace it by the new name. It should work then. No pathes are stored in the database. -- Duesentrieb ⇌ 08:21, 19 May 2008 (UTC)
PS: Note that $wgScriptPath refers to the web path, while the error above is caused by a bad include path. The include path is stored in the variable $IP, which is usually atomatically set at the very top of your LocalSettings.php file. You can try to set it to the absolute (filesystem) path of your installation manually, just before the line saying $path = array... HTH -- Duesentrieb ⇌ 08:25, 19 May 2008 (UTC)
PPS: hm, actually... StartProfiler is special, because it's used before LocalSettings is even read. It doesn't use $IP at all. Since it's in the same directory as the index.php, it should always simply work. Hm... this *could* be caused by symlinking the include directory. other than that, I have no idea. -- Duesentrieb ⇌ 08:28, 19 May 2008 (UTC)
Not the exact answer to OP's problem, but something that could give a headache to newbies like me. When shifting the wiki, make sure that in LocalSettings.php, all the variables containing path are changed properly. In my case, it was $wgArticle variable which needed to be changed. But, it is not clear from the article. -- Mehul Ved 08:16, 19 September 2009 (UTC)
Hi Not sure about the old version of mediawiki, but the latest version I'm currently using does save the local path of the wiki in the database, for example the editors and some other stuff related to themes. So, I encounter the same problem like others. Anyway, I couldn't delete the database so I wrote a script that basically downloads the entire database, search for the old path (or whatever you want) and replace it with the new path (or again whatever you want) and finally upload it back to the database. I uploaded it to Github, so feel free to use it
These instructions are terrible
[edit]It is very sad that eight years after mediawiki was first created, mediawiki, a program intended to involve everyone in the creative process, can only be installed by a minute portion of the population.
Part of the problem is the complex software, but a good portion of the blame is the god awful instructions found on most mediawiki pages. This page is a shining example of computer geniuses attempting to write simple easy to understand instructions and failing miserably. This sentence embodies how worthless the majority of the instructions are for the vast majority of people:
- On the destination server, create a new MySQL database and a user, and grant that user permissions on the database. SELECT, INSERT, UPDATE and DELETE permissions should suffice. You may need to consult the MySQL documentation, your hosting provider's control panel documentation, or the documentation of any other utilities you are using for information on how to do this.
You might as well be explaining quantum mechanics to myself and most people. Complex terms are not explained, there are no screenshots, the writers make a lot of assumptions, and it is written badly.
As someone who has published a guide, over the past five years I have spent hundreds of hours attempting to rewrite dozens of articles here and other mediawiki sites to the best of my ability. But articles like this are nearly hopeless.
I don't know why it is that technical information on wikipedia and guides on mediawiki are so completely worthless. Why?
Maybe the mediawiki foundation can hire professional writers to volunteer to write these pages. Maybe the mediawiki can ask current authors to release their guides to mediawiki. All I know is this guide is awful, a reflection of most pages on this mediawiki.
I would rewrite it myself from the ground up, but I just spent 20 days trying to get help to upload multiple images to my wikia. My multiple requests for help here and IRC were left unanswered, and I finally ended up paying someone $65 to help me. I don't have the technical skills to write this without dedicated help.
In 2012 at mediawiki's ten year anniversary is there still not going to be a simple mediawiki installation guide that even 30% of the public can understand?
video tutorial of how to install mediawiki?
[edit]Note there maybe a good enough video found on youtube already:[1]
- I was thinking about this lately, maybe:
- installation videos,
- screenshots taken from those videos, and
- written tutorials corresponding to those screenshots
- added to this page would be the way to go.
- Even though I no longer need another mediawiki, I would be willing to work with an established trusted editor to create a mediawiki installation video, installing mediawiki on my site on my computer:
- An editor could log on through logmein onto my computer.
- I would turn on a screen video capturer
- We could discuss the video progress real time over Skype as this editor installs mediawiki. As a complete newbie, who has never installed mediawiki, I would be able to give them a newbies perspective on what is confusing and when to slow down the installation for the video.
- We would edit out the personal information and post it here or on youtube if there is a youtube extension on this site.
- I could then take screenshots from this mediawiki installation video to create a written tutorial.
- I have a domain name I am not using which expires in December which we can use and godaddy allows as many websites as I want on my account.
- Anyone interested? All you would have to do is have logmein and skype on your computer, and install mediawiki remotely, I will do the rest. Adamtheclown 19:10, 23 November 2010 (UTC)
Need updated instructions on moving a wiki from an old version to new, empty instance
[edit]Why? Because I think there are many people like me who want to upgrade an existing, working wiki, to gain benefit of new features, while leaving the existing, working instance undisturbed. I do NOT want to run the upgrade process on an old instance!
- There are many ways to do this, depending on your needs.--Jasper Deng (talk) 02:47, 14 April 2012 (UTC)
Import the database backup
[edit]The Import the database backup doesn't actually explain anything about importing the database from the backup made earlier. Saying "Consult the documentation to find out how it's done." is not helpful. The Possible methods given are just external links, none of which provide the necessary information.
How does one import the database backup, in each of the different methods?
Example:From the command line using mysql
[edit]After using mysqldump, (first check in LocalSettings.php for which character-set to specify) eg.
mysqldump --default-character-set=binary --user=foobar --password=barbaz olddb > dbdump.sql
Note: After using using mysqldump, you can't just use mysqlimport. Mysqlimport requires the data to be loaded in some delimited text format, eg. CSV, whereas the output of mysqldump is a script of SQL statements, in a plain text file.
To import dbdump.sql from the command line do:
mysql --silent --local --password=barbaz newdb < dbdump.sql
and afterwards in the maintenance sub-folder do:
php update.php
--Robkam (talk) 23:17, 9 December 2012 (UTC)
- Fixed. --Robkam (talk) 00:26, 23 December 2012 (UTC)
Help me blank page after migration
[edit]I can't understand where is the problem in this migration of my Mediawiki 1.23 from my old hosting to the newone Ovh.
- I have my wiki.sql backup and I Imported on my new database wikinew
- I uploaded via Ftp the directory mediawiki with all files from old hosting to the newone in the same position
- I changed the configuration on LocalSettings.php for the access to the newdatabase
But when I try to go to the Index page I have a blank page with only a twitter button. If I make page source I see this code:
"
<a href="https://twitter.com/........." class="twitter-follow-button" data-show-count="true" data-lang="it" data-size="large">Follow @......</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
<iframe src="http://www.facebook.com/plugins/likebox.php?href=http://www.facebook.com/...&width=300&colorscheme=light&show_faces="
What is wrong? Something with the permission files?
Help me!
Update: Now I wrote in localsettings.php this code
error_reporting( E_ALL ); ini_set( 'display_errors', 1 );
for give me an output error. Now in the main page I have some extension that are pointing to my old hosting.... I think that same extension are pointing to reference of the old hosting. For example in the main page I have this error Warning: include(/containers/30123/www/bancadati/extensions/Widgets/smarty_plugins/modifier.validate.php): failed to open stream: No such file or directory in /home/ioleggoljm/www/bancadati/extensions/Widgets/compiled_templates/f638d7e934e1b07e19ae457b51ab33154bb9769d.wi
How can modify the main pointer to the right place? .Htacces file? In my backup and sump db.sql there aren't links to my old hosting..... — Preceding unsigned comment added by Rafama82 (talk • contribs)
- Most likely the old paths are then stil coming from a cache, e.g. from the objectcache table in the database. Maybe purging the affected pages is also needed in order to make MediaWiki render them again... --2003:72:6D5E:1B00:A922:BD3E:3C85:8533 22:01, 23 July 2017 (UTC)
extensions vs includes
[edit]Make sure any extension directories have the correct permissions as well (e.g., if linux: chmod -R o=rx extensions "or" chmod -R o=rx includes)
"or"?? — Preceding unsigned comment added by Johnywhy (talk • contribs)
- I've removed the "includes" reference, it makes no sense here. --Ciencia Al Poder (talk) 11:39, 31 January 2021 (UTC)