# Cannot update to Mautic 5.0 because of older PHP version, but not correct!

**URL:** <https://forum.mautic.org/t/cannot-update-to-mautic-5-0-because-of-older-php-version-but-not-correct/30461>\
**Category:** Mautic 5 Install/Upgrade Support\
**Created:** [January 11, 2024, 8:17pm UTC](https://forum.mautic.org/t/cannot-update-to-mautic-5-0-because-of-older-php-version-but-not-correct/30461 "2024-01-11T20:17:32Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![dev570](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/dev570/32/6984_2.png) [@dev570](https://forum.mautic.org/u/dev570)\
**Post date:** [January 11, 2024, 8:17pm UTC](https://forum.mautic.org/t/cannot-update-to-mautic-5-0-because-of-older-php-version-but-not-correct/30461/1 "2024-01-11T20:17:33Z")

</div>

Cannot update to Mautic 5.0.1 using SSH because it says I have PHP 7.4, but this is not correct.

_One or more errors occurred while checking your environment prior to updating Mautic:_  
_- Your PHP version is too old or too new for Mautic to update. You are currently running PHP 7.4.33. Please make sure that your version is between 8.0.2 and 8.1.99._

But my php version is 8.0.30. Using LiteSpeed V8.1 server.

Any ideas?

---

<div class="post-metadata">

**Author:** ![mtic](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/mtic/32/627_2.png) [@mtic](https://forum.mautic.org/u/mtic)\
**Post date:** [January 12, 2024, 9:58am UTC](https://forum.mautic.org/t/cannot-update-to-mautic-5-0-because-of-older-php-version-but-not-correct/30461/2 "2024-01-12T09:58:41Z")

</div>

I had a similar issue once.  
For me there were two different php versions running on server and terminal and composer always threw this error.

Just an idea to check that

---

<div class="post-metadata">

**Author:** ![silavapi](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/silavapi/32/7424_2.png) [@silavapi](https://forum.mautic.org/u/silavapi)\
**Post date:** [January 12, 2024, 1:41pm UTC](https://forum.mautic.org/t/cannot-update-to-mautic-5-0-because-of-older-php-version-but-not-correct/30461/3 "2024-01-12T13:41:42Z")

</div>

Please check the PHP version you’re using for the command line, rather than what Mautic is reporting. It’s likely that the CLI version is 7.4.

Run

`php -v`

This should tell you.

---

<div class="post-metadata">

**Author:** ![dev570](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/dev570/32/6984_2.png) [@dev570](https://forum.mautic.org/u/dev570)\
**Post date:** [January 12, 2024, 1:58pm UTC](https://forum.mautic.org/t/cannot-update-to-mautic-5-0-because-of-older-php-version-but-not-correct/30461/4 "2024-01-12T13:58:32Z")

</div>

Thanks, this was the solution!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/1X/43c63600fe51440378769136903f1fa2a9a34102.png) [@system](https://forum.mautic.org/u/system)\
**Post date:** [January 14, 2024, 1:58am UTC](https://forum.mautic.org/t/cannot-update-to-mautic-5-0-because-of-older-php-version-but-not-correct/30461/5 "2024-01-14T01:58:56Z")

</div>

This topic was automatically closed 36 hours after the last reply. New replies are no longer allowed.
