PHP
PHP versions, settings, errors and what they mean for your site.
12 articles
Versions and settings
- What is PHP?
PHP explained: what the language does on a web server, why WordPress and most hosting apps depend on it, and why the version matters.
- How to change the PHP version in DirectAdmin
Switch a domain or subdomain to a different PHP version in DirectAdmin, test the result and roll back instantly if something breaks.
- How to check which PHP version your site is using
Find the PHP version, loaded extensions and settings your site actually runs with, using phpinfo() or WordPress Site Health.
- Choosing a PHP version: compatibility and support dates
How to pick a PHP version for your site, what changed between 7.4 and 8.x that breaks old code, and why staying on old versions is risky.
- Changing PHP settings: memory_limit, upload size and execution time
Which PHP settings people usually need to change, how to find out which ones your account can adjust, and why server limits act as ceilings.
- PHP extensions: how to check what’s available
What PHP extensions are, how to see which are loaded for your PHP version, and what to do when an application says one is missing.
Errors and debugging
- Understanding PHP error messages
How to read a PHP error: fatal errors, parse errors, warnings, notices and deprecations, what each means for your site, and where to look next.
- How to find PHP errors (error logs and display_errors)
Where PHP errors are recorded on Traxio, how to log errors without showing them to visitors, and how to set up logging for a custom application.
- “Allowed memory size exhausted” PHP error
What the PHP memory exhausted error means, how to check the memory limit, and how to reduce memory use rather than only raising the limit.
- “Maximum execution time exceeded” PHP error
Why PHP stops long-running scripts, how to work within the limit with batching and cron, and when raising max_execution_time is appropriate.
- “Cannot modify header information - headers already sent”
Fix the PHP headers already sent warning: stray whitespace, byte order marks and output before redirects or cookies.
- “Call to undefined function” PHP error
What the undefined function error means, and how to tell whether the cause is a removed PHP function, a missing extension or missing code.
- How to turn on WordPress debugging safely Filed under WordPress
Use WP_DEBUG, WP_DEBUG_LOG and WP_DEBUG_DISPLAY to see WordPress errors without showing them to visitors, and turn debugging off afterwards.