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

  1. Log in to cPanel.
  2. Open File Manager and locate your OJS directory (public_html/ojs/ or similar).
  3. Select all files and Compress โ†’ ZIP.
  4. Download the ZIP file for safekeeping.

#๐Ÿ“Œ Backup OJS Database

  1. In cPanel, navigate to phpMyAdmin.
  2. Select your OJS database.
  3. Click Export โ†’ Quick Export โ†’ Go.
  4. Save the .sql file locally.

๐Ÿ”น Pro Tip: If anything goes wrong, these backups will save your day!

#๐Ÿ”น Step 2: Download the Latest OJS Version

#๐Ÿ”น Step 3: Enable Maintenance Mode

Before making changes, enable maintenance mode to prevent users from accessing the site.

#๐Ÿ”น Step 4: Upload & Replace Old Files

  1. Open cPanel โ†’ File Manager.
  2. Navigate to public_html/ojs/.
  3. Delete the following folders (but keep config.inc.php and public):
    cache
    lib
    locale
    plugins
    templates
    classes
    controllers
    pages
    
  4. Upload the new OJS ZIP file.
  5. Extract the ZIP inside the same directory.
  6. Restore your old config.inc.php from backup.
  7. Make sure the public folder remains untouched, as it contains uploaded journal files.

#๐Ÿ”น Step 5: Run the OJS Upgrade Script

  1. Open cPanel โ†’ Terminal (or use SSH if available).
  2. Navigate to your OJS directory:
    cd public_html/ojs
    
  3. 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

  1. Log in to your OJS Admin Panel.
  2. Go to Administration โ†’ System Information to check the version.
  3. 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!)

  1. Log in as an administrator.
  2. Go to Administration โ†’ Clear Data Caches.
  3. 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?

  1. Delete everything in your OJS directory (except public/).
  2. Extract your old backup ZIP.
  3. Restore your old database via phpMyAdmin.
  4. 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! ๐Ÿ˜Š