Upgrade OJS 2.x to OJS 3.x #
To get the best performance from OJS software, the OJS upgrade should be done regularly on your OJS. The process of OJS upgrade is quite overwhelming, in this article we explain the process in detailed steps. By using the latest OJS version you will get an OJS site that is optimized, safe from various hacker attacks, and has the latest features from PKP.
In this article, we are upgrading using a method that we have tested in many previous journals with a careful step-by-step method to ensure that the upgrade results do not cause problems in the future. Using the latest version of OJS is very important to improve the performance of your journal and maximize all the features available on the OJS system. When upgrading OJS 2 to OJS 3, the process must be done very carefully with a complicated process that takes a lot of time, so before we continue the upgrade process on your journal, please prepare coffee and snacks :).
Why do you need to regularly upgrade your OJS? #
- Your OJS will be secured and prevent your OJS get hacked and minimize the threat that can cause losing your valuable data.
- You will not miss the new important improvement and bug fixes from the new version.
- The new features will be available to use by the user of your journal.
- Increase the trustability of your journal user that the journal is in the good management team
What are the benefits of doing an OJS upgrade? #
At the latest version of OJS, your Journal site will be maximized as a whole based on the features released by PKP, however, your Journal site must be tailored to your current Journal needs because there are several changes in terms of appearance and function in OJS 2 to OJS 3, PKP always innovates, also they continue to make improvements to the OJS software so that the software can work maximally.
Details of some of the new features at OJS 3:
- it is more responsive
- The version of OJS 2 will be deprecated in the future and is no longer supported
- OJS users more familiar with OJS 3
- OJS 3 already has a more complete OJS management feature
- more supported by 3rd party plugins
Details of some of the new features found in OJS (OJS 3.2.x):
- Submission deletion can delete author records in other submissions
- OJS3.2 Editorial activity stats counting submissions from removed journals
- Recommend by Author Plugin
- Support a “draft” option for reviews
- and more features detailed on this page
For detailed new features on OJS 3.3.x please visit our other post here
What’s a new feature in OJS 3.3
The features above, it is very helpful in managing journals as well as improving the features of your OJS that have been upgraded. However, if you need to use the features that have already been developed by the OJS team let us upgrade the OJS version from the previous version to the latest one. If you are curious about bugfix and the new features, you can check the list here.
Important: Before you initiate the upgrade process please backup your OJS sites and database to the external drive. We don’t provide any guarantee or responsibility of the result of the OJS upgrade with this tutorial. OJS upgrade should be done by a professional and experienced since failed upgrade can make your OJS and its database corrupted.
Things to consider before upgrading OJS 2 to OJS 3 :
There are several things that you should consider when upgrading OJS 2 to OJS 3 :
- The OJS 2 Theme or the design template you used before, may no longer support the latest OJS version
- Some plugins no longer support OJS 3, including Books for Review and Dataverse Please note that for you to take an inventory of your useful and frequently used plugins and features, you should check and trace details regarding their availability for newer OJS versions before you decide to upgrade.
- Some data is not included as a result of the OJS upgrade. We have listed the exclusion of data that be found here.
- The pop-up that shows the detail of each editorial team won’t be supported. The solution for this issue is to create a custom static page or custom design for each of the Editorial members including their affiliation.
How to Upgrade OJS2 – OJS 3 #
To upgrade OJS from OJS2 to OJS3, there are several things that must be considered, so that your journal can run well. Because based on the experience of our team, the process of upgrading OJS2 to OJS3 is quite time-consuming, so you have to be careful about the process. this, so as not to waste your time by doing the same thing over and over, in the upgrade process. In this article, openjournaltheme will try to provide step-by-step details of upgrading OJS 2 to OJS 3 in detail and is easy to understand.
Disclaimer :
OJS upgrade should be done by a professional that knows how to run a Linux command or make some modifications in SQL language, please make sure you have those competencies.
- We don’t take any responsibility if in the process of upgrading your OJS data, including its file gets corrupted.
- All the result of the OJS upgrade is solely is on your responsibility
What do you need to prepare? #
Before doing the OJS 2 Upgrade you have to prepare a few things so that all processes run very well.
Backup your current OJS files and Database #
The OJS 2 Upgrade process has a high probability of failure at the beginning of the upgrade process. so to make sure your OJS data is not corrupted, you must do a full backup of your OJS.
- OJS Files (Folder)
- Public (Folder)
- Current database backup
Note:
- Back up your OJS entirely before initiating the upgrade step.
- It is important to remember that the upgrade process of ojs 2 to OJS 3 must be done step by step.
- Make sure your OJS 2 is the latest version of OJS 2 which is: 2.4.8.5
- The step to upgrade your OJS is from OJS 2.4.8.5 -> 3.1.2-4 (in some case) -> 3.2.1-3 -> 3.3.10
- This article only covers one step of the upgrade the step should be repeated in each upgrade phase.
- If any error occurs in each step, you should repeat the process with the previous version of the database and journal files all over again. DO NOT REPEAT the upgrade process with the error resulting from OJS upgrade.
Prepare and Setup Staging Server for Upgrade Process #
To keep your site running, you have to do your OJS upgrade process on the Staging server, you need to set up a server with the following requirements:
- Ubuntu 18.04/20.04
- Apache2 or Nginx
- PHP with Multiple versions PHP 5.6, 7.0, 7.3, 7.4
- Increase the PHP max_execution_time and Apache/Nginx TimeOut set it 2 hours.
- Restart both your web server and PHP service When you have finished the setup, you can move your OJS 2 to the staging server for Upgrade Process.
- If your OJS is more than 5GB, you should create a staging server with a minimal 2 CPU and 4 GB RAM. The more OJS size that will handle in the process of upgrade needs bigger resources.
Initiate the Upgrade #
It is very recommended to do the upgrade for the big amount of data size using the CLI in the Linux System. By using this CLI system, you can get track of any error to help you to fix the problem. Upgrading OJS using a web-based system although is not recommended can be found here.
Steps to upgrade via CLI : #
1. Compress that folder file (files_dir) and public on ojs (which is used by OJS as a journal file).
Move all the files to the staging server
2. Back up the database and import it to the staging server. You can use the following command :
mysql create database name_your_db.3.x; use name_your_db.3.x; source /location/YOUR_FILE_SQL.sql;
3. After the first preparatory step is done, then make the settings for the config.inc.php file in the folder that was extracted earlier (name_journal_ojs_version) – Change the value of the installed = on to off
4. Edit the database connection parameters to mysqli and adjust the username, password, and database name that was created earlier
5. Enter the OJS folder that you created, then type this script on your terminal
php tools/upgrade.php upgrade
6. The upgrade process will take 15 minutes to 1 hour (depending on the database and OJS size). After the upgrade process is complete without any error information as shown below. If you have finished upgrading OJS 2.x to 3.x, the next step is to test all functions on the OJS systems.
7. After you have checked all the OJS functionality and find no issue, you can repeat the step to upgrade OJS to the later version.
Common Error when upgrading OJS : #
Error Illegal mix Collations Latin Swedish #
If when you upgrade an error may appear like the following:
*ERROR: Upgrade failed: DB: Illegal mix of collations (latin1_swedish_ci,IMPLICIT), (utf8mb4_general_ci,COERCIBLE), (utf8mb4_general_ci,COERCIBLE) for operation 'replace' Solution : Convert the entire table into collation to utf8_general_ci with the following query in the linux terminal
Solution : #
mysql --user=root --password="" --database=dbname -B -N -e "SHOW TABLES" | awk '{print "SET foreign_key_checks = 0; ALTER TABLE", $1, "CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci; SET foreign_key_checks = 1; "}'| mysql --user=root --password="" --database=dbname &
Duplicate entry #
When you upgrade OJS 2 you may encounter problems like this:
[code: Installer Installer::migrateUserAndAuthorNames] <h1>DB Error: Duplicate entry '11477-es_ES-preferredPublicName' 1.
Solution : #
TryRun this query on your MySql:
SELECT js.setting_value FROM journal_settings js JOIN submissions s ON (s.context_id = js.journal_id) JOIN authors a ON (s.submission_id = a.submission_id) WHERE setting_name='supportedLocales' AND a.author_id = 17;
Result After running the Query:
mysql> SELECT js.setting_value FROM journal_settings js JOIN submissions s ON (s.context_id = js.journal_id) JOIN authors a ON (s.submission_id = a.submission_id) WHERE setting_name='supportedLocales' AND a.author_id = 11477; +----------------------------------------------+ | setting_value | +----------------------------------------------+ | a:4:{i:0;s:5:"en_US";i:1;s:5:"es_ES";i:2;s:5:"es_ES";i:3;s:5:"pt_BR";} | +------------------------------------------------------------------------+ 1 row in set (0.00 sec)
As you can see on the following line:
How to remove the duplicate language settings in OJS #
- Login to your OJS admin page
- Open the Settings menu -> Website On the website page, then open the language menu. On that tab, please click check the language selection box, then click again
OJS Upgrade Services #
Yes, upgrading OJS is very time-consuming and needs special treatment since the error may come out on each phase of the OJS upgrade. If you do not have that resource, leave all matters related to your OJS problem with our team that has years of experience and handles various application needs of OJS, servers, security issues, and matters related to system implementation.
Openjournaltheme provides professional OJS upgrade service from OJS 2 to 3 version or upgrading from OJS 3 to the latest version. Most importantly our team will handle it with care and handled by an experienced team that has upgraded hundred of OJS. OpenJournalTheme has upgraded any OJS from our client with a 100% successful rate and without any problem. We provide the guarantee to make our customers satisfied with our work.
For Detail Our OJS Upgrade Service, Please visit our service detail OJS Upgrade 2.X to OJS 3.X latest OJS version openjournaltheme has a few standards in the process of upgrading the OJS site by implementing a staging process and Creating a backup of your current OJS to ensure that nothing goes wrong with your current OJS site. Click here to learn about our service.