Extension:Push/manual

From mediawiki.org

This is the user manual for the Push extension.

Push enables you to push pages from one wiki (which we'll call the source wiki) to another wiki (the target wiki). This is useful when working with a combination of private and public wikis, or you just want to migrate over some content from one wiki to another. Only the last revision of a page is pushed to the target wiki(s), and added there as the latest revision. This means that anything removed from the page on the source wiki before the push will not show up in the history of the target wiki. It also means that any changes made on the target wiki(s) page will be "hidden" by the new revision, but still accessible via the pages history.

The push extension provides 2 interfaces to push pages. One is geared towards pushing single pages, the other is useful for pushing groups of pages. This manual will introduce you to the two and then list some common problems you might encounter, and how to deal with them.

The tab interface[edit]

The primary interface to push pages from one wiki (the source) to another (the target) can be accessed as a tab, in much the same way as the editing and page history interfaces.

Getting there[edit]

Depending on the configuration and skin of the wiki, this tab can either show up in the action dropdown menu of the page, as shown in the below screenshot, or as an actual tab next to the "View history" one.

The push tab can be accessed via the page action dropdown menu.

By default only registered (and email confirmed) users can push pages, so you will likely need to log in for the tab to show up. It's possible that you need additional privileges on some wikis, for which you should contact your wikis administrators.

The interface[edit]

The interface consists of a table that lists the target wikis you can push to and a list of options underneath it.

The push tab interface.

Each target wiki has an associated button that allows pushing the page to that wiki. In case there are multiple target wikis, a "Push all" button will also show up at the bottom of the table, which enables you to push the page to all target wikis with one click. After the page is loaded Push will poll the target wikis for useful info on the current state of the page there and display it under a link to the page. This makes it easy to assert if the page already exists there, and if so, who last edited it, and when. You can use the link to the page on the target wiki to further inspect the page if needed, or view the result after doing the push.

You can choose to also push embedded templates by checking the "Include templates" option, if not already done so. This makes sure the used templates exist and are up to date on the target wiki(s).

Similarly you can indicate that embedded files should be transfered during the push. Note that if the files are big, it can take a while before the push completes.


Bulk pushing[edit]

Push enables you to push multiple pages (bulk push) in one go to one or more target wiki(s) via the Special:Push page.

Getting there[edit]

Like with the push tab, you need the correct privileges to use the bulk pushing facilities. This means you will most likely need to login for the links to the page to show up and might need an account in a special user group on some wikis.

One way to get to the bulk push page is via list of special pages, which is usually linked to from the sidebar menu.

The link to the list of special pages in the sidebar.

In this list, you'll find "push pages" under the "Page tools" section.

The link to the bulk push page in the list of special pages.

The name of the page is Special:Push, so it can be accessed by replacing the page name by it in the URL of any other page on your wiki. If you are frequently accessing the bulk push page, or any other special page, and are comfortable with it, this approach is faster than going via the list of special pages.

  • http://mywiki.com/wiki/Main_Page → http://mywiki.com/wiki/Special:Push
  • http://mywiki.com/w/index.php?title=Main_Page → http://mywiki.com/w/index.php?title=Special:Push

The interface[edit]

The interface is centred around a big text field in which you can specify the pages you want to push, one page name per line. This is similar to how Special:Export, MediaWikis built-in export facility, works. Directly underneath the text field are the options to include embedded files and templates, which behave identically to the ones found in the push tab interface. At the bottom of the interface is a list of target wikis you can push to. Check or uncheck the checkboxes to indicate which wikis should be pushed to.

The bulk push interface Special:Push.

Adding pages[edit]

You can specify the pages by typing their names line per line or copying in a list you obtained elsewhere. Like on Special:Export, you can also choose to add pages based on category or namespace. Simply type the name of the category or select the namespace, and hit the corresponding "Add" button.

Pages can easily be added by category or namespace.

Doing the push[edit]

The push process can be started by hitting the "Push pages" button. When doing this, the page will reload and show what pages it's pushing. As the process goes along, a list of pushed pages is build up, keeping track of potential problems per page. If there is such a problem, the line will be colored dark red, if the push is successful, it'll turn grey and state "Title: Push completed".

Pages being pushed on Special:Push.

When all pages have been pushed, this will be indicated by an entry "Push completed".

Special:Push done with pushing pages.


Dealing with common problems[edit]

Pushing pages between two distinct wikis, that can have different versions and configurations over a network can fail for a number of reasons. This section contains a number of common problems, caused by either misconfiguration, network issues such as timeouts or simple misunderstanding of how the extension works, and their solutions.

The push tab does not show up[edit]

  • Make sure you are logged in.
  • If it never showed up before, you might still need to get the privileges to push from your wikis administrator.

No targets to push to[edit]

If you get a message equivalent to "There are no targets to push to. Please add some to your LocalSettings.php file.", it means that the Push extension is not configured on the local wiki yet. This can only be done by an administrator.

Authentication failed[edit]

If you get an error stating that authentication failed, it means that either the local configuration for the push user on the target wiki is not correct, or that the remote user simply does not have sufficient privileges to create pages or upload files. Both these problems can only be solved by an administrator. Steps to take:

  • Make the $egPushLoginUsers and $egPushLoginPasswords entries for the wiki the pushing fails to are correct. Copy them and try to login into the target wiki.
  • Once logged in into the target wiki, try to edit a page, try to create one, and try to upload a file. If one of these fails, give the push user sufficient privileges.

Captcha error[edit]

If you get "Could not push to 'target wiki name' due to captcha.", it means that there is a privilege problem for the push user on the target wiki. This user is getting a captcha when either editing or creating a page, or uploading a file. Give the push user sufficient privileges so it doesn't get a captcha anymore. This can only be done by administrators.