How Tos

How to Increase Upload file Size for WordPress?

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.

Screen Shot 2016-02-06 at 6.53.23 PM

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:

  • upload_max_filesize
  • post_max_size

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 in your browser

You’ll see something link this:

PHP Configuration Info Display

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.