Which PHP Version Is Best for PrestaShop 9?

Recommended PHP Version for PrestaShop 9

There’s a bit of inconsistency in the official PrestaShop documentation regarding PHP versions for PrestaShop 9. Here’s the current state as of June 2025:

  • PHP 8.3 is the officially recommended version at the time of release. It is stable, fully supported, and thoroughly tested with PrestaShop 9.
  • PHP 8.4 is referenced in some graphics and charts, but as of now, it’s still considered “experimental” for many eCommerce platforms (including PrestaShop). If you run a production shop, stick to PHP 8.3 unless you have a strong reason to test 8.4 and can roll back easily.

Note on PHP 8.4: PHP 8.4 is in active development, and while some hosts already offer it, not all PrestaShop modules and extensions are fully compatible. If you want to experiment with the latest features, do it on a staging/dev environment first.

How to Tune PHP for Best Performance

  1. Use PHP-FPM (FastCGI Process Manager): PHP-FPM is highly recommended for performance and scalability compared to the old mod_php or basic CGI. It manages pools of PHP processes, reducing overhead and memory leaks.
  2. Enable OPcache: OPcache greatly speeds up PHP execution by caching precompiled scripts in memory. Enable and tune it in your php.ini:
    opcache.enable=1
    opcache.memory_consumption=256
    opcache.max_accelerated_files=20000
    opcache.validate_timestamps=1
    opcache.revalidate_freq=60
              
    Adjust memory consumption for your shop’s size.
  3. Adjust PHP Resource Limits:
    memory_limit = 512M
    max_execution_time = 300
    upload_max_filesize = 64M
    post_max_size = 64M
              
    For larger shops or heavy imports, consider even higher values.
  4. Use a Modern Web Server: For most PrestaShop shops, Apache with event MPM and PHP-FPM is recommended and offers excellent compatibility out of the box. LiteSpeed is also a great choice, especially on many shared hosting environments. While NGINX is often mentioned for high-performance setups, it can introduce complications with PrestaShop’s URL rewriting and backend features, and is rarely needed unless you are running a very high-volume site—and even then, the benefits may not justify the extra configuration and troubleshooting required.

Summary

  • Go with PHP 8.3 for now for best compatibility and support.
  • Enable PHP-FPM and OPcache.
  • Tune PHP resource settings to match your shop’s size and traffic.
  • Regularly monitor for new PrestaShop and PHP updates.

Have questions about your PHP environment? Contact us at info@prestaheroes.com