---
title: "Discussion on \"Change PHP version for specific domains in cPanel\" | Hashnode"
description: "Discussion on \"Change PHP version for specific domains in cPanel\". Create a .htaccess in the root of the directory and append this line anywhere in the file.\nAddHandler application/x-httpd-alt-php74___lsphp .php\n\nHere 74 represents PHP version 7.4. If we want 8.1, it would be 81."
url: "https://hashnode.com/posts/change-php-version-for-specific-domains-in-cpanel/65b603ab7b1687e78bececbb"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Change PHP version for specific domains in cPanel](https://blog.shreekrishnalamichhane.com.np/change-php-version-for-specific-domains-in-cpanel?utm_source=hashnode&utm_medium=feed)

Create a .htaccess in the root of the directory and append this line anywhere in the file. AddHandler application/x-httpd-alt-php74\_\_\_lsphp .php Here 74 represents PHP version 7.4. If we want 8.1, it would be 81.

Jan 28, 2024 · 1 min read · blog.shreekrishnalamichhane.com.np  
Read the article

-   [#php](https://hashnode.com/tag/php)
-   [#cpanel](https://hashnode.com/tag/cpanel)
-   [#cpanelhosting](https://hashnode.com/tag/cpanelhosting)

## Written by

[Shree krishna lamichhane](https://hashnode.com/@uniksk)

@uniksk · Kathmandu, Nepal

  
[View profile](https://hashnode.com/@uniksk)

Student | Developer

I am CS Student currently perusing my bachelor degree. I love coding and implementing new logics. Aside from that I'm also a hardware lover and has great interest in IOT.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
