How to Set the PHP Version per Domain using cPanel? (Video)

Managing the PHP version for individual domains or subdomains on your hosting account is a common task to ensure compatibility and optimal performance for your websites. Here’s a step-by-step guide to set the PHP version per domain using cPanel.


Step 1: Log in to cPanel

  1. Open your web browser and go to your cPanel login page (e.g., https://yourdomain.com:2083).
  2. Enter your username and password, then click Log in.

Step 2: Locate the PHP Selector Tool

  1. In the cPanel dashboard, scroll to the Software section.
  2. Click on MultiPHP Manager (or Select PHP Version, depending on your hosting provider).

Step 3: Select the Domain

  1. In the MultiPHP Manager interface, you will see a list of all domains and subdomains associated with your hosting account.
  2. Locate the domain or subdomain for which you want to set the PHP version.

Step 4: Choose the PHP Version

  1. Check the box next to the domain or subdomain you want to update.
  2. In the PHP Version dropdown menu, select the desired PHP version (e.g., 8.1, 7.4, etc.).
    • The version you choose should be compatible with the scripts or CMS (e.g., WordPress, Joomla) used on the domain.
  3. Click Apply to save the changes.

Step 5: Verify the Change

  1. To ensure the PHP version has been reset, create a phpinfo.php file in the root directory of your domain:
    • Go to File Manager in cPanel.
    • Create a file named phpinfo.php in the public_html folder.
    • Add the following code to the file:

                    <?php

                      phpinfo();

                     ?>

    • Save the file and visit https://yourdomain.com/phpinfo.php in your browser.

    2. Delete the phpinfo.php file after verification to prevent exposing sensitive server information.


Tips for Setting PHP Versions Per Domain

  • Website Compatibility: Test your website and scripts after changing the PHP version to ensure they function correctly.
  • Upgrade as Needed: Use the latest PHP version your website supports for better performance and security.
  • Backup Your Website: Always create a backup before making changes to avoid any potential data loss.

By following these steps, you can easily set the PHP version for specific domains or subdomains using cPanel, ensuring each site runs smoothly and efficiently.

 
  • 102 أعضاء وجدوا هذه المقالة مفيدة
هل كانت المقالة مفيدة ؟

مقالات مشابهة

كيفية تنزيل النسخ الاحتياطية باستخدام cPanel؟ (فيديو)

تحميل نسخة احتياطية باستخدام cPanel عملية بسيطة. إليك دليل خطوة بخطوة لمساعدتك في تنزيل...

كيفية إنشاء نسخة احتياطية من Sapna وإرسالها إلى خادم FTP؟ (فيديو)

إنشاء نسخة احتياطية من cPanel وإرسالها إلى خادم FTP هي عملية بسيطة. إليك الطريقة التي يمكنك بها...

كيفية استعادة النسخة الاحتياطية في cPanel؟ (فيديو)

استعادة النسخ الاحتياطي في cPanel بسيطة وتتيح لك استرجاع بيانات موقع الويب الخاص بك...

كيفية تغيير كلمة مرور حساب في cPanel؟ (فيديو)

تغيير كلمة مرور الحساب في cPanel بسيط ويمكن القيام به في خطوات سريعة. اتبع التعليمات...

كيفية تحديث معلومات الاتصال الخاصة بك في لوحة التحكم cPanel؟ (فيديو)

تحديث معلومات الاتصال الخاصة بك في cPanel أمر مهم لضمان تلقيك إشعارات حيوية حول حسابك،...