Skip to main content

Sandbox an Instance

When testing or debugging a production copy, you may want to sandbox the application to prevent it from sending emails, depositing data with third-party services, or performing other unwanted tasks.

Sandbox Mode (OJS 3.4+)โ€‹

Enable sandbox mode in the [general] section of config.inc.php:

sandbox = On

When sandbox mode is active:

  • All emails are routed to the server error log โ€” no emails are delivered.
  • Scheduled tasks are disabled.
  • Job execution is disabled (jobs are still queued, but not processed).
  • Crossref and DataCite deposits are disabled.
  • ORCID service interactions are disabled.
  • PayPal payments are disabled.
warning

Enabling sandbox mode disables job processing via the job runner, cron, and worker mechanisms. Any worker process already running before enabling sandbox mode must be stopped manually. See Job Runner for details.

Manual Sandboxing (Per Feature)โ€‹

As an alternative to global sandbox mode, you can sandbox individual features:

Route Emails to the Logโ€‹

[email]
default = log

No emails will be sent; all email output goes to the server error log.

Disable Scheduled Tasksโ€‹

Disable the built-in task runner:

[schedule]
task_runner = Off

If you also have a cron job configured to run scheduler.php, delete that cron job.

Disable the Job Runnerโ€‹

job_runner = Off

If using workers, stop those processes and disable Supervisor. If using a cron job for jobs, delete it.

Anonymize User Emailsโ€‹

danger

These SQL queries permanently alter your data. Take a backup first!

-- Set all user account emails to dummy addresses
UPDATE users SET email=CONCAT(username,'@mailinator.com');

-- Set all author emails to a dummy address
UPDATE authors SET email = 'test@mailinator.com';