Manual:Installing MediaWiki on XAMPP

From MediaWiki.org
Jump to navigation Jump to search
Installation guides
FreeBSD
GNU/Linux
- ALT Linux
- Arch Linux
- Damnsmalllinux
- Debian or Ubuntu
- Fedora
- Gentoo
- Mandriva
- Red Hat Enterprise Linux
- Slackware
Mac OS X
NetWare
Solaris
- Solaris 11 / opensolaris
- Solaris 10
Windows
- Windows Server 2016
on a stick
- Uniform Server
- XAMPP
Sourceforge.net

XAMPP can be used to get an environment for your MediaWiki installation up and running pretty quickly on your local machine or for a portable version on a USB drive if you use XAMPP Portable Light.

Getting Apache and MySQL running[edit]

  • Download the latest version for your platform (Linux, Windows, Mac OS X, or Solaris) from apachefriends.
  • Run the executable to extract it (you can extract it straight to C:\ if you want; it'll create an XAMPP subfolder and put all the files there) and answer the questions setup will ask you. Rename the folder to XAMPP. The minimum required components are Apache, MySQL, PHP and phpMyAdmin.
  • At the end, setup will give you an option to start the XAMPP control panel; select that option and it should pop up.
  • Check the checkboxes for Apache and MySQL and click on their respective Start buttons to start those.

Creating your database[edit]

  • Direct your browser to http://localhost/dashboard/
  • Go to phpMyAdmin at the top of the page
  • Sign in
  • Click Databases on the top bar.
  • Choose a name e.g. wikidb, select a collation e.g. if your wiki is using utf8 for its default charset then choose utf8_unicode_ci, and click Create)
  • Go into the new database and click on Privileges on the top bar.
  • Click Add a new user
  • Enter a name for the user (e.g., wikiuser), a password and for the hostname select Local/localhost. You can leave all the rest blank. You may want to write down your database name, user name, and password, because you'll need those to install MediaWiki.
  • Click the radio button for "Grant all privileges on database "xxx"
  • For Global privileges select check all
  • Click Go.

Editing PHP.ini[edit]

To make sure that the Apache HTTP server doesn't time out during the creation of the databases, modify the php.ini config file:

  1. Open the php.ini (can be found in the folder /path_to_xampp/php) file using your favorite text editor and find the following section and change to max_execution_time = 600.
  2. Save the file and restart Apache

Setting up MediaWiki[edit]

  • Download MediaWiki
  • Extract all your MediaWiki files and folders into a subfolder e.g. mywiki\ of the htdocs folder, wherever that is e.g. c:\xampp\htdocs\.
  • Direct your browser to the appropriate page, e.g. http://localhost/mywiki
  • Follow the MediaWiki installer's instructions, entering the database name, user name, and password you wrote down during the "creating your database" step above.
  • If you enabled the "security" option, then you need to Use superuser account. This means the MySQL root account and its password.
  • After MediaWiki tells you that everything went smoothly, save your LocalSettings.php file to your wiki's root folder, e.g. c:\xampp\htdocs\mywiki.
  • Direct your browser once again to the appropriate page, e.g. http://localhost/mywiki. It should take you to the Main Page of your new wiki. Congratulations! You're done.
  • Add any extra extensions your wiki is going to require.

Backing-up[edit]

Main article: Manual:Backing up a wiki

  • In SQL admin, go to the wiki database (typically wikidb), and click Export. Check the first box under "structure" (DROP TABLES), and check the "save as file" checkbox near the bottom. Click Go and save the file to the backup location.
  • Save a copy of the wiki folder, e.g. mywiki from c:\xampp\htdocs\mywiki to the backup location.

Restoring[edit]

Main article: Manual:Restoring a wiki from backup

  • Install XAMPP on the new server.
  • In SQL admin:
    • Create a new blank database with the default options and a name of your choice.
    • Import the database file you backed-up.
    • Change the SQL password of the root for that db (in privileges tab)
  • Copy the wiki folder from back-up into the new htdocs folder.
  • Change LocalSettings.php to reflect the new db username and password.

See also[edit]

External links[edit]