ERPNext upgrade from v15 to v16
I'm going to explain how to upgrade Frappe and ERPNext from v15 to v16.
Take backup to be on safe side
Make sure all apps are clean and do not contain uncommitted changes
git statusUpgrade pyenv and install Python 3.14
cd ~/.pyenv && git pull && cd - pyenv install 3.14Alternatively, use
uvto install Python:uv python install 3.14Create a new virtual environment with Python 3.14
Move your old env folder to
env-archivein case anything goes wrong, so you can return to the original:cd /opt/bench/frappe-bench/ mv env env-archiveCreate a new virtual environment:
uv venv env --python 3.14 source env/bin/activateInstall MariaDB client libraries (downgrade if needed for compatibility)
sudo apt-get install -y \ libmariadb3=1:10.3.39-0ubuntu0.20.04.2 \ --allow-downgradesThen install dev headers:
sudo apt-get install -y \ libmariadb-dev \ libmariadb-dev-compat \ pkg-config \ python3-dev \ build-essentialVerify MariaDB config is available:
mysql_config --versionExport MySQL compiler flags so
mysqlclientbuilds correctlyexport MYSQLCLIENT_CFLAGS=$(mysql_config --cflags) export MYSQLCLIENT_LDFLAGS=$(mysql_config --libs)Install
frappe-benchpip install frappe-benchCheck Node.js version (v24 required for v16)
node --versionInstall and set Node.js 24 as default via
nvm:nvm install 24 nvm alias default 24 echo 'nvm use 24 --silent' >> ~/.bashrc source ~/.bashrcUpgrade Redis (v6.x or 7.x required)
Add the official Redis repository and install:
curl -fsSL https://packages.redis.io/gpg | sudo gpg --dearmor -o /usr/share/keyrings/redis-archive-keyring.gpg echo "deb [signed-by=/usr/share/keyrings/redis-archive-keyring.gpg] https://packages.redis.io/deb focal main" \ | sudo tee /etc/apt/sources.list.d/redis.list sudo apt-get update sudo apt-get install -y redisVerify the version and restart the service:
redis-server --version # should show 6.x or 7.x sudo systemctl restart redisRestart supervisor and confirm Redis is running on the bench port:
sudo supervisorctl restart all redis-cli -p 13000 info server | grep redis_versionSwitch all apps to version-16 branch and upgrade
bench switch-to-branch version-16 frappe --upgrade bench switch-to-branch version-16 erpnext --upgrade bench switch-to-branch version-16 hrms --upgrade bench switch-to-branch version-16 payments --upgrade bench switch-to-branch version-16 ecommerce_integrations --upgrade bench switch-to-branch version-16 webshop --upgradeRun bench update
bench update --reset --no-backupGet any additional custom apps on the v16 branch
bench get-app offsite_backups --branch version-16 bench get-app blog --branch version-16Install the new apps on your site
bench --site sitename install-app offsite_backups bench --site sitename install-app blogUpgrade SSL
sudo certbot --nginx
No comments yet. Login to start a new discussion Start a new discussion