---
title: Deploy MediaWiki with AI on Blossom
url: "/deploy/mediawiki/"
canonical_url: https://blossom88.com/deploy/mediawiki/
markdown_url: https://blossom88.com/deploy/mediawiki.md
summary: Start a team wiki and preserve its page history and uploaded files across
  deploys.
categories:
- deployment
- wiki
stack:
- PHP
- MediaWiki
- MySQL
---

# Deploy MediaWiki with AI on Blossom

[MediaWiki](https://www.mediawiki.org/) is the wiki software behind
Wikipedia. It keeps a revision history for each page, so a team can
check earlier versions as it updates its documentation.

## Ask Your Agent

> **Ask your AI agent:** Deploy MediaWiki on Blossom and help me write and update a team handbook page.
>
> Follow this guide: https://blossom88.com/deploy/mediawiki/

[Install the Blossom CLI and skill](https://docs.blossom88.com/learn/getting-started/install/) on your agent's machine and choose a Blossom Cloud Location when you log in. You can also use [Blossom BYOC (bring your own cloud)](https://docs.blossom88.com/learn/getting-started/choose-your-cloud/#blossom-byoc).

## How It Runs

| Part | Role | Where |
|---|---|---|
| MediaWiki | Serve the wiki and retain settings and uploaded media | Persistent Service behind Blossom Account access |
| MySQL | Keep page revisions and accounts | Blossom Managed Data |

## Deploy MediaWiki

Use the [official MediaWiki image](https://hub.docker.com/_/mediawiki)
with Blossom Managed MySQL. Create the first administrator while the
wiki is protected by Blossom Account access.

<details class="optional-reading" markdown="1">
<summary>Notes for your agent</summary>

Use MySQL 8.4 and set MediaWiki's server URL to its HTTPS Service
URL. Use the [MediaWiki installer](https://www.mediawiki.org/wiki/Manual:Install.php)
with temporary private files for passwords. Keep the generated settings
and uploads on a [Persistent Service Volume](/docs/apps/persistent-services/)
at `/data`. Load the saved settings and media directory on startup.

    blossom environment:deploy --id environment-100 --follow

</details>

## Write and Update a Page

Create a workshop handbook, upload a diagram, and update the handbook
to include it. Open the page history to see both revisions.

> **Ask your AI agent:** Help me create a handbook page, upload a small diagram, and add it in a second revision.

> Follow this guide: https://blossom88.com/deploy/mediawiki/



![Read the workshop handbook with its diagram.](/deploy/assets/images/mediawiki/workshop-handbook.webp)

## Reopen the History After an Update

Replace the web Container and open the page again. Check both saved
revisions and the uploaded image.

> **Ask your AI agent:** Replace the wiki's web Container and verify the two revisions and uploaded diagram are still there.

> Follow this guide: https://blossom88.com/deploy/mediawiki/



![Reopen the original revision history.](/deploy/assets/images/mediawiki/revision-history.webp)

## What You Get

A MediaWiki site with a handbook, its revision history, and an image
the team can open after deploys.

## What You Get

- A team wiki with an administrator
- A handbook page with two revisions and a diagram
- The same page history and image after Container replacement

Tested on Blossom: Both page revisions and the uploaded image survived Container replacement.
