How to fix PHP settings, timeout and upload limit issues when installing PrestaShop themes via back office?

Summary
When installing themes in PrestaShop's admin backend, upload failures or timeouts often occur due to restrictive PHP server configurations. Key parameters like `uploadmaxfilesize`, `postmaxsize`, `maxexecutiontime`, and `memorylimit` need adjustment in the `php.ini` file to resolve these issues. Recommended values for theme installation are: `uploadmaxfilesize = 64M`, `postmaxsize = 128M`, `maxexecutiontime = 300`, and `memorylimit = 256M`. These settings can be edited in the main `php.ini` file if you have full server access, or placed inside a `.user.ini` file for shared hosting. For cPanel users, these values can also be changed directly within PHP settings. As an alternative workaround, if host blocks php configuration changes, avoid uploading themes via backend and instead extract them locally on your PC, upload the theme folder to `/themes/`, then activate it in PrestaShop's admin backend. Always back up files and test before installing a new theme.
Admin
Moderating
Donor Member
Master Member
Elite Member
Active Member
Joined
May 31, 2020
Messages
2,980
Reaction score
1,693
When installing themes from the PrestaShop admin backend, upload failures or timeouts are almost always caused by restrictive PHP server configuration. You can adjust the parameters below in php.ini.

Key PHP parameters to modify:

  1. upload_max_filesizeThis sets the maximum size for a single uploaded file. It needs to be larger than your theme ZIP file.
  2. post_max_sizeDefines the total size of POST data. This value must be bigger than upload_max_filesize.
  3. max_execution_timeControls how long a PHP script can run. Increase it to prevent timeout during theme archive extraction.
  4. memory_limitRaise this value to avoid out-of-memory crashes when unpacking large theme packages.
Recommended temporary values for theme installation:upload_max_filesize = 64Mpost_max_size = 128Mmax_execution_time = 300memory_limit = 256M

Ways to apply these settings:

  • Edit the main php.ini file if you have full server root access.
  • Use .user.ini placed inside your web root folder for shared hosting.
  • Some hosts allow changing these values directly inside cPanel hosting PHP selector.After changing php settings, restart PHP-FPM or Apache service, then verify new values take effect via phpinfo().
Alternative workaround if host blocks php configuration changes:If you cannot modify PHP limits, avoid backend upload. Extract the theme package locally on your PC, upload the theme folder to /themes/ using FTP, then go into PrestaShop backend to refresh and activate the theme.

Important notes:These values are temporary for theme installation. After finishing the theme setup, you can lower the PHP values back for normal site security.Always backup files and database before theme installation, and test first on staging.
 
Trending Resources
Back
Top