How to increase maximum upload file size in Prestashop

If you're trying to upload a theme/module that has a big package's file size from your Admin Panel on your Prestashop website, you might get an error:

The file is too large. Allowed maximum size is 2 MB.

I don't think this is the first time you've seen this mistake, and it won't be your last. Follow this PrestaShop tutorial for discovering 2 easy solutions to fix the upload_max_filesize error on uploading a commercial module using Module Manager from the modules page in Prestashop Admin Panel instead of asking your hosting provider.

How to increase Maximum Upload File Size in Prestashop

Let's talk we have a new Prestashop module called DocumenThemix. This is one of our latest Prestashop modules helps you create professional, personalised Prestashop documents such as Invoices, Credit Slips or Delivery Slips in PDF that fit your brand, in seconds. It's a great module, and its file size is 7MB.

Sometime, the php configuration puts limits on upload file size. The default settings will restrict this to a max 2 MB upload file size. You need to increase this value to upload your favourite modules & themes (do you know how to install Prestashop Themes?).

Allowed maximum size is 2 MB

First, we need to know about upload_max_filesize and 2 other values.

  • Upload_max_filesize - The maximum length of an uploaded record.
  • Memory_limit - This unit is the maximum quantity of memory in bytes that a script is permitted to allocate. This helps prevent poorly written scripts for eating up all to be had memory on a server. Note that to have no memory restriction, set this directive to -1.
  • Post_max_size - Sets max size of post records allowed. In case you want to upload large files such as the premium Prestashop themes or Documenthemix module, this value should be large than upload_max_filesize. If reminiscence restriction is enabled by your configure script, memory_limit additionally affects document uploading.

Generally speaking, memory_limit need to be large than post_max_size.

I suggest two methods for fixing this problem.

Edit the php.ini

Open php.ini file at /etc/php/apache2/php.ini or your-root-website/php.ini, search for the following variables and change these to:

memory_limit = 50M

upload_max_filesize = 10M
post_max_size = 10M

Some extra values to edit if you want a higher overall performance of your website on the server:

max_execution_time = 300

max_input_time = 600
memory_limit = 720M

Save the file and restart the Apache web server!

Edit .htaccess

If the first way does not work, or you don't have get right of entry to to the servers file system. For example: your web page is hosted on a commercial web server, then edit the .htaccess file in your website's root.

Add these source codes into your .htaccess

php_value upload_max_filesize 10M

php_value post_max_size 20M
php_value memory_limit 32M

Save your file and enjoy your time.

Halloween theme

PrestaSEO AI++.

PrestaSEO AI module

PrestaSEO AI++ is a cutting-edge module designed to take your PrestaShop store’s SEO to the next level. Built with advanced automation and AI technology, it streamlines SEO tasks, making optimization easier and more effective.

Whether you're focused on improving local visibility or cleaning up your site's URL structure, PrestaSEO AI provides a comprehensive suite of features to enhance your store's performance.

Aktualizacja najnowszych modułów!

Age Restriction - 18+ ⊙
Rozwiąż niektóre problemy z wyświetlaniem na urządzeniach przenośnych.


Newsletter Popup v3.2.2
Edycja świąteczna, aby zwiększyć sprzedaż.


Trusty v1.4.7 ⊙
Kompatybilny zarówno z PrestaShop 1.7, jak i PrestaShop 8.


PrestaSOO team
Wszystko, czego potrzebujesz, aby zarabiać na życie wykonując pracę, którą kochasz.

Odkryć

To mądra inwestycja

Moduły PrestaShop, które stworzyliśmy jako pierwsze, aby rozwiązać problem naszego własnego biznesu - strona e-Commerce. Oznacza to, że są bardzo przydatne w poważnym biznesie. Jeśli cenisz swoją usługę internetową, te moduły są mądrą inwestycją.
Sarah Reeves, Programista aplikacji @ PrestaSOO
Wykonane z w Paris i Hanoi
PrestaSOO © 2024. Wszelkie prawa zastrzeżone. // Polityka prywatności Warunki usługi