Skip to main content

Import & Export

There are many ways to import and export data with OJS. Most tools require administrator or manager privileges. Many tools are also available from the command line.

REST APIโ€‹

You can read and write some data via the OJS REST API. Refer to the API documentation bundled with your OJS release, accessible at /api/v1/_docs on your installation. The API documentation is also available in the PKP developer reference.

Native XMLโ€‹

note

The Native XML format changes with each major version. You cannot import an XML file generated with OJS 3.4 into a 3.5 install.

The Native XML format is the recommended way to import and export submissions in OJS. It includes submissions, their metadata, and all submission files โ€” and in OJS, issue metadata as well.

To import or export submissions:

  1. Login as an administrator or manager.
  2. Click Tools in the main navigation.
  3. Click Native XML Plugin.
  4. Click Import or Export and follow the steps.

Creating a Native XML File for Importโ€‹

Before importing, create an XML file that matches the schema:

SchemaSampleDescription
native.xsd (base)โ€”Base schema
native.xsd (OJS)sample.xmlIssues and articles

Tips for creating import files:

  • Use <!DOCTYPE ...> to define the document type.
  • Encode the file as UTF-8.
  • Use date format YYYY-MM-DD.
  • Use <embed> (base64-encoded file data) or <href> (file URL) to include files.
  • Wrap HTML in <![CDATA[]]> tags.
  • Include translated fields using multiple locale entries.
  • Validate your XML with a tool like Liquid XML Editor or Oxygen XML before importing.

For very large XML files (due to embedded files), use the CLI tools instead of the web UI.

QuickSubmitโ€‹

The QuickSubmit plugin is useful for importing a small amount of back content. It provides a UI for manually adding a submission, assigning it to an issue, and publishing it.

OAIโ€‹

Every journal produces a public OAI (Open Archives Initiative) endpoint:

https://yoursite.com/index.php/journalpath/oai

To enable or disable the OAI endpoint, change the oai setting in config.inc.php.

Usersโ€‹

CSV Exportโ€‹

Download user account data as CSV:

  1. Login as an administrator or manager.
  2. Go to Statistics โ†’ Users.
  3. Click Export.
  4. Select the roles to include.
  5. Click Export.

This may take several minutes for large user databases.

Users XMLโ€‹

note

The Users XML format changes with each major version. You cannot import an XML file generated with OJS 3.4 into a 3.5 install.

The Users XML format imports and exports users and their roles.

To import or export users:

  1. Login as an administrator or manager.
  2. Click Tools in the main navigation.
  3. Click Users XML Plugin.
  4. Click Import or Export and follow the steps.

Creating a Users XML File for Importโ€‹

SchemaSample
pkp-users.xsdsample.xml (OJS)

Tips:

  • <givenname> and <email> are mandatory.
  • Use <password must_change="true"> to require a password change on first login.
  • If a username or email already exists in the system, the existing account is used and new roles are assigned to it.
  • Validate your XML before importing.

Export to Indexing Servicesโ€‹

Plugins are available to export published metadata to indexing services such as Crossref, PubMed, DataCite, DOAJ, and mEDRA. Some deposit directly; others generate an export file.

Install and configure these plugins at Settings โ†’ Website โ†’ Plugins.

CLI Toolsโ€‹

Most import/export plugins can be run from the command line:

# List available import/export plugins
php tools/importExport.php list

# Get usage for a specific plugin
php tools/importExport.php NativeImportExportPlugin usage

# Example: export all articles from a journal
php tools/importExport.php NativeImportExportPlugin export /tmp/output.xml myjournal articles

Troubleshootingโ€‹

"I imported my XML file and I'm getting an error." Validate your XML file with an editor like Liquid XML Editor or Oxygen XML before importing.

"When I click Export I get a blank page." Check your server's error log for more details.