Návod:Inštalácia MediaWiki

This page is a translated version of the page Manual:Installing MediaWiki and the translation is 24% complete.

This page covers steps to manually install MediaWiki, with additional configuration steps found at Manual:System_administration#Configuration.

MediaWiki installation requires basic familiarity with using a web host. It is easier if you have some experience with Apache (web server software), PHP and MySQL/MariaDB (database). Additional help is available at Project: Support desk.

The Appendices section below offers alternatives to manual installation. It also provides installation notes for specific system configurations.

If you are already running MediaWiki, see the Upgrade guide.

Check Local development quickstart for a quick way to install a local setup for development.

Kontrola požiadaviek na inštálaciu

Check that your system meets the installation requirements.

Make sure to also check the Vydania of the MediaWiki version that you plan to install.

Stiahnutie softvéru MediaWiki

Download the MediaWiki tar file from the official download page.

Generally, if you're using a production environment, you want to be running the latest stable release, which is MediaWiki 1.42.1.

Extrahovanie softvéru MediaWiki

The downloaded file is in .zip or in .tar.gz file format. You need to uncompress this archive file before use. You can uncompress the file locally (and then upload via FTP to the server) or directly on your server.

On Windows, uncompressing is usually done with software such as 7-Zip (free), WinZip, WinRAR or IZArc (free).

On Linux and Mac OS X, you can uncompress the file using the command: tar -xzvf mediawiki-*.tar.gz

If you uncompress the archive file while being the root/admin user, you may want to change file ownership afterwards, depending on your setup. On Linux systems, the command would be using chown as the following: chown -R <new_owner_user> <mediawiki_folder> More info: Manual:Security#File_permissions

Nahranie súborov na webový server

If you have not already uploaded the files to your web server (or copied, if your web server software runs locally on your localhost), do so now.

Upload the files to your web server's web directory either by:

  1. directly copying the unzipped folder or
  1. by using an FTP client such as FileZilla (Windows, OSX and Linux) or Cyberduck (Windows and OSX).
  1. by using software already provided by your hosting service, such as the cPanel File Manager

If your upload tool has a "change file names to lowercase" option, then you must disable this.

If you use the Apache HTTPD web server, the correct directory is specified in your httpd.conf file in the DocumentRoot directive. By default, this is /var/www/ or <apache-folder>/htdocs.

The exact location of the Apache server settings and directories file httpd.conf depends on your operating system. In Debian and Ubuntu, the file for Apache server settings and directories is /etc/apache2/apache2.conf. In Red Hat and Fedora, the file is /etc/httpd/conf/httpd.conf.

Rename the uploaded folder to whatever you would like to have in the URL. If your web server is running as http://localhost for example, renaming to /w/ directory would mean you would access your wiki at http://localhost/w/index.php.

Do not use /wiki/ if you want to set it up as a Short URL after running the installation script.

Nastavenie databáze

MediaWiki's installation script will ask you for a database name and database username, so MediaWiki can store the content of the wiki.

If you already have a database server and know the password for the "root" (admin) user, skip to the #Run the installation script section below.

If you don't know the password for the root user, for example if you are on a hosted server, you will have to create a new database before you run the MediaWiki installation script in the next section.

MariaDB/MySQL are the recommended databases. PostgreSQL and SQLite have limited support and should not be used unless there is a reason to. If you're unsure which database to choose, use MariaDB.

After finishing the database setup, continue with #Run the installation script below.


No further setup is required for SQLite if the pdo-sqlite module for PHP is installed on the system.

On the SQLite installation page, choose a database name (which can be anything) and the SQLite database directory. For the database directory, the installer will attempt to use a subdirectory outside of the document root and create it if needed. If this directory is not safe (for example, web-readable), change it manually to avoid making it accessible to everyone on the web.


Create the MariaDB/MySQL database and database user. There are several ways:

  • Use a control panel software offered by your Hosting service (example: PhpMyAdmin)
  • Use ssh to log into your host and type the commands below into a MySQL prompt. See the corresponding documentation of your hosting provider. Alternatively, contact your hosting provider to have them create an account for you.

The following commands create a database named my_wiki, a user named wikiuser, and set permissions for the user on that database.

CREATE USER 'wikiuser'@'localhost' IDENTIFIED BY 'database_password';
GRANT ALL PRIVILEGES ON my_wiki.* TO 'wikiuser'@'localhost' WITH GRANT OPTION;

Only if your database is not running on the same server as your web server, you need to give the appropriate web server hostname (mediawiki.example.com in the example below):

GRANT ALL PRIVILEGES ON my_wiki.* TO 'wikiuser'@'mediawiki.example.com' IDENTIFIED BY 'database_password';
  Upozornenie: MySQL/MariaDB logs all queries in a history file. It will include the database password for the user account. If this concerns you, delete and disable the .mysql_history file after running these queries by following the MySQL documentation.


If you are using PostgreSQL, you will need to either have a database and user created for you, or supply the name of a PostgreSQL user with "superuser" privileges to the configuration form. Often, this is the database user named postgres.

The following commands on a Linux command-line, as the postgres user, create a database user named wikiuser, and a database named my_wiki owned by the user named wikiuser.

 createuser -S -D -R -P -E wikiuser (then enter the database password)
 createdb -O wikiuser my_wiki

or as superuser (default postgres) execute the following commands at the database prompt:


Spustenie inštalačného skriptu

Next, complete the installation of MediaWiki by going to the URL of your MediaWiki installation in your web browser: Follow the instructions in Manual:Config script .

Ďalšie nastavenie


Once installed, make sure you stay up to date with releases, and keep your server secure!



Alternatívy k ručnej inštalácii

Manual installation is often the preferred method because it gives the user more control and insight into how their wiki is installed, making troubleshooting and maintenance easier. Automated processes, packages, bundles, and services all come with their own idiosyncrasies.

Namiesto ručnej inštalácie, môžete:

Hostingové služby, ktoré poskytujú automatickú inštaláciu aplikácií, ako je MediaWiki, môžu ponúkať zastaralé verzie alebo mať iné problémy. Ak narazíte na problémy, neznamená to, že nemôžete nainštalovať MediaWiki. To znamená, že by ste mali nainštalovať MediaWiki ručne.

Pozri tiež comparison of distribution options .

Pokyny pre konkrétne systémy

The pages listed on Manual:OS specific help give more detailed installation instructions aimed at specific systems.

However, by and large these per-system docs are less maintained and might not always be up to date. First consult Inštalácia MediaWiki (this page) before looking at per-system installation documentation.

Viac wiki (Wiki farmy)

Pozri Příručka:FAQ#Inštalácia a konfigurácia.

Import existujúcej wiki databáze

Pozri Příručka:FAQ#Inštalácia a konfigurácia.

Pozri tiež