Free tools Windows power users keep installed
One-click scans. No signup required.
To run MediaWiki on a VPS, you need four working pieces: a web server, PHP with the extensions required by your exact MediaWiki release, a MariaDB or MySQL database, and shell access for installation and maintenance. On Ubuntu or Debian, the practical path is to install the LAMP-style packages, create a dedicated database account, run MediaWiki’s browser installer, place the generated LocalSettings.php in the wiki installation, then finish HTTPS, permissions, uploads, backups, and update scheduling.
Need a server to try this on? Antihost offers Linux VPS plans with NVMe storage, full root access and a 14-day free trial.
Version matching matters more than the operating-system label. MediaWiki’s current requirements page, accessed October 15, 2026, lists PHP 8.3.0 or newer and MariaDB 10.3.0 or newer or MySQL 5.7.0 or newer for the latest stable line. The current upstream branch INSTALL file instead states a MariaDB 10.11-or-newer baseline, so check the requirements for the exact release and branch you will deploy.
As an Amazon Associate I earn from qualifying purchases.
What a MediaWiki VPS installation contains
MediaWiki is a server application, not a program you install only in a browser. The web server accepts requests, PHP executes MediaWiki, and the database stores pages, revisions, accounts, permissions, and configuration data. Uploaded files are stored separately in the installation’s images directory unless you deliberately configure another storage system.
- Web server: Apache is the most direct fit for the Debian/Ubuntu package path. Nginx can also serve MediaWiki, but PHP integration and rewrite rules require a different configuration.
- PHP: Install the version supported by the selected MediaWiki release and all required extensions, not merely the PHP interpreter.
- Database: Use a dedicated MariaDB or MySQL database and application account. Do not use the database superuser for normal wiki traffic.
- Shell and privilege access: You need SSH access and a non-root administrator with
sudofor packages, services, permissions, backups, and maintenance scripts. - Persistent storage: Plan capacity for the database, uploaded media, backups, logs, and future growth. The requirements page does not define a universal disk or CPU minimum because workload varies widely.
Check release requirements before provisioning
Select the MediaWiki version first. Then read that release’s requirements page and, when applicable, its branch-specific INSTALL file. Do not assume that a package supplied by an older operating-system release is suitable simply because the package installs.
#1 Best Overall
| Component | Requirement or guidance | Qualification |
|---|---|---|
| PHP | PHP 8.3.0 minimum | Listed for the latest stable MediaWiki line on the requirements page accessed October 15, 2026. |
| Required PHP extensions | calendar, ctype, dom, fileinfo, iconv, intl, json, mbstring, openssl, sodium, xml, and xmlreader |
The exact list is release-sensitive. Confirm it against the release you selected. |
| Recommended PHP extensions | APCu and cURL | Recommended by the current requirements page, rather than universal hard requirements. |
| MariaDB | 10.3.0 or newer on the latest stable requirements line | The current branch INSTALL file states a 10.11-or-newer baseline; use the stricter branch requirement when it applies. |
| MySQL | 5.7.0 or newer on the latest stable requirements line | Verify support for the exact MediaWiki release before choosing MySQL. |
| Web server | Apache or another server able to invoke a compatible PHP version | Rewrite and PHP-handler configuration differs between servers. |
Write down the selected MediaWiki release, PHP version, database engine and version, hostname, and filesystem path before you begin. That record makes later upgrades and troubleshooting much safer.
Prepare the VPS securely
- Provision a supported Ubuntu or Debian image. Use a current distribution release that can provide the PHP and database versions required by your MediaWiki release.
- Create a non-root administrator. Test SSH login with that account and grant only the
sudoaccess needed for administration. Use SSH keys where possible and disable routine root login after confirming the alternate account works. - Apply operating-system updates.
sudo apt-get update sudo apt-get upgrade - Set the firewall policy. Permit SSH from your administration network and allow TCP ports 80 and 443 for web traffic. Do not expose the database port publicly when MediaWiki and the database run on the same VPS.
- Set time and hostname correctly. A stable hostname and correct system time help with certificates, logs, scheduled jobs, and account security.
Managed VPS hosting can reduce responsibility for host patching, monitoring, and backups, while an unmanaged VPS gives you more control but leaves those duties with you. Confirm exactly what the host includes before choosing between them.
Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minuteWindows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallInstall Apache, MariaDB, PHP, and extensions
For Debian or Ubuntu, the package family specified by MediaWiki’s requirements documentation is:
sudo apt-get install apache2 mariadb-server php php-intl php-mbstring php-apcu php-curl php-mysql php-xml
The package manager may resolve a distribution PHP version that is too old for your selected MediaWiki release. If php -v reports a version below the release minimum, stop and use a supported distribution or an approved PHP package source; do not proceed with an incompatible runtime.
Enable and start the services, then make them start automatically:
sudo systemctl enable --now apache2
sudo systemctl enable --now mariadb
sudo systemctl status apache2 --no-pager
sudo systemctl status mariadb --no-pager
Verify PHP and its loaded modules from the command line:
Recommended Free Tools
Rank #2
php -v
php -m
Compare the module list with the requirements for the exact MediaWiki release. The package names above cover the common Debian/Ubuntu path, but distribution packaging can split or rename extensions. Missing intl, mbstring, XML components, database support, or another required module will usually appear as an installer error.
Download and place MediaWiki
Download the official tarball for the release you selected, and verify its checksum when the release page publishes one. Keep the version number visible in your deployment notes. Extract the archive into the directory you intend Apache to serve; /var/www/mediawiki is a conventional example.
sudo mkdir -p /var/www
cd /tmp
# Download the official MediaWiki tarball for your selected release here.
tar -xzf mediawiki-VERSION.tar.gz
sudo mv mediawiki-VERSION /var/www/mediawiki
sudo find /var/www/mediawiki -maxdepth 1 -type f -printf '%fn' | head
Replace VERSION with the actual release identifier in the commands. Do not unpack an archive supplied by an unknown mirror, and do not mix files from different MediaWiki releases.
Create a dedicated database and account
Use MariaDB or MySQL locally on the VPS unless you have a deliberate reason to use a managed database. Start the database client as an administrator:
sudo mariadb
Create one database and one least-privilege account for this wiki. The following names are examples; choose a unique database name and a long, randomly generated password, then change the password in the command before execution:
CREATE DATABASE mediawiki CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
CREATE USER 'wiki_app'@'localhost' IDENTIFIED BY 'CHANGE_THIS_TO_A_LONG_RANDOM_SECRET';
GRANT ALL PRIVILEGES ON mediawiki.* TO 'wiki_app'@'localhost';
FLUSH PRIVILEGES;
EXIT;
Granting privileges on only mediawiki.* keeps the application account separate from other databases and from server-wide administration. Store the credential in a password manager, not in a public repository, ticket, shell history, or chat transcript.
Rank #3
If you choose MySQL instead, use its client and account-management syntax appropriate to the installed version, and confirm that the selected MediaWiki release supports that version before running the installer.
Configure Apache and open the installer
Create an Apache virtual host that points to the directory containing MediaWiki’s index.php. A minimal HTTP configuration looks like this:
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
<VirtualHost *:80>
ServerName wiki.example.net
DocumentRoot /var/www/mediawiki
<Directory /var/www/mediawiki>
AllowOverride All
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/mediawiki-error.log
CustomLog ${APACHE_LOG_DIR}/mediawiki-access.log combined
</VirtualHost>
Save the file as an Apache site definition, enable it, enable the rewrite module if you will use short URLs, and reload Apache:
sudo a2ensite mediawiki.conf
sudo a2enmod rewrite
sudo apachectl configtest
sudo systemctl reload apache2
Use the VPS hostname or domain that resolves to the server and visit it in a browser. MediaWiki should open its configuration wizard rather than display a directory listing or a PHP source file. If the browser downloads PHP text, the PHP handler is not configured correctly; stop there and fix Apache/PHP integration.
Run the MediaWiki browser installer
The wizard asks for the values that connect the application to the server:
- Choose the interface language and enter the wiki name.
- Create the first administrator account with a unique password. This account controls configuration and user rights, so do not reuse an email or password from another service.
- Select the database type, normally MariaDB or MySQL, then enter the database host, database name, database user, and database password created above. For a local database, the host is commonly
localhost. - Review the generated configuration and optional features such as uploads, email, and caching.
- Complete the installation and download the generated
LocalSettings.phpwhen prompted.
MediaWiki’s Debian/Ubuntu guide describes this file as the configuration generated by the wizard. Place it in the wiki installation location specified by the installer—normally the directory containing the running wiki’s index.php, or the parent directory identified by the guide for your layout. The web server must be able to read it, but visitors must never be able to download its PHP source.
The Tool Desk
Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Rank #4
If the browser cannot write the file directly, download it over the encrypted connection and copy it with SSH:
sudo install -o root -g www-data -m 0640 LocalSettings.php /var/www/mediawiki/LocalSettings.php
Keep a protected backup of this file. It contains database credentials and site settings, and losing it can make a restored database unusable until the configuration is recreated.
Set ownership, permissions, and upload policy
MediaWiki’s application code should normally be read-only to the web process. The images directory is the usual exception when local uploads are enabled.
Do these 3 things before closing this tab:
1Clear out junk files and repair common Windows errors2Scan for outdated or missing drivers - takes under a minute3Repair Windows errors before they cause bigger problemssudo chown -R root:www-data /var/www/mediawiki
sudo find /var/www/mediawiki -type d -exec chmod 0755 {} ;
sudo find /var/www/mediawiki -type f -exec chmod 0644 {} ;
sudo chmod 0640 /var/www/mediawiki/LocalSettings.php
sudo chown -R www-data:www-data /var/www/mediawiki/images
sudo find /var/www/mediawiki/images -type d -exec chmod 0755 {} ;
sudo find /var/www/mediawiki/images -type f -exec chmod 0644 {} ;
Adapt ownership to your distribution’s Apache account and to any deployment process that updates the code. Do not make the entire installation world-writable. If you do not need uploads, disable them in LocalSettings.php and keep the directory non-writable.
Enable only file types and sizes your community needs. Thumbnail generation may require additional image-processing dependencies; test thumbnails after installing those dependencies rather than assuming that upload success means image processing works.
Configure site identity, URLs, email, and caching
LocalSettings.php is the central configuration file. Make one change at a time and retain a known-good copy before editing.
Best Value
- Site identity and language: Set the name, language, timezone, logo, and contact details appropriate to the wiki.
- Canonical URL: Configure the public HTTPS hostname so links, redirects, and notifications use the intended address.
- Uploads: Keep uploads disabled until permissions, allowed extensions, quotas, and malware-handling procedures are decided.
- Email: Configure an authenticated mail path if users need password resets or notifications. Test delivery and check mail logs.
- Caching: Begin with the defaults, then add APCu or another supported cache after confirming the extension is loaded and the cache behavior suits your traffic.
- Extensions: Install extensions that match the MediaWiki release, enable them explicitly, and review their maintenance status before giving them access to user content.
- Short URLs: Configure Apache rewrite rules using the short-URL guidance for your exact MediaWiki version. A rewrite rule that is valid for one release or directory layout may be wrong for another.
Enable HTTPS and harden administration
Obtain a trusted certificate for the wiki hostname, configure Apache for TLS, and redirect HTTP to HTTPS. Use an ACME-compatible certificate client or your organization’s certificate process, then verify renewal before relying on it.
- Require strong, unique administrator passwords and protect administrator accounts with the strongest authentication options available to your release.
- Use SSH keys, restrict SSH exposure with firewall rules or an allowlist, and avoid administering the server as root.
- Apply operating-system, PHP, database, MediaWiki, and extension security updates promptly after testing.
- Keep database credentials and private keys outside version control and outside web-accessible directories.
- Review Apache, PHP, and MariaDB logs for repeated authentication failures, fatal errors, permission denials, and unusual upload activity.
Verify the finished installation
Run these checks before inviting users:
- Open the main page over HTTPS and confirm that the browser reports a valid certificate and that Apache shows no PHP errors.
- Create, edit, and delete a test page. Log out and back in to confirm sessions and permissions.
- Restart Apache and MariaDB, then verify that the wiki still loads and that a newly created edit persists.
- If uploads are enabled, test an allowed file type, an intentionally rejected type, and thumbnail creation. Confirm that uploaded files cannot execute as scripts.
- Run the maintenance or update command documented for your exact MediaWiki release from the command line, not through a browser. Current releases commonly use a command under
maintenance/run.php, but the release documentation is authoritative. - Check disk usage, database growth, certificate expiry, and log rotation.
Back up what a restore actually needs
A usable backup includes the database, LocalSettings.php, and the complete images directory. Backing up only the PHP code does not preserve page history or uploaded media.
sudo mariadb-dump --single-transaction mediawiki > /secure-backup/mediawiki.sql
sudo tar -czf /secure-backup/mediawiki-files.tar.gz /var/www/mediawiki/images /var/www/mediawiki/LocalSettings.php
Protect backup files as carefully as the live configuration because the SQL dump and LocalSettings.php can contain sensitive information. Store copies away from the VPS, retain multiple restore points, and perform a test restore on a separate system. Back up immediately before upgrades and before installing major extensions.
Plan updates and routine maintenance
Schedule maintenance rather than waiting for a failure. Track the MediaWiki release, PHP version, database version, extensions, Apache configuration, and backup status in one change record.
- Read the release notes and requirements for the target MediaWiki version.
- Take and verify database, configuration, and upload backups.
- Test the upgrade on a disposable VPS or staging copy when the wiki is important to a community.
- Put the wiki in the appropriate maintenance mode, deploy the code, and run the release’s documented command-line update script.
- Review extension compatibility, run a page edit and upload test, and inspect logs.
- Remove obsolete code only after the new release and backups have been verified.
Monitor Apache, PHP, and MariaDB logs and schedule periodic checks for failed jobs, full disks, expired certificates, and unattended security updates.
Choosing Apache or Nginx
| Decision factor | Apache | Nginx |
|---|---|---|
| Best fit for this guide | Directly matches the Debian/Ubuntu package path and common MediaWiki documentation. | Works, but requires a separate PHP-FPM and server-block design. |
| PHP integration | Use the distribution’s Apache PHP integration and verify loaded modules. | Configure PHP-FPM socket or TCP handling and pass only intended PHP requests. |
| Short URLs | Usually managed with rewrite rules and the selected directory’s .htaccess or virtual-host policy. |
Rewrite rules live in the Nginx server configuration; syntax and reload procedures differ. |
| Operational choice | Prefer when your team already maintains Apache or a hosting panel expects it. | Prefer when your team already standardizes on Nginx and can maintain PHP-FPM securely. |
Neither server is automatically faster or safer for every wiki. Familiar operations, correct PHP handling, tested rewrite rules, and timely updates matter more than the label.
Choosing MariaDB or MySQL
| Decision factor | MariaDB | MySQL |
|---|---|---|
| Version fit | The current stable requirements page lists 10.3.0 or newer; the current branch INSTALL file states 10.11 or newer. | The current stable requirements page lists 5.7.0 or newer. |
| Package availability | Commonly available from Debian/Ubuntu repositories alongside the documented package command. | May require a distribution package choice or separately managed repository. |
| Operations | Use the engine your administrators already know for monitoring, upgrades, replication, and backups. | Use the engine your organization already supports and that the chosen MediaWiki release explicitly accepts. |
| Backup practice | Test logical dumps and, for larger installations, your chosen physical or replicated backup design. | Apply the same principle: test restores rather than trusting that a completed dump is usable. |
Compatibility with the exact MediaWiki release is the deciding criterion. Do not select a database solely because it is familiar or bundled with a particular VPS image.
Quick Recap
Common failures and fixes
| Symptom | Likely cause | What to check |
|---|---|---|
| The installer reports a missing PHP module. | An extension is absent or the web server is using a different PHP version than the shell. | Compare php -v and php -m with the release requirements; restart Apache after package changes. |
| The database connection fails. | Wrong host, database name, account, password, socket, or unsupported database version. | Log in with the application account locally, confirm grants on mediawiki.*, and check MariaDB or MySQL logs. |
| Apache shows “Forbidden” or a blank error page. | Incorrect ownership, permissions, virtual-host path, or PHP fatal error. | Run apachectl configtest, inspect the site error log, and confirm Apache can read the installation and LocalSettings.php. |
| The browser downloads PHP source. | PHP is not connected to Apache correctly. | Fix the PHP handler before exposing the site; never leave source files downloadable. |
| Uploads fail with a permission error. | The web account cannot write to images, or uploads are disabled in configuration. |
Check the directory owner, mode, disk space, and upload settings without making the whole application writable. |
| Thumbnails do not appear. | Required image-processing tools or libraries are missing, or the web process cannot access the generated files. | Review thumbnail errors, install dependencies required by your chosen image formats, and retest with a small allowed file. |
| Short URLs return 404 errors. | Rewrite rules do not match the virtual-host path or the selected MediaWiki release. | Temporarily use the default URL form, then apply the release-specific short-URL instructions and reload Apache. |
| An upgrade stops with a schema or extension error. | The update script was skipped, interrupted, or an extension is incompatible. | Restore the pre-upgrade backup if necessary, read the target release notes, update or disable the incompatible extension, and rerun the documented maintenance command. |
A practical go-live checklist
- Exact MediaWiki, PHP, database, and extension versions are recorded and supported together.
- SSH keys, a non-root administrator, firewall rules, and HTTPS are working.
- Apache serves the intended directory and does not expose PHP source or directory listings.
- The dedicated database account works and has no unnecessary server-wide privileges.
LocalSettings.phpis readable by the web server, protected from download, and excluded from public version control.- Uploads are either disabled or restricted to tested types with working thumbnails.
- Database, configuration, and
imagesbackups run on a schedule and have passed a restore test. - Maintenance scripts, log review, certificate renewal, and security updates have named owners and a calendar schedule.
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

