Frappe guide on how to update Frappe apps and bench cli without getting stuck on frappe is updating page

frappe bench and app update

Frappe guide on updating Frappe apps and bench cli without any error

We’ve all been there. You run a command thinking it’s a quick refresh. Five minutes later? Your terminal is bleeding red error messages, and your localhost is trapped in the purgatory of the "Frappe is updating" screen. 😱

It’s a classic "I just wanted to code!" moment that turns into a 2-hour debugging session.

In the Frappe Framework ecosystem, bench update is arguably the most misunderstood command. Whether you're trying to update the CLI tool, fetch the latest features, or just sync your team's code, using the wrong command—especially in a multi-developer setup—is a recipe for disaster.

Let's fix that. Today, we turn you from a "Bench Guesser" into a "Bench Master." 🥋


⚡ TLC: The Cheat Sheet (Too Long; Can't Wait)

In a rush? Here is your survival kit. Bookmark this table. 🔖

Your Goal 🎯The Command 💻What it Actually Does 🧠
Update EVERYTHINGbench update🧨 Pulls, builds, and patches ALL apps. Risky in teams.
Update ONE Appbench update --apps [app_name]🎯 Pulls & patches ONLY the specific app (e.g., frappe).
Update Bench Toolpip install --upgrade frappe-bench🔧 Updates the global CLI tool (not your site code).
Fix "Stuck" Sitebench --site [site] set-config maintenance_mode 0🚑 Forces the site out of maintenance mode.

🚫 1. The "Big Red Button": Updating All Apps

When you type bench update and hit enter, you are triggering a Full Sync. It feels safe, but it’s actually the "Nuclear Option." ☢️

What happens under the hood:

  1. 📸 Snapshot: It attempts to backup your sites.
  2. ⬇️ Git Pull: It runs git pull for every single app (Frappe, ERPNext, Custom Apps, etc.).
  3. 📦 Dependencies: It tries to install new Python (pip) and Node (yarn/npm) packages.
  4. 🏗️ Build & Patch: It compiles JS/CSS assets and runs database migrations.

⚠️ The Risk

In a team environment, bench update pulls everyone's latest changes.

  • Did your colleague push broken code to the develop branch of a custom app? Now it's your broken code.
  • Is one specific app failing to build? The whole process halts.

Pro Tip: Treat bench update like a production deployment command, not a daily sync tool.


🎯 2. The "Surgical Strike": Updating Specific Apps

Smart developers use a scalpel, not a hammer. If you only need the latest bug fixes from the frappe core or a specific app, don't update everything. Stay isolated. Stay safe.

Run this instead:

bench update --apps frappe

Why is this better?

  • ✅ Focus: It only touches the code for the app you specified.
  • ⚡ Speed: It skips checking dependencies for every other app.
  • 🛡️ Safety: It prevents your environment from breaking due to unrelated "Work in Progress" code in other apps.

🚑 3. "Help! My site is stuck!" (The Resurrection Fix)

The nightmare scenario: A bench update crashes halfway through. You panic, refresh your browser, and see this:

"The site is currently being updated..."

Technically, your site is stuck in Maintenance Mode. To prevent data corruption, Bench locks the site during updates. If the process dies (internet cut out, error thrown), Bench "forgets" to unlock the door.

🔓 The Fix

You don't need to reinstall. You just need to force the door open. Run this command:

bench --site [your-site-name] set-config maintenance_mode 0

(Replace [your-site-name] with your actual site URL, e.g., site1.local)

Afterward, it's good practice to run these two commands to ensure your assets are clean:

bench build
bench migrate

Now, refresh your page. You're back in business! 🚀


🔧 4. The "Missing Link": Updating the Bench CLI

This confuses everyone. You see a message in your terminal:

⚠️ A new version of Bench is available!

So you run bench update... and the message is still there. Why? 😡

Because bench (the CLI tool) and frappe (the framework apps) are different things!

  • The Apps live inside your folder.
  • The Tool lives in your global Python environment.

To update the tool itself, you need pip:

pip install --upgrade frappe-bench

Note: Run this from your system's normal terminal (or wherever you installed bench originally), not necessarily inside your virtual environment.


🧠 What we learned from mistakes

Don't let muscle memory ruin your morning.

  • Use pip to update the bench cli.
  • Use --apps to update specific app.
  • Use maintenance_mode 0 to rescue your site.

Happy coding! 💻✨

Related posts