The OJStat upgrade process is almost the same as the installation process. It's just that, in the upgrade process, you don't need to create a new database. Following are the steps to Upgrade OJStat. The OJStat Upgrade process is divided into three steps:

  1. Backing up
  2. Uploading OJStat
  3. Upgrade

Pay close attention to the steps to make sure that everything works as expected.

Backing Up

To avoid things that are not desirable, then you should do a backup of the database and old OJStat files.

  1. Go to the PHPMyAdmin menu in your cPanel and do an Export Database for your OJStat database. Save the .sql file you downloaded.
  2. Go to the file manager where you host the OJStat files then compress all the files and download them to the local computer.

Uploading OJStat

You can now delete all files in the ojstat folder which is in the root of the OJS directory.

  1. Upload the latest OJStat into the ojstat folder.
  2. Extract the OJStat file (.zip). You may delete this file after you extract it.
  3. Open the auth/db.php file and synchronize its contents with the old OJStat auth/db.php file that you previously backed up.
  4. Save the file changes and close the file.

Now, you can access your OJStat URL. By default, you will find a Setup button next to the Login and Reset buttons.

Upgrade

You can see the Setup button in the login form. Click the button to take you to the OJStat Setup page. If you upgraded from OJStat version 1.0 to 1.1, you will have to access the URL manually by adding /setup to your OJStat URL. I highly recommend you to upgrade to the latest version of OJStat.

  1. I assume that you are now on the OJStat Setup page. You can view your OJStat database information on this page.
  2. Pay attention to the instructions provided. If you find a sign in red then you should click on the Fresh Installation button. Meanwhile, if you find a sign with a yellow color, then you just need to click on the Upgrade button.
  3. You can find these buttons at the bottom of the Setup page.
  4. What is meant by Fresh Installation is that it requires the creation of tables in the available OJStat database. This does not mean that you have to create a new database. For major upgrades, Fresh Installation is required as the upgrade process.
  5. Click Fresh Installation then click Refresh and Click Upgrade.
  6. The upgrade process is declared complete if all the signs are green.
  7. You can now close the Setup options by editing the JSON file in your OJStat folder. For OJStat under version 1.3, it is the version.json file. Meanwhile, for OJStat version 1.3 and up, it is the package.json file which is in the json folder. Change the "setup" value from true to false, save the file changes, and close the json file.
  8. Return to the Setup page and click the Login button.

Some upgrades may not require database operations so only updating the core OJStat files is required. I will include that information for each upgrade which you can view on the Downloads page.