---
title: Charmhub | Deploy MediaWiki K8s using Charmhub - The Open Operator Collection
description: Deploy the latest version of MediaWiki K8s as a Kubernetes Operator on
  any cloud.
url: https://charmhub.io/mediawiki-k8s/actions
---

# MediaWiki K8s

[Kat Kuo](https://charmhub.io/publisher/kkuo "View all packages from Kat Kuo")

* [Kat Kuo](https://charmhub.io/publisher/kkuo "View all packages from Kat Kuo")

Platform:

1.46/edge bdbb93a3

```
juju deploy mediawiki-k8s --channel 1.46/edge
```

[Learn to deploy on juju >](https://juju.is/docs/juju/manage-applications)

* [create-and-promote](https://charmhub.io/mediawiki-k8s/actions#create-and-promote)
* [force-reconciliation](https://charmhub.io/mediawiki-k8s/actions#force-reconciliation)
* [rotate-secrets](https://charmhub.io/mediawiki-k8s/actions#rotate-secrets)
* [run-maintenance-script](https://charmhub.io/mediawiki-k8s/actions#run-maintenance-script)
* [set-maintenance-mode](https://charmhub.io/mediawiki-k8s/actions#set-maintenance-mode)
* [update-database](https://charmhub.io/mediawiki-k8s/actions#update-database)

[Learn about actions >](https://juju.is/docs/juju/action)

* create-and-promote

  Create a new MediaWiki user, or promote an existing one, and add it to the
  requested user groups. This exposes MediaWiki's `createAndPromote.php`
  maintenance script.

  Set `generate-password=true` to generate a secure password and return it
  in the action results; this is required when creating a new user. When
  `false` (the default), the user's password is left unchanged, which is
  only valid together with `force=true` to promote an existing user.

  This is typically used to bootstrap an initial administrator after
  deployment, for example by promoting a user to the `bureaucrat` and
  `sysop` groups.

  Params

  + bot
    boolean

    Add the account to the `bot` group.
  + bureaucrat
    boolean

    Add the account to the `bureaucrat` group.
  + custom-groups
    string

    Comma-separated list of groups to add the user to.
  + email
    string

    Sets the user's email address.
  + force
    boolean

    If the account exists already, just grant it rights or change the
    password. Without this, the action fails if the user already exists.
  + generate-password
    boolean

    Whether to generate a new secure password and return it in the action
    results. This is required when creating a new user. When `false` (the
    default), the user's password is left unchanged; this is only valid
    together with `force=true` to promote an existing user.
  + interface-admin
    boolean

    Add the account to the `interface-admin` group.
  + reason
    string

    Reason for account creation and user rights assignment to log to the
    wiki.
  + sysop
    boolean

    Add the account to the `sysop` group.
  + username
    string

    The username of the user to create or promote.

  Required

  username
* force-reconciliation

  Force a reconciliation run, bypassing redundancy checks.

  + composer update regardless of whether the composer configuration has changed
  + rebuild of the localisation cache

  Params

  + all-units
    boolean

    If true, request a reconciliation run on all units. Must be run on the leader unit.
* rotate-secrets

  Rotate secrets generated and managed by the MediaWiki charm. Must be
  run on the leader unit.
* run-maintenance-script

  Run an allowed MediaWiki maintenance script via `php maintenance/run.php`.

  Params

  + args
    string

    Space-separated additional arguments to pass to the maintenance
    script (e.g., `"--from 20000101000000 --to 21000101000000 --dry"`).
    Quoted values follow shell
    quoting rules.
  + script
    string

    The allowed maintenance script name to run (e.g., `showJobs`,
    `resetPageRandom`). Do not include the `.php` extension.

  Required

  script
* set-maintenance-mode

  Enable or disable application-wide maintenance mode. Must be run on the
  leader unit. Enabling maintenance mode alters the database to be read-only,
  sets MediaWiki to be read-only, and pauses background job workers on all units
  while preserving queued work.

  Maintenance mode does not guarantee that no writes will be made to Valkey/Redis.

  While in maintenance mode, certain user account actions such as logging out may be restricted.
  Consider rotating secrets following extended maintenance periods to invalidate existing sessions and
  authentication tokens.

  Maintenance mode and the update database action are mutually exclusive.

  Params

  + enabled
    boolean

    Whether maintenance mode should be enabled. When omitted, the action
    reports the current maintenance mode without changing it.
  + message
    string

    Optional message shown to users while maintenance mode is enabled.
* update-database

  Request an update to the MediaWiki database schema using the `update.php`
  maintenance script. This may be required after upgrading MediaWiki or
  installing extensions that modify the database schema.

  The charm will asynchronously request all units to enter a read-only mode
  before performing the database update to ensure data consistency.

  It is highly recommended to back up your database before running this
  action.
