# What upgrade first - NextCloudPi (from v1.52.1 to v1.52.2) or PHP (from 7.4.33 to 8.0)

**URL:** <https://help.nextcloud.com/t/what-upgrade-first-nextcloudpi-from-v1-52-1-to-v1-52-2-or-php-from-7-4-33-to-8-0/166565>\
**Category:** 📦 Appliances (Docker, Snappy, VM, NCP, AIO)\
**Tags:** update, ncp, php8\
**Created:** [July 20, 2023, 6:36pm UTC](https://help.nextcloud.com/t/what-upgrade-first-nextcloudpi-from-v1-52-1-to-v1-52-2-or-php-from-7-4-33-to-8-0/166565 "2023-07-20T18:36:38Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![FadeFx](https://help.nextcloud.com/user_avatar/help.nextcloud.com/fadefx/32/9921_2.png) [@FadeFx](https://help.nextcloud.com/u/FadeFx)\
**Post date:** [July 25, 2023, 11:17pm UTC](https://help.nextcloud.com/t/what-upgrade-first-nextcloudpi-from-v1-52-1-to-v1-52-2-or-php-from-7-4-33-to-8-0/166565/8 "2023-07-25T23:17:02Z")

</div>

So do you have a working backup to go back to?  
You might find the solution in tgis thread helpfull

> [@Nextcloud Cron suddenly is giving an error](https://help.nextcloud.com/t/nextcloud-cron-suddenly-is-giving-an-error/165494):
>
> Nextcloud version (eg, 20.0.5): 26.0.3 Operating system and version (eg, Ubuntu 20.04): Ubuntu 20.04 Apache or nginx version (eg, Apache 2.4.25): Apache/2.4.57 PHP version (eg, 7.4): PHP 8.1.20 The issue you are facing: Hi, Let me say that there is a forum entry for a similar error, but it is not the same, and the solution that is suggested also does not work for me. For most posts, I see blame SQL, but I had it checked, and all seem to work correctly with the DB. So, I am not sure what e…

Or even in my thread i have linked there…

What i did to get everything back working was a fresh install of NCP, set up everything and then restore the NC-Backup and update that to 26.0.1  
Then i had to manage to switch to the correct php version in apache2 and cli and i was save.

---

_[View the full topic](https://help.nextcloud.com/t/what-upgrade-first-nextcloudpi-from-v1-52-1-to-v1-52-2-or-php-from-7-4-33-to-8-0/166565)._
