Once in a while you’d like to upload files to your website that are larger than the default file size limit of 2MB. This would be the case, when publishing an ebook in pdf with a lot of images, or large photo albums in a zip format or really details architectural plans.
Turns out this setting is set via the php.ini file that configures your site’s interaction with your servers php-engine.
Two parameters in your php.ini file control the upload size limit:
For this site, the parameters read like this:
post_max_size = 8M
upload_max_filesize = 2M
How do you find the right php.ini?
There are multiple versions of “php.ini” files available on the server. You need to find out which is the one drives your site?
- Create a new file in your text editor and name it something like findphp.php
- Add one line
<?php phpinfo(); ?>
- upload the file to your website’s home directory
- call the page by putting yourdomain.com/findphp.php in your browser
You’ll see something link this:
Now you can navigate to the directory and edit php.ini either via command line tool or your cpanel file manager.
Make a back-up first, just in case.
Links learning more
Post your questions in the comment section.