PrestaShop PHP Version Upgrade Guide
In the African savanna, elephant herds travel vast distances in search of water, their movements guided by ancestral knowledge passed down through generations. When drought settles in, this accumulated wisdom — which water sources endure, which paths remain viable — becomes a matter of survival. The matriarch leads with experience, avoiding dry wells and heading toward deeper, more reliable reserves.
Upgrading your PrestaShop store’s PHP version requires similar accumulated knowledge. You need to know which deprecated functions will “dry up” and break your code, which performance improvements you can reliably tap, and which compatibility paths remain viable for your modules and themes. This guide serves as that experienced guide — helping you navigate the terrain of PHP upgrades with confidence, avoiding the pitfalls that could leave your store stranded.
Of course, not every PrestaShop store faces the same journey. Your current PHP version, PrestaShop version, and module ecosystem all shape your upgrade path — but the principles we’ll cover apply universally. Let’s explore how to upgrade safely and effectively.
Why You Must Upgrade Your PrestaShop’s PHP Version
Before we dive into the step-by-step process, let’s establish why this upgrade matters for your business. Upgrading PHP isn’t merely a technical maintenance task — it’s a strategic decision that affects your store’s security, performance, and long-term viability.
We can break down the benefits into three core areas:
- Enhanced Security: PHP, like any widely-used software, has vulnerabilities discovered over time. Newer versions receive active security patches that protect your store and customer data from malicious attacks. Running an End-of-Life (EOL) PHP version means you no longer receive these critical updates — leaving your store exposed to known exploits that attackers actively target.
- Significant Performance Boost: Each major PHP release brings substantial speed improvements. Upgrading from PHP 7.4 to 8.1, for example, can result in a 25–50% increase in performance — translating to faster page loads, better user experience, and improved conversion rates. We’re talking about measurable improvements that directly impact your revenue.
- Module and Theme Compatibility: The PrestaShop ecosystem evolves alongside PHP. The latest and most powerful modules and themes are built for modern PHP versions. Sticking with outdated PHP means you’ll eventually hit a wall where you cannot install or update the features you need to stay competitive.
Of course, these benefits don’t come without risks — which is why we’ll focus heavily on doing this upgrade safely.
Step 1: Check PrestaShop and PHP Compatibility
The first step is ensuring the PHP version you’re targeting is compatible with your current PrestaShop installation. A mismatch here causes most upgrade failures — and we want to avoid that entirely.
First, let’s find your PrestaShop version. You can check this in your back office by going to Dashboard → Advanced Parameters → Information. Look for the “PrestaShop version” field — it will show something like “8.1.2” or “1.7.8.8”. Alternatively, you can find it in the footer of your back office login page.
For your current PHP version, most hosting providers show this in their control panel—often under “PHP Selector,” “PHP Info,” or similar. If you have SSH access, you can also run:
$ php -v
PHP 7.4.33 (cli) (built: Feb 17 2025 10:38:31) ...
Now, let’s talk compatibility. PrestaShop maintains specific PHP requirements for each version. Generally speaking, here’s what you can expect:
| PrestaShop Version | Compatible PHP Versions |
|---|---|
| 1.7.7 - 1.7.8 | 7.2 - 7.4 |
| 8.0.x | 7.2 - 8.1 |
| 8.1.x | 7.4 - 8.2 |
| 8.2.x | 8.1 - 8.3 |
Important: These are general guidelines. Before proceeding, check the official PrestaShop documentation at docs.prestashop.com—specifically the “System requirements” page for your version. Requirements can change between minor releases, and certain modules may impose additional constraints.
One may wonder: what if my target PHP version isn’t listed as compatible? In that case, upgrading isn’t advisable without first upgrading PrestaShop itself or finding alternative modules. You have two paths: upgrade PrestaShop first, or choose a PHP version within the supported range. Generally, I recommend staying within the officially supported range unless you have specific testing to verify compatibility.
Step 2: The Pre-Upgrade Checklist
Preparation separates successful upgrades from catastrophic failures. Taking these steps will save you from hours of downtime and stress. Let’s walk through each item systematically.
1. Create a Full Backup
This bears emphasis: do not proceed without a complete backup of both your files and your database. If anything goes wrong, you can restore your site instantly.
We recommend using multiple backup approaches:
- Database backup via phpMyAdmin or command line:
$ mysqldump -u username -p prestashop_database > backup_$(date +%Y%m%d).sql
-
File backup: Archive your entire PrestaShop directory, including
/config,/modules,/themes, and/uploadfolders. -
PrestaShop-specific backup modules: Tools like “PrestaShop Backup” or “Full Backup” automate this process and can be configured to store backups offsite.
Tip: Store backups in at least two locations—preferably with one offsite (cloud storage, remote server). Test your restore process on a local machine before you need it in an emergency.
2. Set Up a Staging Environment
A staging environment is a clone of your live site—same code, same database, same configuration—isolated from public access. Here, you’ll test the PHP upgrade first, identifying issues without impacting real customers.
Most quality hosts offer staging environments: SiteGround, WP Engine, Kinsta, and many dedicated PrestaShop hosts include one-click staging. If your host doesn’t provide this, you can manually create a staging site by:
- Creating a subdomain (staging.yourstore.com)
- Copying files to the staging directory
- Creating a database clone
- Updating
app/config/parameters.php(PrestaShop 1.7) orapp/config/parameters.yml(PrestaShop 8) with staging credentials - Configuring the staging site to avoid search engine indexing
This extra effort pays dividends: you’ll catch problems before they affect your revenue.
3. Check Module & Theme Compatibility
Outdated or poorly coded modules cause most upgrade failures. Before proceeding, you need to verify that every module and your theme support the target PHP version.
Start by reviewing the module list in your PrestaShop back office (Modules → Module Catalog). For each third-party module:
- Check the developer’s documentation or product page for PHP version requirements
- Contact the developer directly if this isn’t specified
- Update to the latest version before testing
For your theme, the same applies: verify compatibility with the theme developer. Custom themes may require code updates—particularly if they use deprecated PHP patterns.
Of course, you may encounter modules without clear compatibility information. This presents a decision point: either replace outdated modules with alternatives, or plan to update them yourself (if you have the capability). Keeping modules that aren’t compatible risks breaking your store entirely.
Step 3: How to Upgrade PHP for Your PrestaShop Store
With your backups secured and staging environment tested, we can proceed to the actual upgrade. The exact steps depend on your hosting environment—let’s cover the most common scenarios.
cPanel / Plesk (Shared Hosting)
Most shared hosting providers use cPanel or Plesk. Here’s the typical process:
- Log in to your hosting control panel. Navigate to the PHP management section—it may be named “PHP Selector,” “MultiPHP Manager,” “PHP Configuration,” or similar.
- Choose your domain. cPanel’s MultiPHP Manager lets you select which domain uses which PHP version independently.
- Select the new PHP version from the dropdown. You’ll typically see options like 7.4, 8.0, 8.1, 8.2—sometimes more.
- Configure PHP settings (optional). Many hosts let you adjust
memory_limit,upload_max_filesize, and other directives. PrestaShop generally works fine with defaults—though for large catalogs, you may need to increasemax_execution_timeandmemory_limit. - Save/Apply changes. The server updates relevant configuration files automatically.
This process usually takes effect immediately—no restart required.
Note: Some hosts (like SiteGround) use a different interface called “Site Tools” with a “PHP Manager” section. The principles are the same though: select the version, apply it, wait a moment for propagation.
SSH / Command Line (VPS / Dedicated)
If you manage your own server or have SSH access to a VPS, you’ll use different commands depending on your Linux distribution.
Ubuntu/Debian with Apache:
$ sudo a2dismod php7.4 # Disable old version
$ sudo a2enmod php8.1 # Enable new version
$ sudo systemctl restart apache2
Ubuntu/Debian with Nginx + PHP-FPM:
$ sudo systemctl disable php7.4-fpm
$ sudo systemctl enable php8.1-fpm
$ sudo systemctl restart php8.1-fpm nginx
CentOS/RHEL/Fedora:
$ sudo dnf remove php-cli php-common # Remove old packages (careful with dependencies!)
$ sudo dnf install php-cli php-common php-mbstring # etc.
Of course, package names and service names vary. Run php -v after changes to verify the new version is active.
Cloud Platforms (AWS, DigitalOcean, etc.)
If you’re on a Platform-as-a-Service (PaaS) like AWS Elastic Beanstalk, Heroku, or Platform.sh, PHP version configuration typically happens through configuration files:
- Elastic Beanstalk:
.ebextensions/php.configwithoption_settings - Platform.sh:
plarform.app.yamlwithtype: php:8.1 - Heroku:
composer.jsonrequiresection specifying"php": "^8.1"
Each platform has its own documentation—consult yours for precise steps.
One may wonder: can I upgrade PHP without touching anything else? In most cases, PHP is decoupled from the web server; switching versions affects only PHP execution—not Apache/Nginx configurations. However, PHP extensions differ between versions—you’ll need to install the correct ones for your new PHP version (like php8.1-mbstring, php8.1-xml, etc.).
Step 4: Post-Upgrade Verification
After switching the PHP version on your staging site, it’s time to test thoroughly.
- Browse the Front Office: Navigate your store as a customer would. Visit the homepage, category pages, product pages, and add items to the cart.
- Test the Checkout Process: Proceed through the entire checkout process to ensure it functions correctly.
- Check the Back Office: Log in to your PrestaShop back office. Check key areas like orders, products, and module configurations.
- Review Error Logs: Check your server’s error logs for any PHP errors or warnings. This can help you pinpoint specific issues with modules or themes.
Once you have verified that everything works perfectly on your staging site, you can repeat the PHP version switch on your live site.
Troubleshooting Common Issues
If you encounter problems, don’t panic. Here are some of the most common issues:
- 500 Internal Server Error: This is often caused by an incompatible module or theme. Use PrestaShop’s “Debug Mode” to see a more specific error message, which will usually point to the file and line number causing the problem.
- White Screen of Death (WSOD): A blank white screen is another symptom of a fatal PHP error. Again, enabling debug mode is the key to diagnosing the underlying cause.
- Deprecated Function Warnings: You may see warnings about “deprecated functions.” These are not errors but notices that a certain PHP function is outdated. While your site will still work, these should be reported to the relevant module or theme developer for a future update.
Conclusion
Upgrading the PHP version of your PrestaShop store is an essential maintenance task that offers significant benefits in security, performance, and stability. By following a careful process of checking compatibility, backing up your site, testing in a staging environment, and verifying the results, you can ensure a successful and seamless upgrade. A modern, secure, and fast platform provides a better experience for your customers, no matter where they are in the world.
Sponsored by Durable Programming
Need help with your PHP application? Durable Programming specializes in maintaining, upgrading, and securing PHP applications.
Hire Durable Programming