From mediawiki.org
Jump to navigation Jump to search
MediaWiki extensions manual
OOjs UI icon advanced.svg
Release status: beta
Implementation Parser extension , API
Description Export and import wiki pages
Author(s) Charlot Cobben (Sen-Saitalk)
Latest version (14/05/2021)
Compatibility policy Master maintains backward compatibility.
MediaWiki 1.31.1 +
PHP 7+
License GNU General Public License 2.0 only
Download BitBucket Download

Check usage and version matrix.

The WSPageSync extension allows for storing any wiki page content to a file on the server. Allowing for it be e.g. pushed to git or bitbucket and deployed on another server. So basically a way to transport content pages from one wiki to another.


  • Download and place the file(s) in a directory called WSPageSync in your extensions/ folder.
  • Add the following code at the bottom of your LocalSettings.php:
    $wgWSPageSync['filePath']=<path where to store synced files>
    wfLoadExtension( 'WSPageSync' );
  • Yes Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.


WSPageSync needs a full path to a directory to store the file that can be synced. e.g. $IP/wspsFiles

This can be set in the localsettings as  :

$wgWSPageSync['filePath'] =  $IP . '/wspsFiles';

Make sure the map has the correct rights for WSPageSync to store files.

It is also a good practice to store these files outside of your html folder. The content of pages are stored as raw wikitext and although you can store synced files in sub folders hidden within the root, they are potentially visible.


See also the Special page section below.

Basically, if you are a sysop, any page that can be synced will have a slider in the top menu. Click on it and it will turn blue indicating it is synced ( a notification will also be shown ). If the slider is already blue when you visit a page, it simply means the page is already synced and is being monitored for changes. Click the slider again for the page to be excluded from syncing.

User rights[edit]

sysop/admins are allowed to set a page to be synced. All other users have no such ability.

Special Page[edit]

When you visit Special:WSPageSync as a sysop or administrator you can use a Semantic Media Query to quickly add pages to be synced from that query.

The Special Page also shows all currently synced pages.

Finally you can also delete all synced pages from the Special page. This will not delete any pages in the Wiki, only the ones stored on the server by WSPageSync.

Maintenance script[edit]

In order to import previous exported pages there is a Maintenance script that can be run.


Additional text that will be added to the files imported History.
Your username. Will be added to the import log. [mandatory]
Use the modification date of the page as the timestamp for the edit.
Overwrite existing pages. If --use-timestamp is passed, this will only overwrite pages if the file has been modified since the page was last modified.
Place revisions in RecentChanges.


SERVER_NAME=<myservername> php extensions/WSPageSync/maintenance/WSps.maintenance.php --user 'Maintenance script' --rc --summary 'Fill database' --overwrite


We usually have a developing environment. When developing is done, we push our code to a repository. From there we create a Docker container and we deploy it to a Testing server. From there it is deployed to an Acceptance server and finally to production.

This is all fine with PHP and or JavaScript code, but we also create templates and widgets that are fundamental for it all to work properly.

With PageSync, we can now also push our Template, Widgets or any important Wiki page to our repository. When deploying a container, the WSPageSync maintenance script is automatically run and therefore also updating pages in the Wiki.

Version history[edit]


Sub special pages visual fix for most MW skins


Not using user received from API anymore. Added check to only show sync button if a page can actually be synced. ( introduced by SkinTemplateNavigation::Universal )


Fix for skins other than Chameleon


Delete un-used translations

Version -


Version 0.9.9

Initial Community release

See also[edit]

EMWCon Spring 2021  : There was a presentation on WSPageSync. The presentation file can be downloaded. You can also watch the presentation on Youtube.