What is PHP?
PHP is the server-side programming language used by WordPress, Joomla, Drupal, and most dynamic websites. Different PHP versions offer different features, performance improvements, and security updates.
Why change PHP version?
- Performance: Newer PHP versions are significantly faster (PHP 8.1 is 2β3Γ faster than PHP 7.4)
- Security: Older versions no longer receive security updates
- Compatibility: New WordPress versions require PHP 7.4+
- Plugin requirements: Some plugins require specific PHP versions
- Legacy applications: Older websites may need older PHP versions
Available PHP versions at 0724 Hosting
0724 Hosting provides multiple PHP versions:
- PHP 8.3 - Latest stable (recommended for new sites)
- PHP 8.2 - Stable, well-supported
- PHP 8.1 - Widely compatible, good performance
- PHP 8.0 - Stable, losing support
- PHP 7.4 - Legacy compatibility (end-of-life November 2022)
Note: Availability may vary by server. Contact support if you need a specific version.
PHP version recommendations
| Scenario | Recommended Version |
|---|---|
| New WordPress site | PHP 8.1 or 8.2 |
| Existing WordPress (updated) | PHP 8.1 or higher |
| WordPress with old plugins | PHP 7.4 or 8.0 (test first) |
| Custom PHP application | Check application requirements |
| Legacy CMS (Joomla 2.x, Drupal 7) | PHP 7.4 (upgrade CMS if possible) |
| WooCommerce store | PHP 8.1 or 8.2 |
Before changing PHP version
1. Check website compatibility
Not all websites work with newer PHP versions. Before upgrading:
- Update WordPress, plugins, and themes to the latest versions
- Check plugin compatibility: Visit each plugin's page on wordpress.org and verify PHP 8.x support
- Test on staging site: Create a copy of your website to test the new PHP version first
- Back up your website: Use JetBackup or export files and database before changing PHP version
2. Common compatibility issues
- Deprecated functions: Older code may use functions removed in newer PHP versions
- Plugin incompatibility: Abandoned or unmaintained plugins may break
- Theme issues: Old themes may have PHP compatibility problems
- Custom code: Hardcoded PHP may need updates
Method 1: Changing PHP version in DirectAdmin
Step 1: Access PHP version settings
- Log in to DirectAdmin
- Go to Domain Setup or Advanced Features
- Click PHP Version Selection or Select PHP Version
- Select your domain from the dropdown (if you have multiple domains)
Step 2: Choose PHP version
- You will see a list of available PHP versions
- Select the PHP version you want (e.g., PHP 8.2)
- Click Save or Apply
The change applies immediately. No web server restart required.
Step 3: Verify the PHP version
Create a file called info.php in your public_html folder with this content:
<?php phpinfo(); ?>
Visit https://yourdomain.co.za/info.php in your browser. The page displays your current PHP version and configuration.
Security tip: Delete info.php after checking the version (it exposes server configuration details).
Method 2: Per-domain PHP version (advanced)
If you host multiple domains and need different PHP versions for each:
- Go to Domain Setup in DirectAdmin
- Find the domain in the list
- Click Modify or the domain name
- Select PHP Version from the options
- Choose the desired PHP version
- Click Save
Each domain can run a different PHP version independently.
Method 3: Using .htaccess (directory-specific)
To set PHP version for a specific directory (e.g., subdirectory or subdomain):
- Navigate to the directory in File Manager or FTP
- Create or edit the
.htaccessfile - Add this line (adjust version number):
AddHandler application/x-httpd-php82 .php
Note: The exact syntax varies by server configuration. Contact support for the correct handler name.
Testing after PHP version change
Essential tests
- Homepage: Visit your website and verify it loads
- WordPress admin: Log in to /wp-admin and check for errors
- Forms: Test contact forms, search, and other interactive elements
- E-commerce: Test checkout, product pages, cart functionality (if applicable)
- User login: Test member login areas
- Images and media: Verify images, videos, and galleries work
Check for PHP errors
Enable WordPress debugging to see PHP errors:
- Edit
wp-config.phpin your website root - Add these lines before
/* That's all, stop editing! */:
define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);
define('WP_DEBUG_DISPLAY', false);
Check wp-content/debug.log for PHP errors. Disable debugging after testing.
Common PHP version upgrade issues
White screen of death (WSOD)
If your website shows a blank white screen after upgrading PHP:
- Cause: Fatal PHP error preventing page rendering
- Fix: Revert to previous PHP version immediately
- Troubleshooting: Check error logs (DirectAdmin β Error Logs)
- Solution: Update or replace incompatible plugins/themes
"Fatal error: Uncaught Error..."
Fatal error messages indicate code incompatibility:
- Identify the plugin/theme: Error message usually includes the file path
- Update or replace: Update the problematic plugin or find an alternative
- Contact developer: Request PHP 8.x compatibility update
- Temporary fix: Revert to previous PHP version until issue is resolved
Warnings or deprecation notices
Non-critical warnings (e.g., "Deprecated function...") may appear:
- Don't panic: Warnings do not break your site
- Log them: Note which plugins/themes generate warnings
- Update software: Update WordPress, plugins, and themes
- Suppress warnings: Disable
WP_DEBUG_DISPLAY(warnings are logged, not shown)
Plugins or features stop working
If specific functionality breaks:
- Disable plugins one by one: Identify the problematic plugin
- Check plugin compatibility: Some plugins do not support PHP 8.x
- Switch themes temporarily: Test if the issue is theme-related
- Update or replace: Find updated alternatives
Rolling back to previous PHP version
If the new PHP version causes problems:
- Go to DirectAdmin β PHP Version Selection
- Select the previous PHP version (e.g., PHP 7.4)
- Click Save
- The website should return to normal immediately
Don't panic: PHP version changes are reversible and instant.
PHP version lifecycle and support
| PHP Version | Release Date | End of Life | Status |
|---|---|---|---|
| PHP 8.3 | November 2023 | December 2026 | β Actively supported |
| PHP 8.2 | December 2022 | December 2025 | β Actively supported |
| PHP 8.1 | November 2021 | November 2024 | β οΈ Security fixes only |
| PHP 8.0 | November 2020 | November 2023 | β End of life |
| PHP 7.4 | November 2019 | November 2022 | β End of life |
Security risk: PHP versions past end-of-life no longer receive security updates. Upgrade to PHP 8.1+ as soon as possible.
Performance improvements by PHP version
Benchmarks show significant performance gains with newer PHP versions:
- PHP 8.0: 20β30% faster than PHP 7.4
- PHP 8.1: 5β10% faster than PHP 8.0
- PHP 8.2: 5β10% faster than PHP 8.1
- PHP 8.3: Minor performance improvements over 8.2
WordPress benchmark (requests per second):
- PHP 7.4: 100 req/s
- PHP 8.0: 130 req/s (+30%)
- PHP 8.1: 140 req/s (+40% vs 7.4)
- PHP 8.2: 150 req/s (+50% vs 7.4)
Upgrading PHP is one of the easiest ways to improve website speed.
WordPress and PHP compatibility
WordPress minimum PHP requirements:
- WordPress 6.4+: PHP 7.4 minimum, PHP 8.1+ recommended
- WordPress 6.0β6.3: PHP 7.4 minimum, PHP 8.0+ recommended
- WordPress 5.9: PHP 7.4 minimum
- Older WordPress: May require PHP 5.6β7.3 (upgrade WordPress first)
Best practice: Always run the latest WordPress version with the latest stable PHP version.
Getting help with PHP version changes
If you need assistance upgrading PHP, troubleshooting compatibility issues, updating plugins, or testing staging environments, contact 0724 Hosting support. We can help identify incompatible plugins, test PHP upgrades, and resolve errors.