There is currently a problem that may occur when you create a virtual product and upload a file for that product. The problem appears in two ways: 1)As an error message stating that the file is missing, and 2)with no actual error message. The process simply seems to time out. The following article explains how problem occurs and how to fix the issue.

Description of the Upload error

The error occurs when you create a virtual product and then attempt to associate a large file with that product. Depending on the size of the file that you upload and the declared upload limit, you may or may not see the following error:

Upload error message

In some cases, you may not see the error message appear, and the PrestaShop application will appear to be running normally. You can verify the problem by simply waiting a few minutes. When you review the virtual product, the file will not be available for the virtual product.

The Upload file size limit for Virtual Products in PrestaShop 1.6

PrestaShop 1.6 allows you to add virtual products that have associated downloadable files in your catalog of products. These files may vary in size, but by default PrestaShop limits the size of the file to 10 MB. The 10 megabyte limit can be found in the UPLOADER.PHP file of your PrestaShop installation. If your file is larger than 10 MB, then you will need to increase the virtual product upload limit.

Fixing the Upload Limit for Virtual Products in PrestaShop 1.6

We will be using the cPanel File Manager and the editor option to edit the upload limit in the UPLOADER.PHP file. If you are not a customer of Web Hosting Hub or you prefer to use a different program, you can also use an FTP client to download the file, and then a text editor to edit the file. Note that the path may vary depending on where you have installed PrestaShop 1.6, but the default path for the file that you are editing is /public_html/classes/uploader.php.

  1. Login to the cPanel.
  2. Click on the cPanel File Manager icon. Select Home Directory, then click on "Go" in order to see your files.
  3. Find the location of your PrestaShop 1.6 installation, then open the folder with the installation files in File Manager. If you installed it to your primary domain, the default folder is PUBLIC_HTML.
  4. Locate the CLASSES folder of your PrestaShop installation and open it by double-clicking on it.
  5. Scroll down the file list until you find a file named UPLOADER.PHP. Right-click on it, then select Edit or Code Edit to edit the file.
  6. Locate the line that reads "const DEFAULT_MAX_SIZE = 10485760;". It will be near the top of the file. The screenshot below gives an example of how the entry will appear in the file:

    Uploader default screen
  7. Click on the number in the line that shows const DEFAULT_MAX_SIZE = 1048576 and change the upload size to meet your file requirements.
  8. Click SAVE in the top right hand corner to complete the edit.

The problem with the virtual product file will be fixed and PrestaShop 1.6 should now be able to save a file that is larger than 10MB. If you continue to have issues with this problem, please leave a question for the Community support team.

Did you find this article helpful?

We value your feedback!

Why was this article not helpful? (Check all that apply)
The article is too difficult or too technical to follow.
There is a step or detail missing from the instructions.
The information is incorrect or out-of-date.
It does not resolve the question/problem I have.
How did you find this article?
Please tell us how we can improve this article:
Email Address

new! - Enter your name and email address above and we will post your feedback in the comments on this page!

Did you find this article helpful?


n/a Points
2015-05-21 2:22 pm

Above Code did not work. Here is the fix:


Location: {PrestashopFolder}/controllers/admin

File: AdminProductsController.php

Old Code (line # 1340):

$post_max_size = Tools::getMaxUploadSize(Configuration::get('PS_LIMIT_UPLOAD_FILE_VALUE') * 1024 * 1024);


New Code: $post_max_size=104857600;


Replace old code with the net code. It will allow you to upload 1000 MB file. You may add or remove Zero (0) from the last to increase or decrease teh limit.

n/a Points
2015-11-04 10:24 pm

I am unable to do this, please provide me a detailed solution.

17,314 Points
2015-11-05 4:50 pm
Hello AbdulWahab,

You will need to have access to the files of your PrestaShop installation. If you are hosting with Web Hosting Hub, then you could use the file manager to find the file. Standard procedure before you make ANY change to your website is to make a backup. Please backup before you make any changes. The location is given to you above - when you look at the directories, match it with the location controllers/admin, then edit the AdminProductsProducts.php file.

You will then look for the following:

Old Code (line # 1340):

$post_max_size = Tools::getMaxUploadSize(Configuration::get('PS_LIMIT_UPLOAD_FILE_VALUE') * 1024 * 1024);

And replace it with the following code.

New Code: $post_max_size=104857600;

I hope that helps to answer your question! If you require further assistance, please let us know!

Arnel C.

n/a Points
2018-02-19 3:09 am

I replaced the old with this  $post_max_size=104857600; and my file still says The file size exceeds the size allowed by the server. The limit is set to 8 MB.. What can I do?

12,339 Points
2018-02-19 7:32 pm
You may have to make the changes in your php.ini file recursive, so the changes are reflected on the child folders. I recommend creating a phpinfo page to verify the setting has been changed.

Thank you,
n/a Points
2016-06-22 11:33 am

Thanks a lot. Second solution worked very well.




n/a Points
2017-04-24 1:10 pm

It;s not diffiuclt.If you CANNOT  edit php.ini  or htacces  I've this tips:   You must acces Direct Admin Account.  Make 3 browser tabs1 First open your product (vritual product) in a browswer tab2 Open you Direct admin in antoher tab of your browser3 Open you preferences in PRestashop backoffice, by the upload size settings.Al those Three tabs must open.  Go to your first tab first Ad your uppload virtual product  (BUT NOT SAVE)Go to Direct admin, and settings set on php module version:  NATIVE and SAVEGo to third tab and change te prestahop backend upload size to 600 (megabytes) SAVE.Go back to the first tab and Click SAVE and STAY...   Wait, and now upload is succesfull.Go back to your php settings in direct admin, and set this to current 7.0 version,  SAVE your module set.You can set back in orginal settings the prestashop backend upload settiings, but' its not nessescsy.Works in 1.6 en 1.7  PRestashop.-------------------------------Go to  for  hide your files url path like mp4 video in source code! And in browser address.

Post a Comment

Email Address:
Phone Number:

Please note: Your name and comment will be displayed, but we will not show your email address.

Related Questions

Here are a few questions related to this article that our customers have asked:
Ooops! It looks like there are no questions about this page.
Would you like to ask a question about this page? If so, click the button below!
Need More Help?

Help Center Search

Current Customers

Email: Ticket: Submit a Support Ticket
Call: 877-595-4HUB (4482)
757-416-6627 (Intl.)
Chat: Click To Chat Now

Ask the Community

Get help with your questions from our community of like-minded hosting users and Web Hosting Hub Staff.

Not a Customer?

Get web hosting from a company that is here to help.