Cloud House Technologies Logo
CloudHouse Technologies
HomeServicesProjectsBlogAbout UsCareersContact UsLogin
    Cloud House Technologies Logo
    CloudHouse Technologies
    HomeServicesProjectsBlogAbout UsCareersContact UsLogin

    DirectAdmin PHP Version Not Changing? Here's How to Fix It

    Priya

    Content Writer & Researcher

    Last Updated: 30 June 2026
    🖥️

    Is Your DirectAdmin PHP Version Switch Not Taking Effect?

    Wrong PHP version means plugin incompatibilities, security vulnerabilities, and broken sites. CloudHouse Technologies manages DirectAdmin servers and handles PHP version migrations correctly — contact us today.

    🔧 Book Free DiagnosisCall NowWhatsApp
    🖥️12,400+PCs Fixed
    ⭐4.9★Google Rating
    ⚡<15 minAvg. Response
    🛡️ISO 27001Certified

    You installed a new PHP version through DirectAdmin's CustomBuild, changed the setting, restarted Apache — and the site is still running the old PHP version. This is one of the most common administration headaches on DirectAdmin servers, and it happens because PHP version control in DirectAdmin operates at two separate levels that must both be configured correctly.

    This guide explains exactly how DirectAdmin's PHP version system works, why changes often don't take effect, and how to fix each root cause step by step.

    How PHP Version Selection Works in DirectAdmin

    DirectAdmin with CustomBuild 2.0 supports up to four simultaneous PHP versions, defined in /usr/local/directadmin/custombuild/options.conf as php1_release through php4_release. PHP can run in three modes depending on how Apache and CustomBuild are configured:

    • PHP-FPM — recommended mode, each PHP version runs as a separate FastCGI process manager service
    • FastCGI (SuPHP/CGI) — older mode, PHP runs as CGI per request
    • mod_php — Apache module mode; only one PHP version can be active at a time server-wide

    PHP version selection happens at two levels: the server global default set in CustomBuild, and per-domain settings set in DirectAdmin's Domain Setup. When the per-domain setting overrides the global, changing the global has no effect on that domain. This is the most common reason PHP version changes appear not to work.

    💡 None of these worked? Skip the guesswork.

    Get Expert Help →

    Step 1: Check the Domain-Level PHP Version Override

    This is the first thing to check — it explains most "PHP version change not working" reports.

    1Log in to DirectAdmin as admin or the domain owner

    Navigate to DirectAdmin → Account Manager → List Accounts → click the domain → Domain Setup.

    2Find the PHP Version Selector

    In Domain Setup, look for a "PHP Version" or "PHP Version Selector" dropdown. If a specific PHP version is selected here, it overrides the server global. Change it to the version you want for this domain and click Save.

    3As admin, check all domains at once via SSH
    grep "php" /usr/local/directadmin/data/users/*/domains/*.conf | grep -v "^Binary" | head -30

    This shows the PHP version configured per domain. A line like php1=yes means the domain is using PHP slot 1 (php1_release in options.conf). If you changed php2_release but the domain has php1=yes, the domain stays on php1.

    1Navigate to the CustomBuild directory
    cd /usr/local/directadmin/custombuild
    2Build PHP for the slot you want to change

    Replace 1 with the slot number (1-4) you are building:

    ./build php n

    This builds all PHP slots. To build only a specific slot:

    ./build php1

    The build process takes 15-30 minutes depending on server speed. Watch for any compilation errors in the output.

    3Rewrite web server configuration files

    After the build completes, regenerate all virtual host configuration files to pick up the new PHP binaries:

    ./build rewrite_confs

    This is the step that most guides miss. Without it, Apache and Nginx continue using the old PHP binary paths even after a successful build.

    4Restart the web server
    systemctl restart httpd   # CentOS/AlmaLinux/Rocky
    systemctl restart apache2  # Ubuntu/Debian

    If using PHP-FPM, also restart the FPM services:

    systemctl restart php-fpm*

    Or restart all PHP-FPM services at once with DirectAdmin's service restart:

    /usr/local/directadmin/directadmin restart httpd
    1Check that FPM services are running for your PHP versions
    systemctl status php-fpm*

    If a PHP version service is not running, start it:

    systemctl start php81-php-fpm   # example for PHP 8.1
    2Regenerate FPM pool configurations
    cd /usr/local/directadmin/custombuild
    ./build rewrite_confs
    3Check that the socket or port for the PHP version is active
    ls -la /var/run/php-fpm/

    You should see socket files for each active PHP version. Missing sockets indicate the corresponding FPM service is not running or the pool config is missing.

    1Create a phpinfo test file
    echo '<?php phpinfo(); ?>' > /home/username/domains/yourdomain.com/public_html/info.php

    Access https://yourdomain.com/info.php in a browser. The PHP Version line at the top confirms which version is running. Delete the file after checking:

    rm /home/username/domains/yourdomain.com/public_html/info.php
    2Verify from the command line
    php -v

    Note that the CLI PHP version and the web-served PHP version can differ. The CLI version is set separately and does not affect web requests.

    3Use DirectAdmin's built-in PHP version checker

    In DirectAdmin → Admin Level → CustomBuild → Version Management, you can see all installed PHP versions and their current status.

    For complex PHP version management on DirectAdmin servers, including migrating sites between PHP versions safely, CloudHouse Technologies provides managed DirectAdmin server administration with full CustomBuild expertise.

    Get the Free Linux Server Admin Cheatsheet (PDF)

    Essential commands for server management, networking, and troubleshooting — all on one printable page.

    Running Linux servers? Let us manage them for you.

    Our Managed Linux Server plans cover updates, security hardening, monitoring, and 24/7 incident response — so your servers stay up and your team stays focused.

    • Proactive OS patching and security updates
    • 24×7 monitoring with instant alerting
    • Backup configuration and disaster recovery
    • Dedicated Linux engineers on call
    See Pricing Plans →

    What our customers say

    “Our production server went down at 2 AM. CloudHouse had it back online in under 20 minutes. Incredible response time.”

    Arun S.

    CTO, SaaS Startup

    “They migrated our entire infrastructure from Ubuntu 18 to 22 with zero downtime. Couldn't have asked for better.”

    Deepak N.

    DevOps Lead

    Frequently Asked Questions

    The most likely cause is that the domain has a per-domain PHP version override set in Domain Setup. This overrides the server global. Go to DirectAdmin > Account Manager > List Accounts > domain > Domain Setup and check the PHP Version Selector. Also ensure you ran './build rewrite_confs' after the CustomBuild change, as this regenerates the Apache/Nginx virtual host configs to use the new PHP binary paths.

    Book your free 15-minute diagnosis

    A certified technician will call you back within 15 minutes during business hours.

    Share this article

    Leave a Comment

    Comments (0)

    Loading comments...

    Need Help With DirectAdmin PHP Configuration?

    PHP version issues on DirectAdmin often require changes at both the global and per-domain level. Our team manages DirectAdmin servers daily and resolves PHP configuration problems quickly without downtime.

    Call Now — FreeWhatsApp Us

    Why CloudHouse?

    • ISO 27001:2022 certified
    • 12,400+ devices supported
    • 4.9★ on Google
    • Sub-15-minute response

    CloudHouse Technologies

    Innovative cloud solutions for modern businesses. We deliver cutting-edge technology with exceptional service.

    Contact Us

    CloudHouse Technologies Pvt.Ltd
    Special Economic Zone(SEZ),
    Infopark Thirissur,4B-15,
    Indeevaram,Nalukettu Road,
    Koratty, Kerala, India-680308
    0480-27327360
    info@cloudhousetechnologies.com

    Quick Links

    • Our Services
    • Gold Loan Software
    • About Us
    • Contact
    • Terms and Conditions
    • Privacy Policy
    ISO27001:2022
    Certified

    © 2026 CloudHouse Technologies Pvt.Ltd. All rights reserved.

    Back to top