PHP Version Compatibility Matrix for PrestaShop (1.6 through 9.x)
PHP Version Compatibility Matrix for PrestaShop
Choosing the right PHP version for your PrestaShop store is one of the most critical infrastructure decisions you will make. Running an incompatible PHP version can cause white screens, broken checkout flows, module failures, and security vulnerabilities. This comprehensive guide covers every PrestaShop release from 1.6 through 9.x and maps each one to its supported PHP versions, recommended configurations, and upgrade considerations.
Why PHP Version Matters for PrestaShop
PHP is the server-side language that powers PrestaShop. Each major PHP release introduces performance improvements, new language features, and deprecates older functions. PrestaShop's codebase evolves alongside PHP, meaning that newer PrestaShop versions take advantage of modern PHP features while dropping support for outdated ones.
Running the wrong PHP version causes three categories of problems:
- Fatal errors - Functions removed in newer PHP versions (e.g.,
mysql_*functions removed in PHP 7.0,each()removed in PHP 8.0) cause immediate crashes. - Deprecation warnings - Deprecated functions generate warnings that can break AJAX responses, JSON output, and PDF generation when
display_errorsis enabled. - Security exposure - PHP versions that have reached end-of-life no longer receive security patches, leaving your store vulnerable.
Complete Compatibility Matrix
PrestaShop 1.6.x
| PrestaShop Version | PHP 5.4 | PHP 5.5 | PHP 5.6 | PHP 7.0 | PHP 7.1 | PHP 7.2+ |
|---|---|---|---|---|---|---|
| 1.6.0.x - 1.6.0.14 | Yes | Yes | Yes | No | No | No |
| 1.6.1.0 - 1.6.1.4 | Yes | Yes | Yes | Partial | No | No |
| 1.6.1.5 - 1.6.1.23 | Yes | Yes | Yes | Yes | Yes | No |
| 1.6.1.24+ | Yes | Yes | Yes | Yes | Yes | No |
Recommended PHP for 1.6.x - PHP 7.1. It offers the best balance of performance and compatibility. Running 1.6.x on PHP 7.2+ requires core file modifications that break the upgrade path and are not recommended.
PrestaShop 1.7.x
| PrestaShop Version | PHP 7.1 | PHP 7.2 | PHP 7.3 | PHP 7.4 | PHP 8.0+ |
|---|---|---|---|---|---|
| 1.7.0.x - 1.7.4.x | Yes (recommended) | No | No | No | No |
| 1.7.5.x | Yes | Yes (recommended) | No | No | No |
| 1.7.6.x | Yes | Yes (recommended) | Yes | No | No |
| 1.7.7.x | Yes | Yes | Yes (recommended) | Partial | No |
| 1.7.8.x | Yes | Yes | Yes | Yes (recommended) | No |
Critical warning - No version of PrestaShop 1.7 supports PHP 8.0 or later. If you run PS 1.7.6 on PHP 8, Smarty will crash immediately because the template engine uses functions that were removed in PHP 8.0. The each() function removal and changes to how array_key_exists() works with objects cause fatal errors.
PrestaShop 8.x
| PrestaShop Version | PHP 7.2 | PHP 7.3 | PHP 7.4 | PHP 8.0 | PHP 8.1 | PHP 8.2 | PHP 8.3 |
|---|---|---|---|---|---|---|---|
| 8.0.0 - 8.0.2 | Yes (min) | Yes | Yes | Yes | Partial | No | No |
| 8.0.3 - 8.0.5 | Yes (min) | Yes | Yes | Yes | Yes (recommended) | No | No |
| 8.1.0 - 8.1.2 | No | Yes (min) | Yes | Yes | Yes (recommended) | Partial | No |
| 8.1.3 - 8.1.7 | No | Yes (min) | Yes | Yes | Yes (recommended) | Yes | Partial |
Recommended PHP for 8.x - PHP 8.1. It is the sweet spot offering full compatibility, active security support, and excellent performance with JIT compilation. PHP 8.1 brings fibers, enums, readonly properties, and intersection types that PrestaShop 8 can leverage.
PrestaShop 9.x
| PrestaShop Version | PHP 8.1 | PHP 8.2 | PHP 8.3 | PHP 8.4 |
|---|---|---|---|---|
| 9.0.x | Yes (min) | Yes | Yes (recommended) | Yes |
Recommended PHP for 9.x - PHP 8.3 or 8.4. PrestaShop 9 runs on Symfony 6.4 LTS and requires PHP 8.1 as its minimum. PHP 8.4 brings property hooks and asymmetric visibility that future PrestaShop updates will leverage.
PHP End-of-Life Dates You Must Know
| PHP Version | Active Support Until | Security Fixes Until | Status (2026) |
|---|---|---|---|
| PHP 7.4 | Nov 2021 | Nov 2022 | EOL - Dangerous |
| PHP 8.0 | Nov 2022 | Nov 2023 | EOL - Dangerous |
| PHP 8.1 | Nov 2023 | Dec 2025 | EOL - Upgrade soon |
| PHP 8.2 | Dec 2024 | Dec 2026 | Security only |
| PHP 8.3 | Dec 2025 | Dec 2027 | Security only |
| PHP 8.4 | Dec 2026 | Dec 2028 | Active support |
If you are running PHP 7.4 or 8.0 in 2026, you are running on an unsupported version that no longer receives security patches. This is a critical risk for any e-commerce store handling payment data.
How to Check Your Current PHP Version
Method 1 - PrestaShop Back Office
Navigate to Advanced Parameters > Information. The Server Information section displays your PHP version, along with memory limit, max execution time, and other relevant settings.
Method 2 - PHP Info File
Create a file named phpinfo.php in your store's root directory with this content:
<?php phpinfo();Access it via your browser at https://yourstore.com/phpinfo.php. Delete this file immediately after checking - it exposes sensitive server configuration details.
Method 3 - Command Line
php -v
php -r "echo PHP_VERSION;"Note that the CLI PHP version may differ from the web server PHP version. Always verify through the web interface or phpinfo().
Common Issues When Running Wrong PHP Versions
White Screen of Death (WSOD)
The most common symptom of PHP incompatibility. Check your PHP error log (usually at /var/log/php-errors.log or accessible via your hosting panel). Typical errors include:
Fatal error: Uncaught Error: Call to undefined function mysql_connect()
Fatal error: Uncaught Error: Call to undefined function each()
Fatal error: Cannot use "parent" when current class scope has no parentDeprecation Warnings Breaking AJAX
When display_errors = On and you upgrade PHP, deprecation notices get prepended to AJAX responses. This breaks the JSON parsing in the back office, causing features like product search, customer lookup, and order creation to fail silently. The fix:
; php.ini
display_errors = Off
log_errors = On
error_log = /path/to/php-error.logModule Incompatibility
Third-party modules may not support your PHP version. Before upgrading PHP, check each installed module for compatibility. Common problem areas:
- Modules using
create_function()- removed in PHP 8.0 - Modules using
mysql_*functions - removed in PHP 7.0 - Modules using positional string access with curly braces
$str{0}- removed in PHP 8.0 - Modules not handling nullable return types - stricter in PHP 8.1+
How to Safely Upgrade PHP for PrestaShop
Step 1 - Audit Your Current Setup
Before changing anything, document your current environment:
php -v # Current PHP version
php -m # Loaded extensions
php -i | grep memory # Memory limit
php -i | grep max_exec # Execution time limitStep 2 - Check Module Compatibility
Review every installed module. Check the module developer's documentation for PHP version support. If a module has not been updated in over two years, it is likely incompatible with PHP 8.x.
Step 3 - Test on Staging First
Never upgrade PHP on your production server without testing. Create a staging copy of your store and test with the new PHP version. Check:
- Front office pages load correctly
- Product pages, category pages, CMS pages
- Cart and checkout process completes
- Payment modules process test transactions
- Back office functionality works (product editing, order management)
- All third-party modules function correctly
- Cron jobs execute without errors
Step 4 - Upgrade with Rollback Plan
Most hosting providers allow you to switch PHP versions from the control panel (cPanel, Plesk, DirectAdmin). Keep the previous PHP version available for quick rollback if issues arise.
Step 5 - Clear All Caches After Upgrade
After switching PHP versions, clear every cache layer:
# Clear PrestaShop cache
rm -rf var/cache/prod/* var/cache/dev/*
# Clear Smarty compiled templates
rm -rf var/cache/smarty/compile/* var/cache/smarty/cache/*
# If using OPcache, restart PHP-FPM
systemctl restart php8.3-fpm
# Clear any CDN cache (Cloudflare, etc.)PHP Configuration Best Practices for PrestaShop
Regardless of which PHP version you choose, these settings are essential for optimal PrestaShop performance:
; php.ini recommended settings
memory_limit = 512M
max_execution_time = 300
max_input_vars = 10000
post_max_size = 32M
upload_max_filesize = 32M
; OPcache settings (critical for performance)
opcache.enable = 1
opcache.memory_consumption = 256
opcache.interned_strings_buffer = 32
opcache.max_accelerated_files = 16229
opcache.revalidate_freq = 60
opcache.fast_shutdown = 1
; Required extensions
extension = intl
extension = zip
extension = gd
extension = curl
extension = mbstring
extension = openssl
extension = pdo_mysql
extension = fileinfoModule Developer Considerations
If you develop PrestaShop modules, you need to consider PHP compatibility carefully:
- Minimum PHP version - Target PHP 7.2 as minimum for modules that should work on PrestaShop 8.0+, or PHP 8.1 for PrestaShop 9-only modules.
- Use PHPStan or Psalm - Static analysis tools catch PHP version incompatibilities before your users do.
- Avoid version-specific syntax - Features like match expressions (PHP 8.0), enums (PHP 8.1), and readonly properties (PHP 8.1) limit your module to those PHP versions and above.
- Test on multiple versions - Use Docker containers with different PHP versions to test your module across the compatibility range.
Frequently Asked Questions
Can I run PrestaShop 1.7 on PHP 8?
No. No version of PrestaShop 1.7 officially supports PHP 8.0 or later. While some users have applied patches to make it partially work, this is unsupported and will break with updates. The correct path is to upgrade to PrestaShop 8.x.
Should I use PHP 8.4 with PrestaShop 8.1?
Not recommended. PrestaShop 8.1 was developed and tested primarily with PHP 8.1. While PHP 8.2 has partial support in later 8.1.x releases, PHP 8.4 introduces changes that may cause issues with older Symfony components. Stick with PHP 8.1 for PrestaShop 8.x.
How much faster is PHP 8.x compared to 7.x?
Benchmarks show PHP 8.1 is approximately 20-30% faster than PHP 7.4 for typical PrestaShop workloads. The JIT compiler provides the most benefit for computational tasks. For I/O-bound operations (database queries, file reads), the improvement is smaller but still measurable.
Does upgrading PHP require upgrading PrestaShop?
Not necessarily, but they go hand in hand. You can upgrade PHP within the supported range for your PrestaShop version without upgrading PrestaShop itself. However, if you want to run a modern PHP version (8.3+), you will need PrestaShop 8.1 or 9.x.
For more details, read our guides: PrestaShop 1.7 vs 8 vs 9: Which Version Should You Be Running? and What PrestaShop 9 Changed and Why Module Compatibility Matters.
Was this answer helpful?
Still have questions?
Can't find what you're looking for? Send us your question and we'll get back to you quickly.