📚
Security

Securing an OJS Journal Site: Updates, File Storage and Bot Load

21.11.2026
← All articles

Open Journal Systems (OJS) is one of the most widely used free platforms for running scholarly journals. Submission, peer review, copyediting and publication all happen on one site. That popularity also makes it an attractive target: thousands of sites share the same structure, many have not been updated in years, and their administrators are busy with editorial work rather than server maintenance. The result can be journal pages redirecting to unrelated sites, spammy text showing up in search results, or a server slowing to a crawl under bot traffic.

Why OJS sites get compromised

Most problems come down to a system that was installed once and then forgotten. Picture an economics journal at a university in Samarkand still running a version installed in 2019, because the staff member who set it up moved on and nobody took over updates. Vulnerabilities in old versions become public over time, and automated scanners look for exactly these sites. The second cause is uploaded files: if the upload location is misconfigured, an attacker can upload a PHP script disguised as an image and run it through the browser. The third is weak passwords and forgotten administrator accounts.

Check your version and upgrade

Find your version in the system information page of the admin area or in dbscripts/xml/version.xml, then check on the PKP website which branches are currently supported. Versions that have reached end of life no longer receive security fixes. Always take a full backup of the database, the application files and the files directory first, and run the upgrade from the command line so large journals do not hit execution time limits.

mysqldump -u jurnal_user -p jurnal_db > jurnal_db_backup.sql
tar -czf ojs_files_backup.tar.gz /home/jurnal/ojs_files

php tools/upgrade.php check
php tools/upgrade.php upgrade

Keep config.inc.php, the public folder and your own plugins when copying new files over old ones. For major branch jumps, upgrade a test copy first, since old themes and plugins may not be compatible.

Keep files_dir out of the web root

The files_dir directory holds submitted manuscripts, reviews and internal documents, so it must never be reachable over the web. If it sits inside the site root, unpublished papers can leak through a direct URL.

/home/jurnal/public_html/      # OJS application
/home/jurnal/ojs_files/        # files_dir, not web accessible

; in config.inc.php
files_dir = /home/jurnal/ojs_files

The public folder has to be reachable because it serves logos and public files, but PHP must never execute there. On Apache, add this to public/.htaccess, and write an equivalent rule if Nginx serves the site directly:

<FilesMatch "\.(php|phtml|phar|php[0-9])$">
    Require all denied
</FilesMatch>

Also restrict config.inc.php, for example with chmod 640, because it contains the database password and secret keys.

Look for suspicious files

There should be no PHP files in public or cache, and recently changed application files deserve a close look:

find public/ cache/ -type f -name "*.php"
find . -type f -name "*.php" -mtime -7 -not -path "./cache/*"
grep -rl "eval(base64_decode" --include="*.php" .

Open the root .htaccess as well. A common OJS compromise adds rules that send search bots or mobile visitors to another site, so the administrator sees nothing wrong from their own computer. After cleaning, change all administrator passwords and the database password.

Accounts, fake registrations and roles

Former staff often keep journal manager rights for years. Review users at least once a year, remove elevated roles nobody needs, and keep the site administrator role to one or two people. Open registration also attracts bots that fill the database with fake profiles; the [captcha] section of config.inc.php lets you enable reCAPTCHA. Parameter names vary between versions, so follow the comments in the sample configuration shipped with yours.

Bot traffic and server stability

Journals have large archives and many PDFs, and some crawlers send dozens of requests per second, each hitting the database. On shared hosting this slows the journal and its neighbours. Blocking unneeded paths in robots.txt, limiting unwanted user agents and enabling caching help considerably. If traffic stays high, consider moving to a larger hosting plan or a VPS from the sayt.uz cabinet, where request rate limiting at server level also becomes possible.

User-agent: *
Disallow: /index.php/*/search
Disallow: /index.php/*/user/register
Disallow: /cache/

Plugins and ongoing maintenance

Install plugins only from the official plugin gallery or trusted developers, and delete the files of plugins you no longer use. Review error logs monthly, test that backups actually restore, and watch for new releases. Most journals are not broken by sophisticated attacks but by simple tasks left undone.

Related articles

🈲 Japanese SEO spam hack: strange pages from your site appear in Google 🐘 Critical PHP vulnerabilities: why you should not delay updating 🧪 Exposed phpinfo() and leftover test files: why they matter 🚨 How to Tell Your Hosting Account Has Been Hijacked: Signs and Steps
🌐 Language
🇺🇿 O⁠'zbek 🇺🇿 Özbek (yangi) 🇺🇿 Ўзбек 🇷🇺 Русский 🇬🇧 English ✓