How to increase PHP upload file size directive
Many times, trying to upload a file in MailWizz for different purposes, like importing a subscribers CSV list or uploading an email template, you got stuck with this error message:
This means that the maximum allowed file size is 2MB (the default for most of the PHP installations). The file that we were trying to upload had 5MB.
If we go to Backend->Miscellaneous->PHP info we will see this directive setup to 2MB as below:
To change this directive, you should edit your php.ini file and put a higher value. You will find the location of the php.ini file using the info below:
Depending on your PHP version or server configuration, the path of the php.ini will be different.
Now, all you need to do is to edit that file and change the directive value. After the change, we need to restart the web server and/or php-fpm:
NOTE. As you can see in the image above, there are other directives that can prevent you to upload files. Using the same steps, you can change them too if needed.
After you change the value to 108Mb, checking the PHP info in the backend you will see:
Now, our import will start:
NOTE!If the upload still fails after this, you might need to adjust your server to allow uploading larger files.