# "Undefined class constant" Error after upgrade

**URL:** <https://forum.mautic.org/t/undefined-class-constant-error-after-upgrade/33131>\
**Category:** Product Support\
**Created:** [August 14, 2024, 9:18am UTC](https://forum.mautic.org/t/undefined-class-constant-error-after-upgrade/33131 "2024-08-14T09:18:42Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![mzagmajster](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/mzagmajster/32/687_2.png) [@mzagmajster](https://forum.mautic.org/u/mzagmajster)\
**Post date:** [August 18, 2024, 11:48am UTC](https://forum.mautic.org/t/undefined-class-constant-error-after-upgrade/33131/3 "2024-08-18T11:48:57Z")

</div>

While Joey’s solution should work, the issue seems to only be in the source code.

Perhaps this procedure is even better in this case:

- backup current mautic source somewhere on the server
- check the version of mautic, go to Mautic GH release page and download fresh source on to the server
- extract the source on the server
- put config and & media folders from backup to this fresh mautic source
- clear the cache

No need to install it on another server or re-run migrations.

Best, M.

---

_[View the full topic](https://forum.mautic.org/t/undefined-class-constant-error-after-upgrade/33131)._
