Home Featured How to Upgrade ERPNext from Version 14 to Version 15

How to Upgrade ERPNext from Version 14 to Version 15

by karani

Introduction

Ensuring your ERPNext system stays current is crucial for tapping into the latest features, improvements, and security enhancements. In this guide, we’ll steer you through the upgrade process from ERPNext version 14 to the more advanced version 15. The good news is that there’s no need to update your Ubuntu OS from version 22.04 to 23. However, it’s imperative to have Node.js version 18 or higher installed—a key step in this upgrade journey. Follow these straightforward instructions to maintain the agility and optimization of your ERP system, guaranteeing it operates at its peak efficiency.

Prerequisites: Prepare for a Smooth Upgrade

  1. Backup Your Database: Before embarking on the upgrade journey, safeguard your data by creating a recent backup of your ERPNext database. This precautionary step ensures you can restore your system in the event of any unforeseen issues during the upgrade process.
  2. Check Custom Apps: If your ERPNext instance includes custom apps or scripts, it’s essential to verify their compatibility with ERPNext version 15. Take a moment to review the release notes and documentation for any specific instructions or considerations regarding customizations.

Navigate to Bench Directory

cd /path/to/your/frappe-bench

Update Node

This is very important. Ensure you have node 18 and later. In this guide, we will switch from node version 16 to version 18.

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash source ~/.bashrc nvm install 18 nvm alias default 18

Switch to Version 15

bench switch-to-branch version-15 frappe erpnext --upgrade

Run a migrate

The bench migrate command is crucial for managing database migrations in the frappe framework. Database migrations are changes to the structure of the database schema, and these changes may include creating new tables, modifying existing tables, or adding new fields to existing tables. The bench migrate command facilitates the application of these changes to ensure that your database schema stays synchronized with the codebase.

bench --site [YOUR SITE] migrate

Restart the supervisor

Supervisor is commonly used to manage the Gunicorn processes, which are responsible for serving the web application. When you make changes to your Frappe or ERPNext setup, such as updating the codebase or applying migrations, restarting the relevant processes is often necessary to apply these changes.

sudo supervisorctl restart all

Verify the upgrade

bench version

This command should return version 15.X. Sometimes the update may be scheduled and therefore take a couple of minuted to complete. Ensure a seamless transition by checking your ERPNext site for proper functionality. Be vigilant for any errors during the upgrade process.

Additional Information

Sometimes you may get the below popup after the upgrade:

Failed to get method for command erpnext.e_commerce.doctype.e_commerce_settings.e_commerce_settings.is_cart_enabled with No module named ‘erpnext.e_commerce.doctype.e_commerce_settings.e_commerce_settings’

This can be resolved by running the below command:

bench retry-upgrade

You may also like