Skip to main content

Operations

Guide: publishing pages to devwiki and mpwiki

Guide: publishing pages to devwiki/mpwiki

Section Operations
Updated 19.05.2026

Overview#

This guide describes the current publishing workflow for:

  • devwiki -> DB mp_dev
  • mpwiki -> DB mp_wiki

Both wiki sites now use the new custom wiki engine instead of MediaWiki maintenance scripts. SSH host, port, and login remain the same, but article publishing now writes UTF-8 Markdown documents into the new DB-backed repository flow.

Where the workflow lives#

  • wikiworkflow/wikitools - shared publisher and rename utilities
  • wikiworkflow/devwiki - devwiki article templates
  • wikiworkflow/mpwiki - mpwiki article templates

Prerequisites#

SSH access#

Publishing still uses SSH to reach the web server.

Recommended setup:

  • configure an SSH key
  • set MP_WIKI_SSH_KEY to the private-key path

Optional connection settings:

  • MP_WIKI_SSH_HOST
  • MP_WIKI_SSH_PORT
  • MP_WIKI_SSH_USER
  • MP_WIKI_SSH_CLIENT
  • MP_WIKI_PUTTY_SESSION
  • MP_WIKI_SSH_BIND_ADDRESS
  • MP_WIKI_CONNECT_TIMEOUT
  • MP_WIKI_RETRY_COUNT
  • MP_WIKI_RETRY_DELAY

If your machine has multiple adapters and SSH accidentally goes through a VPN or overlay network, set MP_WIKI_SSH_BIND_ADDRESS to the local Wi-Fi or LAN IPv4 address that should be used as the source address for ssh/scp.

Practical local example with OpenSSH#

If you publish manually from a workstation where SSH must leave through a specific local adapter, use a command like this:

$env:MP_WIKI_SSH_CLIENT = "openssh"
$env:MP_WIKI_SSH_BIND_ADDRESS = "192.168.0.129"
$env:MP_WIKI_SSH_USER = "root"
powershell -ExecutionPolicy Bypass -File "D:\Domains\marketpawns\wikiworkflow\devwiki\publish_wiki_publishing_guide_devwiki.ps1" -InteractiveLogin

Important:

  • 192.168.0.129 is only an example of a local workstation IPv4 address
  • replace it with the current IPv4 address of your Wi-Fi or LAN adapter
  • this is not the server IP; it is the source address that local OpenSSH should bind to

To inspect the current local IPv4 addresses:

Get-NetIPAddress -AddressFamily IPv4 | Select-Object InterfaceAlias,IPAddress

Interactive local mode with PuTTY#

If you publish manually from your own PowerShell window and prefer a normal password prompt, switch the transport to PuTTY tools:

$env:MP_WIKI_SSH_CLIENT = "putty"
$env:MP_WIKI_PUTTY_SESSION = "DigitalOcean"
powershell -ExecutionPolicy Bypass -File "D:\Domains\marketpawns\wikiworkflow\devwiki\publish_wiki_publishing_guide_devwiki.ps1" -InteractiveLogin

In this mode plink/pscp ask for the SSH password interactively and can reuse a saved PuTTY session.

If your workstation needs MP_WIKI_SSH_BIND_ADDRESS to force the correct network adapter, prefer openssh for the actual upload because PuTTY tools do not support source-address pinning.

Encoding#

The new wiki engine expects UTF-8 Markdown.

Legacy cp1251 settings are no longer required for article publishing. If old automation still passes -ServerInputEncoding cp1251, the publisher will continue in UTF-8 mode and print a compatibility warning.

How publishing works now#

The shared publisher no longer calls MediaWiki maintenance/edit.php.

Instead it:

  1. prepares a UTF-8 Markdown article document
  2. uploads it to the server via SSH/SCP
  3. runs the new wiki repository layer in CLI mode
  4. creates the article if it does not exist yet
  5. saves the new Markdown version directly into the DB-backed wiki engine

If a section does not exist yet, the publisher creates it automatically.

Two supported source formats#

Option 1: body-only file plus metadata parameters#

This is the simplest mode.

You provide a body file and pass title, section, and summary from the command line:

powershell -ExecutionPolicy Bypass -File "D:\Domains\marketpawns\wikiworkflow\wikitools\publish_wiki_page.ps1" `
  -Wiki devwiki `
  -Title "Guide: posting to wiki" `
  -Section "Operations" `
  -SourcePath "C:\path\to\article-body.md" `
  -Summary "Add the current publishing guide"

In this mode the script wraps the body into a valid Markdown document with front matter.

Option 2: full Markdown document with front matter#

If the source file already starts with front matter:

---
slug: Example_Page
title: Example Page
section: Operations
summary: Example summary
...
---

then the publisher sends it as-is and does not regenerate metadata.

Template article workflow#

Template scripts remain the recommended option for repeatable wiki pages.

Examples:

  • wikiworkflow/devwiki/publish_models_archive_article_devwiki.ps1
  • wikiworkflow/mpwiki/publish_models_archiving_article_mpwiki.ps1

They keep the article body in the repository, generate a temporary Markdown file, and call the shared publisher once.

Slugs, titles, and URLs#

The current deployed wiki runtime uses MediaWiki-compatible slugs with underscores, for example Guide:_publishing_pages_to_devwiki_and_mpwiki.

The publisher derives the slug from the title when needed:

  • spaces and hyphens become underscores
  • repeated separators are normalized
  • the final public URL stays stable as /index.php/Guide:_publishing_pages_to_devwiki_and_mpwiki

Renaming an existing page#

Use wikiworkflow/wikitools/move_wiki_page.ps1.

The new rename flow updates the article title and slug through the DB-backed repository layer and keeps the previous slug as a redirect automatically.

Example:

powershell -ExecutionPolicy Bypass -File "D:\Domains\marketpawns\wikiworkflow\wikitools\move_wiki_page.ps1" `
  -Wiki mpwiki `
  -OldTitle "Old Title" `
  -NewTitle "New Title" `
  -Reason "Normalize article title"

Troubleshooting#

SSH timeout or connection errors#

The publisher already retries failed SCP and SSH operations.

If timeouts continue:

  • verify server access on the expected SSH port
  • increase MP_WIKI_CONNECT_TIMEOUT
  • increase MP_WIKI_RETRY_COUNT
  • increase MP_WIKI_RETRY_DELAY

Validation errors while publishing#

The new engine validates article front matter before publishing.

Typical reasons:

  • missing title, section, summary, or slug
  • invalid source_url
  • broken related_slugs
  • invalid updated_at format

Password prompts#

If you want fully automated publication, configure MP_WIKI_SSH_KEY.

If you publish manually and want a password prompt, use MP_WIKI_SSH_CLIENT=putty together with -InteractiveLogin.

If manual publication also needs MP_WIKI_SSH_BIND_ADDRESS, keep MP_WIKI_SSH_CLIENT=openssh and run the script from your own terminal so OpenSSH can prompt for the password interactively.

Continue Reading

Related Articles