Select PHP Version in DirectAdmin
Summary
This guide explains how to change and configure the PHP version for your domain using the Select PHP Version tool in DirectAdmin. This feature allows you to switch between multiple PHP versions, enable/disable extensions, and adjust PHP settings without editing server files.
Overview
Select PHP Version allows you to:
- Change the PHP version per domain
- Enable/disable PHP extensions
- Modify PHP options (memory_limit, upload_max_filesize, etc.)
- Switch between PHP-FPM and native modes (if supported)
- Improve compatibility with CMS platforms like WordPress, Joomla, Magento
Requirements
- DirectAdmin user-level access
- PHP Selector enabled by your hosting provider
- A domain or subdomain configured in your account
Step-by-Step Instructions
1. Access Select PHP Version
- Log in to DirectAdmin
- Go to Extra Features → Select PHP Version
- Choose the domain you want to configure (if prompted)
You will see your current PHP version and available options.
2. Change the PHP Version
- Click the PHP version dropdown
- Select the version you want (e.g., 7.4, 8.0, 8.1, 8.2)
- Click “Set as current”
Your domain will immediately switch to the new PHP version.
3. Enable or Disable PHP Extensions
Common extensions include:
- mysqli
- pdo_mysql
- gd
- curl
- zip
- intl
- imagick
- ionCube Loader (if available)
To modify:
- Check or uncheck the extension
- Click “Save”
Your PHP environment updates instantly.
4. Modify PHP Options
Click “Options” to adjust settings such as:
- memory_limit
- upload_max_filesize
- post_max_size
- max_execution_time
- max_input_vars
- display_errors
Example recommended values:
memory_limit = 512M
upload_max_filesize = 64M
post_max_size = 64M
Click “Save” after making changes.
5. Switch PHP Mode (If Supported)
Some servers allow switching between:
- PHP-FPM
- Native
- FastCGI
PHP-FPM is recommended for:
- WordPress
- WooCommerce
- Laravel
- High‑traffic sites
Switching modes may require a restart of the PHP service (handled automatically).
6. Check PHP Info
Click “Show PHP Info” to view:
- Loaded extensions
- PHP configuration
- Server environment
- Paths and limits
Useful for debugging or confirming changes.
Troubleshooting
Website Shows 500 Error
- Incompatible PHP version
- Missing extensions (e.g., mysqli, json)
- Incorrect PHP mode
Switch back to the previous version or enable required extensions.
White Screen / Blank Page
- display_errors disabled
- PHP fatal error
- Missing modules
Enable error display temporarily for debugging.
WordPress Not Working
- Enable extensions: mysqli, curl, gd, zip, json
- Use PHP 8.0+ for best performance
WooCommerce Not Working
- Requires PHP 7.4+
- Enable intl, zip, curl, gd
Laravel Not Working
- Enable openssl, mbstring, tokenizer, pdo_mysql
- Set memory_limit to at least 512M
Upload Limit Too Small
Increase:
upload_max_filesize
post_max_size
Changes Not Applying
- Browser caching
- PHP-FPM pool delay (rare)
- Wrong domain selected
Security Notes
- Use supported PHP versions only
- Avoid outdated versions (7.3 or older)
- Disable unused extensions to reduce attack surface
- Do not enable dangerous functions unless required
Related Articles
- [Setup Node.js App](ca://s?q=Setup_Nodejs_App)
- [Setup Python App](ca://s?q=Setup_Python_App)
- [Terminal](ca://s?q=Terminal)
- [File Manager](ca://s?q=File_Manager)
- [WordPress Manager](ca://s?q=WordPress_Manager_by_Softaculous)