Treat the PHP change as an application change
Check the application's supported PHP versions and recovery path before selecting an available version for its domain.
Changing the selected PHP version is an application change with a rollback requirement. Application code, themes, plugins, Composer dependencies and PHP extensions may have different requirements. The version available in DirectAdmin depends on the server configuration and account permissions. A version listed in an old tutorial is not evidence that your hosting service offers it.
This guide covers a site that is already hosted in a DirectAdmin account with a PHP selector available. It does not ask you to install PHP or change server-wide settings. If the selector is missing, contact the host rather than trying an administrative command from a customer account.
Inventory compatibility and recovery first
Record the current PHP version shown for the domain and confirm the runtime version that web requests actually use. The command-line php -v, if shell access is available, may refer to a different binary and is not sufficient proof. Use an application health page or a temporary, access-restricted diagnostic page approved by the host; remove any public phpinfo() page immediately after checking because it reveals server configuration.
Read the application vendor’s supported PHP matrix and migration notes for every version crossed. Check required extensions and settings, scheduled jobs, command-line tools and deployment scripts. Update incompatible code or plugins in a staging copy first. Save a verified backup of files and database and record how to restore them; a backup file whose contents and recovery path are untested is a weak rollback plan. Choose a maintenance window for customer-facing sites.
Test in a representative staging copy
Prefer a staging copy using the same application, data shape, extensions and proposed PHP version. Test representative public pages, logins, forms, payments or integrations that actually apply to the site, background tasks and error logs. PHP’s migration guides list backward-incompatible changes and deprecations; a page loading successfully does not establish full compatibility. If staging is unavailable, narrow the change window, arrange immediate monitoring and avoid combining the PHP switch with unrelated plugin or DNS changes.
Check whether the candidate version is still supported by PHP and the application vendor. The supported-version table changes over time, so verify it when choosing a target. Do not select an obsolete version solely to make an old plugin run indefinitely; plan an application upgrade.
For example, a staging home page can pass while a payment integration using a missing PHP extension fails. Test only integrations actually in use, with safe test data and the same relevant extensions as production.
Select the version in DirectAdmin
- At User level, choose the intended domain in Domain Setup and locate its PHP Version Selector, if enabled. Note the current selection and take a screenshot or change record.
- Choose the previously tested version from the options actually offered by the account, then save. Do not assume the change affects other domains.
- If changing only a subdomain and the panel offers a subdomain-specific selector, inspect Sub-Domains Setup and its Document Root Override page. Confirm the exact hostname and scope before saving; the main domain may keep a different version.
- Reload an uncached test page and verify the version served over the web. Check application logs for fatal errors and deprecation warnings, and test the key journeys from the staging checklist.
Menu names vary with the DirectAdmin skin and host configuration. Server administrators control which versions and handlers are installed; the customer selector chooses among those made available.
Respond to errors and roll back carefully
If the site returns HTTP 500 or a blank page, inspect the application and PHP error logs before changing multiple settings. Missing extensions, deprecated functions and incompatible dependencies require different fixes. Compare the actual web runtime with the selected version. On PHP-FPM installations, per-domain settings may be managed through the panel or .user.ini; an .htaccess PHP directive may not affect that handler. Avoid editing server configuration files or repeatedly toggling versions without a diagnosis.
If a critical journey fails, return the domain or subdomain selector to the recorded prior version and retest it. Restore data only if the application change also altered data and the verified recovery plan calls for it; a PHP selector rollback alone does not undo database migrations. Keep the old version only as a temporary recovery measure if it is unsupported, then schedule the code upgrade. Send support the hostname, old and new versions, error time and sanitised log excerpt, not credentials.
Confirm the change is complete
After a successful switch, run the application’s own health checks, inspect logs over a normal use period and verify scheduled tasks with their correct CLI runtime if applicable. Recheck HTTPS, forms and authenticated paths. Remove temporary diagnostics, record the chosen version and update your maintenance notes so a future migration starts from the real configuration.
Common questions
Will a PHP change update my application? No. Code, dependencies and plugins are maintained separately.
Why does php -v differ from the website? CLI and web handlers can use different PHP versions.
Can I change one subdomain only? DirectAdmin supports a subdomain selector in some configurations; check the actual account interface and document-root settings.
Sources and technical references
Related guides
Was this guide helpful?
If you accepted optional analytics, your Yes/No answer and this guide’s page address are sent to Google Analytics. No written feedback is collected. Read our privacy statement or change your choice in .
Need help with your service?
Open your client area or contact Novasean. Describe the symptom and checks you have performed. Keep passwords, recovery codes and private keys out of your message.