fervor [>]CODING & CURIOSITY
FERVOR LEARNING SYSTEMTUTORIALS
← IT & networking

IT & networking / 3 MIN READ

Changing ini.php Settings

Modifying PHP configuration settings via ini.php

From the original Fervor library. Examples may use older package versions.

Changing settings in the php.ini file using cPanel and WHM is a common task for many web administrators. Let’s walk through it step-by-step with a sprinkle of humor to keep it interesting.

Step-by-Step Guide: Changing php.ini Settings via cPanel and WHM

Step 1: Access WHM (Web Host Manager)

  1. Log in to WHM:
    • Open your web browser and enter your WHM URL (typically something like https://yourdomain.com:2087).
    • Log in with your root or reseller account credentials. If you don’t know these, you might need to chat with your hosting provider.

Step 2: Navigate to MultiPHP INI Editor

  1. Find the MultiPHP INI Editor:

    • Once logged in, look at the left sidebar menu. You can either scroll down to find “MultiPHP INI Editor” or use the search bar at the top.
    • Click on “MultiPHP INI Editor.”

    MultiPHP INI Editor in WHM

Step 3: Select the PHP Version and Domain

  1. Choose Your Configuration:

    • You’ll see two tabs: “Basic Mode” and “Editor Mode.”
    • Start with “Basic Mode” for easier settings adjustments. Select the PHP version and the domain you want to configure from the drop-down menus.

    Select PHP Version and Domain

Step 4: Adjust Settings in Basic Mode

  1. Modify Your Settings:

    • In Basic Mode, you’ll see a list of common PHP settings you can tweak. For example:

      • memory_limit: Controls how much memory a script can use. Increase it if you’re running into memory issues.
      • upload_max_filesize: Maximum file size for uploads. Handy for handling larger files.
      • post_max_size: Max size of POST data, which includes file uploads.
    • Simply change the values to what you need. For example, to change the memory_limit to 256M, you’d enter 256M.

    Basic Mode Settings

Step 5: Save Your Changes

  1. Save Your Configuration:
    • After adjusting the settings, scroll down and click the “Save” button. Voilà! Your settings are updated.

Step 6: Advanced Tweaks (Optional)

  1. For Advanced Users - Editor Mode:

    • If you need to make more granular changes, switch to “Editor Mode.” Here, you can manually edit the php.ini file.
    • Be cautious and ensure you know what each directive does before changing it. Incorrect settings can break your website.

    Editor Mode

Step 7: Verify Changes

  1. Check if Your Changes Worked:
    • Create a simple PHP info file to verify changes:
      <?php
      phpinfo();
      ?>
      
    • Upload this to your web server and access it via your browser (https://yourdomain.com/phpinfo.php). Look for the settings you changed to confirm they’ve been applied.

Bonus Tips

  • Backups Are Your Friend: Always back up your php.ini file before making changes. It’s like a safety net for your website.
  • Documentation: Refer to the official PHP documentation for a detailed explanation of each setting.

And there you have it! Changing your php.ini settings in cPanel WHM is as easy as pie (or maybe PHP?).

Happy tweaking! 🛠️😊

Keep your curiosity going.Explore more IT & networking →
287 TUTORIALS · 22 TOPICSREADY