Modificarea versiunii PHP pentru subdomenii și domeniile add-on din contul principal cPanel este un proces simplu. Urmează acest tutorial pentru a schimba versiunea PHP pe care o folosești pentru fiecare domeniu/subdomeniu separat.
Cum să schimbi versiunea PHP pentru subdomenii și domenii add-on în cPanel
1. Autentifică-te în cPanel
- Accesează cPanel introducând în browser adresa URL specifică:
http://yourdomain.com/cpanel
- Înlocuiește
yourdomain.com
cu domeniul tău. - Introdu numele de utilizator și parola pentru contul cPanel.
- Înlocuiește
2. Găsește secțiunea "Software"
- După ce te-ai logat, derulează în jos până găsești secțiunea Software.
- Click pe opțiunea Select PHP Version (Selectează versiunea PHP) sau uneori poate apărea ca MultiPHP Manager, în funcție de configurarea serverului.
3. Schimbarea versiunii PHP
- În funcție de instrumentul disponibil pe serverul tău, ai două posibilități:
Opțiunea 1: Select PHP Version
- Odată ce ai deschis Select PHP Version, vei vedea o listă de domenii și subdomenii pe care le poți gestiona.
- Selectează subdomeniul sau domeniul add-on pentru care dorești să schimbi versiunea PHP.
- Alege versiunea PHP dorită din meniul derulant (de exemplu, 7.4, 8.0, etc.).
- După ce ai selectat versiunea PHP dorită, apasă pe Set as current (Setează ca versiune curentă).
Opțiunea 2: MultiPHP Manager
- Dacă vezi opțiunea MultiPHP Manager, click pe ea.
- În MultiPHP Manager, vei vedea o listă de domenii și subdomenii din contul tău cPanel.
- Bifează casetele pentru subdomeniul sau domeniul add-on pentru care vrei să schimbi versiunea PHP.
- După ce ai selectat domeniile dorite, alege versiunea PHP dorită din meniul derulant din partea dreaptă a paginii (de exemplu, 7.4, 8.0, 8.1 etc.).
- Click pe butonul Apply (Aplică) pentru a salva modificările.
4. Verificarea modificărilor
- După ce ai schimbat versiunea PHP, poți verifica dacă modificările s-au aplicat corect.
- Creează un fișier PHP pe subdomeniul sau domeniul respectiv, de exemplu
phpinfo.php
, care conține următorul cod:phpinfo();
- Accesează acest fișier în browser (de exemplu,
http://subdomeniu.yourdomain.com/phpinfo.php
) și vei vedea informațiile despre versiunea PHP activă pe acel subdomeniu/domeniu.
- Accesează acest fișier în browser (de exemplu,
Sfaturi suplimentare:
- Compatibilitatea versiunii PHP: Înainte de a schimba versiunea PHP, asigură-te că site-ul și aplicațiile tale sunt compatibile cu versiunea PHP pe care o alegi.
- Testare: Dacă ai un site live, e bine să testezi schimbarea versiunii PHP pe un mediu de test înainte de a face schimbarea pe site-ul principal.