# Upgrade gitea or SQL first and does the order matter?

**URL:** <https://forum.gitea.com/t/upgrade-gitea-or-sql-first-and-does-the-order-matter/9368>\
**Category:** Install/Maintain/Configure\
**Created:** [June 26, 2024, 2:44pm UTC](https://forum.gitea.com/t/upgrade-gitea-or-sql-first-and-does-the-order-matter/9368 "2024-06-26T14:44:50Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jahway603](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/jahway603/32/4187_2.png) [@jahway603](https://forum.gitea.com/u/jahway603)\
**Post date:** [June 26, 2024, 2:44pm UTC](https://forum.gitea.com/t/upgrade-gitea-or-sql-first-and-does-the-order-matter/9368/1 "2024-06-26T14:44:50Z")

</div>

I have a server running a really old version of both gitea and postgresql. My question is: Does it matter which one I upgrade first or it doesn’t matter?

---

<div class="post-metadata">

**Author:** ![techknowlogick](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/techknowlogick/32/4706_2.png) [@techknowlogick](https://forum.gitea.com/u/techknowlogick)\
**Post date:** [June 28, 2024, 3:07am UTC](https://forum.gitea.com/t/upgrade-gitea-or-sql-first-and-does-the-order-matter/9368/2 "2024-06-28T03:07:14Z")

</div>

Probably pgsql first, and then Gitea. Although I’d recommend stopping them both first, backing everything up, upgrading the db, upgrading Gitea, starting the DB, then starting Gitea.
