# \[Solved\] Nextcloud 23: How to switch PHP version to 8.0?

**URL:** <https://help.nextcloud.com/t/solved-nextcloud-23-how-to-switch-php-version-to-8-0/131650>\
**Category:** ℹ️ Support\
**Created:** [January 23, 2022, 10:14am UTC](https://help.nextcloud.com/t/solved-nextcloud-23-how-to-switch-php-version-to-8-0/131650 "2022-01-23T10:14:09Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![javito](https://help.nextcloud.com/user_avatar/help.nextcloud.com/javito/32/20340_2.png) [@javito](https://help.nextcloud.com/u/javito)\
**Post date:** [January 23, 2022, 10:14am UTC](https://help.nextcloud.com/t/solved-nextcloud-23-how-to-switch-php-version-to-8-0/131650/1 "2022-01-23T10:14:09Z")

</div>

Hi,

I installed my nextcloud on ubuntu server 20.04, using php8.0, but now for some reason it switch to php8.1, so when i try to run this command:

`sudo -u www-data php /var/www/nextcloud/occ maintenance:update:htaccess`

to remove the index.html after the nextcloud address, it gives me this error:

`This version of Nextcloud is not compatible with > PHP 8.0.<br/>You are currently running 8.1.1.root`

My question is, how do i switch my nextcloud back to work with php8.0? my server is running on apache btw

---

<div class="post-metadata">

**Author:** ![j-ed](https://help.nextcloud.com/user_avatar/help.nextcloud.com/j-ed/32/7281_2.png) [@j-ed](https://help.nextcloud.com/u/j-ed)\
**Post date:** [January 23, 2022, 2:41pm UTC](https://help.nextcloud.com/t/solved-nextcloud-23-how-to-switch-php-version-to-8-0/131650/2 "2022-01-23T14:41:44Z")

</div>

The answer can easily been found on the internet:

> **[How to Switch between Multiple PHP Version on Ubuntu](https://tecadmin.net/switch-between-multiple-php-version-on-ubuntu/)**
>
> How to Switch between PHP version on Ubuntu. How to Switch between Multiple PHP Version on Ubuntu 19.10, 18.04, 16.04 LTS systems.

---

<div class="post-metadata">

**Author:** ![javito](https://help.nextcloud.com/user_avatar/help.nextcloud.com/javito/32/20340_2.png) [@javito](https://help.nextcloud.com/u/javito)\
**Post date:** [January 23, 2022, 3:36pm UTC](https://help.nextcloud.com/t/solved-nextcloud-23-how-to-switch-php-version-to-8-0/131650/3 "2022-01-23T15:36:43Z")

</div>

Tyvm, that did it 🙂

---

<div class="post-metadata">

**Author:** ![wwe](https://help.nextcloud.com/user_avatar/help.nextcloud.com/wwe/32/72963_2.png) [@wwe](https://help.nextcloud.com/u/wwe)\
**Post date:** [December 13, 2024, 1:44pm UTC](https://help.nextcloud.com/t/solved-nextcloud-23-how-to-switch-php-version-to-8-0/131650/4 "2024-12-13T13:44:00Z")

</div>


