Different websites and applications may require different PHP versions to work correctly.
This guide explains how to change the PHP version for your website using DirectAdmin.
What Is PHP?
PHP is the programming language used by many websites and applications, including:
- WordPress
- Joomla
- Magento
- Laravel
- Custom PHP websites
Different applications may require different PHP versions for:
- compatibility
- security
- performance
Before You Start
Before changing your PHP version, make sure:
- You can log into DirectAdmin
- Your website supports the PHP version you want to use
- You have a recent website backup
If you have not logged in yet, please see:
- How to Log Into DirectAdmin
Important Recommendation
We recommend using the newest PHP version supported by your website software.
Newer PHP versions generally provide:
- better performance
- improved security
- better stability
How to Change PHP Version
Step 1 — Log Into DirectAdmin
Open your browser and visit: https://cp.yourdomain.co.za (Replace yourdomain.co.za with your own domain name)
Enter your hosting username and password.
Step 2 — Open Domain Setup
From the DirectAdmin dashboard:
Click: Account Manager
Then click: PHP Settings
Step 3 — Select Your Domain
Click the domain name you want to manage. The domain selector is on the top right.
Example: yourdomain.co.za
Step 4 — Open PHP Settings
Locate the: PHP Version Selector
Step 5 — Choose a PHP Version
Select the PHP version you want to use from the dropdown list.
Examples may include:
PHP 8.1
PHP 8.2
PHP 8.3
Click: Update Version
Step 6 — Adjust PHP Settings (Optional)
Some websites and applications may require higher PHP limits for:
- larger file uploads
- WordPress plugins
- themes
- backups
- imports
Locate the: PHP Settings
To change various setting Use the Add new override section.
Select the setting you want ie memory_limit and set its limit to your requirement
Click: Add
You are able to adjust settings such as:
Common PHP Settings
upload_max_filesize
Controls the maximum file upload size.
Example:
128M
post_max_size
Controls the maximum size of form submissions and uploads.
Example:
128M
memory_limit
Controls how much memory PHP scripts may use.
Example:
256M
max_execution_time
Controls how long scripts are allowed to run.
Example:
300
max_input_vars
Controls how many input variables PHP can process.
Useful for large WordPress themes and plugins.
Example:
5000
Save the PHP Settings
After making changes:
Click: Save
The new settings should apply automatically.
Recommended PHP Versions
For most modern WordPress websites, newer PHP versions are recommended. ie 8.2, 8.3
Older PHP versions should only be used when required for compatibility reasons.
Test Your Website
After changing PHP versions:
Visit your website and test:
- pages
- forms
- WordPress admin
- plugins
- themes
- online stores
to ensure everything works correctly.
Common Reasons to Change PHP Version
Website Compatibility
Some older websites may only support specific PHP versions.
WordPress Requirements
New WordPress versions often require newer PHP releases.
Better Website Performance
Newer PHP versions can improve:
- loading speed
- memory usage
- website responsiveness
Improved Security
Unsupported PHP versions may contain security vulnerabilities.
Troubleshooting
Website Displays Errors After PHP Change
Possible causes include:
- outdated plugins
- unsupported themes
- incompatible scripts
- old website code
Try switching back to the previous PHP version if needed.
Blank White Page
This is often caused by:
- PHP compatibility problems
- fatal PHP errors
- outdated plugins/themes
Restore the previous PHP version and investigate compatibility issues.
WordPress Admin Not Loading
Some plugins or themes may not support newer PHP versions.
Try:
- disabling plugins
- updating WordPress
- updating themes/plugins
PHP Version Option Missing
Some hosting packages may have limited PHP management options.
Contact HostworX support if you cannot find PHP settings.
Helpful Tips
Keep WordPress Updated
Modern WordPress versions work best with newer PHP releases.
Update Plugins Regularly
Outdated plugins are one of the most common causes of PHP compatibility problems.
Create Backups Before Major Changes
Always create backups before:
- changing PHP versions
- updating plugins
- upgrading WordPress
Security Tips
- Use supported PHP versions
- Keep WordPress updated
- Remove unused plugins
- Remove outdated themes
- Keep regular backups


