Open Journal System
Upgrading OJS on cPanel A Step by Step Guide
Upgrading Open Journal Systems (OJS) on cPanel isn't as straightforward as one might hope. Even for a minor or patch-level update, multiple steps need careful execution.
Surprisingly, I couldnโt find a well-documented guide covering the complete upgrade process. Not pointing fingersโperhaps the community is more focused on development rather than documentation!
I manage two OJS-based journal websites, and recently, I faced quite a challenge upgrading OJS on cPanel. After navigating through the hurdles, I decided to document my experience to help others in the same boat.
Upgrading OJS: From 3.3.0.8 to 3.4.0.8
#My Hosting Environment
Iโm using a shared cPanel hosting from Namecheap. While shared hosting is convenient, it also comes with some limitations, making upgrades more complex.
Step-by-Step OJS Upgrade Guide
Upgrading OJS on cPanel requires careful preparation to avoid downtime or data loss. Follow this structured approach:
#๐น Step 1: Backup Everything (Non-Negotiable!)
Before making any changes, create a full backup of your OJS files and database.
#๐ Backup OJS Files
- Log in to cPanel.
- Open File Manager and locate your OJS directory (
public_html/ojs/
or similar). - Select all files and Compress โ ZIP.
- Download the ZIP file for safekeeping.
#๐ Backup OJS Database
- In cPanel, navigate to phpMyAdmin.
- Select your OJS database.
- Click Export โ Quick Export โ Go.
- Save the
.sql
file locally.
๐น Pro Tip: If anything goes wrong, these backups will save your day!
#๐น Step 2: Download the Latest OJS Version
- Visit the official OJS download page:
๐ https://pkp.sfu.ca/ojs/download/ - Download the latest stable OJS ZIP file.
#๐น Step 3: Enable Maintenance Mode
Before making changes, enable maintenance mode to prevent users from accessing the site.
- How? Follow this guide:
How to Enable Maintenance Mode in OJS
#๐น Step 4: Upload & Replace Old Files
- Open cPanel โ File Manager.
- Navigate to
public_html/ojs/
. - Delete the following folders (but keep
config.inc.php
andpublic
):cache lib locale plugins templates classes controllers pages
- Upload the new OJS ZIP file.
- Extract the ZIP inside the same directory.
- Restore your old
config.inc.php
from backup. - Make sure the
public
folder remains untouched, as it contains uploaded journal files.
#๐น Step 5: Run the OJS Upgrade Script
- Open cPanel โ Terminal (or use SSH if available).
- Navigate to your OJS directory:
cd public_html/ojs
- Run the upgrade command:
php tools/upgrade.php upgrade
- If successful, youโll see "Upgrade Complete".
- If errors appear, check the error_log in cPanel.
#๐น Step 6: Verify the Upgrade
- Log in to your OJS Admin Panel.
- Go to Administration โ System Information to check the version.
- Open a few journal pages to ensure everything is working.
#๐น Step 7: Disable Maintenance Mode
- Follow Step 3 in reverse to re-enable public access.
#๐น Step 8: Clear Cache (Final Step!)
- Log in as an administrator.
- Go to Administration โ Clear Data Caches.
- Click Clear Template Cache and Clear Data Cache.
๐ก Plan B: What If Something Goes Wrong?
If the upgrade doesnโt work, donโt panic! Roll back to your backup.
#How to Restore Your Old OJS Version?
- Delete everything in your OJS directory (except
public/
). - Extract your old backup ZIP.
- Restore your old database via phpMyAdmin.
- Your site should be back to its previous state.
๐ Thatโs it! Your OJS is upgraded successfully.
Final Thoughts
๐น Upgrading OJS on cPanel shared hosting can be tricky, but with proper backups and step-by-step execution, it's manageable.
๐น If you encounter error logs, check them in cPanel โ File Manager โ error_log
.
๐น Need help? Drop a comment or reach outโIโd be happy to assist!
๐ Congratulations! Your OJS upgrade is complete. ๐
If you found this guide helpful, feel free to share it with others! ๐