Skip to main content

OJS Development & Nightly Builds

Branch: main on github.com/pkp/ojs
Stability: โš ๏ธ Unstable โ€” for testing and development only

This page explains how to set up and use the OJS development (nightly) build for testing upcoming features, contributing to PKP, and evaluating unreleased changes.

Never use on production

Development builds may contain unfinished features, breaking changes, and bugs that could corrupt your database or make your site inaccessible. Always use a dedicated test server with a test database.

What Is the OJS Development Build?โ€‹

The OJS main branch on GitHub is the live working codebase where new features are developed. It represents the code that will eventually become the next stable release (e.g., OJS 3.6). It:

  • Receives commits daily from PKP developers and contributors
  • May be in a broken state at any given time
  • Does not receive the same testing as stable releases
  • Is the only place to preview upcoming features before they ship

Setting Up a Development Environmentโ€‹

Prerequisitesโ€‹

RequirementVersion
PHP8.1 or 8.2 (recommended)
MySQL8.0+ or PostgreSQL 14+
Composer2.x
Node.js20.x LTS
npm10.x
Git2.x

Step 1 โ€” Clone the OJS Repository with Submodulesโ€‹

git clone --recurse-submodules https://github.com/pkp/ojs.git
cd ojs
Submodules

OJS uses Git submodules for lib/pkp (PKP-lib) and lib/ui-library. The --recurse-submodules flag clones all of them together.

Step 2 โ€” Install PHP Dependenciesโ€‹

composer install

Step 3 โ€” Install JavaScript Dependencies and Build UIโ€‹

npm install
npm run build

Step 4 โ€” Configureโ€‹

cp config.TEMPLATE.inc.php config.inc.php

Edit config.inc.php with your database credentials and file paths.

Step 5 โ€” Create the Databaseโ€‹

CREATE DATABASE ojs_dev CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
GRANT ALL PRIVILEGES ON ojs_dev.* TO 'ojsuser'@'localhost';

Step 6 โ€” Run the Web Installerโ€‹

Navigate to http://localhost/ojs/ and complete the web installer.

Step 7 โ€” (Optional) Load Test Dataโ€‹

PKP ships test fixtures for automated testing. To load sample data:

php tools/runAllTests.php

Or use the pkp-lib test tools:

cd lib/pkp
php tools/buildjs.php

Keeping a Dev Environment Updatedโ€‹

The main branch receives frequent commits. Update regularly:

git pull --recurse-submodules
composer install
npm install
npm run build
php tools/upgrade.php upgrade
php lib/pkp/tools/cacheClear.php

Running Automated Testsโ€‹

OJS has a suite of unit and integration tests. To run them:

# Unit tests
php lib/pkp/tools/runAllTests.php -u

# Integration tests (requires a configured test database)
php lib/pkp/tools/runAllTests.php -i

See the PKP Developer Documentation for full testing instructions.

Contributing to OJS Developmentโ€‹

Reporting Bugsโ€‹

  1. Check whether the bug exists in the latest stable release (if yes, also report it there)
  2. Check existing GitHub issues to avoid duplicates
  3. Open a new issue with:
    • OJS version (branch + commit hash: git log --oneline -1)
    • PHP and database versions
    • Steps to reproduce
    • Expected vs actual behaviour
    • Error logs if available

Submitting a Pull Requestโ€‹

  1. Fork github.com/pkp/ojs and github.com/pkp/pkp-lib
  2. Create a feature branch: git checkout -b feature/my-improvement
  3. Make changes following PKP coding standards
  4. Add or update tests
  5. Open a pull request against the main branch

Community Discussionโ€‹

Discuss upcoming features and development priorities on:

Tracking the Nightly Build Statusโ€‹

PKP runs continuous integration (CI) on every commit to main. You can see the current build status on:

A failing CI badge means the development build may be broken โ€” wait for a green build before setting up a new dev instance.

Useful Development Commandsโ€‹

# Check current commit
git log --oneline -5

# Clear all caches
php lib/pkp/tools/cacheClear.php

# Process the job queue manually
php lib/pkp/tools/jobs.php run

# Check for upgrade requirements
php tools/upgrade.php check

# Run the upgrade (after pulling new code)
php tools/upgrade.php upgrade

# Generate a new locale pot file (for translation contributors)
php lib/pkp/tools/buildLocale.php

Further Readingโ€‹