# Installing MediaWiki manually

> Install MediaWiki by hand on your hosting account when you need a specific version or more control than Softaculous gives.

Source: https://helpcenter.ruachost.com/apps/manual-installations/installing-mediawiki-manually/

**MediaWiki** is the open‑source wiki platform that powers Wikipedia. While Softaculous can automate installation, you may sometimes need to install it manually for example, if you want a specific version or are working on an unmanaged server.

## Why Install Manually?

- Greater control over version selection.
- Works on unmanaged servers without cPanel/Softaculous.
- Useful for developers who want custom setups.

## Steps to Install MediaWiki Manually

1. **Download MediaWiki.**

   - Visit the official MediaWiki download page.
   - Download the latest `.tar.gz` file to your computer.
2. **Upload Files to Hosting Account.**

   - Use FTP or SCP to upload the `.tar.gz` file to your hosting account.
3. **Extract Files.**

   - Log in via SSH.
   - Navigate to the directory where you uploaded the file.
   - Run:

     ```bash
     tar xvzf mediawiki-x.y.z.tar.gz
     ```
   - Replace `x.y.z` with the version number.
4. **Move Files to Web Directory.**

   - Copy the extracted files into your web root:

     ```bash
     cp -R mediawiki-x.y.z/. ~/public_html
     ```
   - If you want MediaWiki in a subdirectory, adjust the destination path (e.g., `~/public_html/wiki`).
   - On unmanaged servers, the document root may be `/var/www/html`.
5. **Create a MySQL Database and User.**

   - In cPanel, use the **MySQL Database Wizard**.
   - Or, on unmanaged servers, create a database and user from the command line.
   - Note the database name, username, and password.
6. **Run the Web Installer.**

   - In your browser, go to your domain (e.g., `http://example.com`).
   - MediaWiki will detect missing configuration and prompt you to set up the wiki.
   - Provide:

     - Language preference.
     - Database details (host: `localhost`, name, user, password).
     - Wiki name.
     - Admin account credentials.
     - Optional extensions and settings.
7. **Save Configuration File.**

   - At the end of installation, MediaWiki generates a `LocalSettings.php` file.
   - Download it to your computer.
   - Upload it via FTP/SCP to the directory where MediaWiki is installed.
8. **Access Your Wiki.**

   - Visit your domain again.
   - Log in with the admin account you created.
   - Your wiki is now ready to use.

> **Note:**
- MediaWiki is compatible with all ruachost.com accounts.
- Always use strong admin and database passwords.
- Keep MediaWiki updated to prevent vulnerabilities.
- Consider enabling automatic backups for added protection.
