By default the maximum file size to upload to WordPress can be quite low. This can be a problem especially when you are delivering electronic downloads in WP eCommerce or just the Media Library of WordPress. There are several ways to modify this, use one (or all) of the below methods:

php.ini

Add the following lines inside of the php.ini file and save it back to the server.

[code] upload_max_filesize = 64M
post_max_size = 64M
max_execution_time = 300
[/code]

php5.ini

With GoDaddy, simply create a new php5.ini file and add it to the hosting root. Edit the file to include:

[code] upload_max_filesize = 64M
post_max_size = 64M
memory_limit = 96M
[/code]

functions.php

Add the following code to your Theme’s functions.php or to a plugin:

[code] @ini_set( ‘upload_max_filesize’ , ’64M’ );
@ini_set( ‘post_max_size ‘, ’64M’);
@ini_set( ‘max_execution_time’, ‘300’ );
[/code]

Please note that it may take several minutes for this to be visible depending of a number of factors, you can test that the changes took by going to the Media > Upload screen in WordPress and noticing the line:

[code] Maximum upload file size: 64MB.
[/code]

You may also test in your plugin or theme using:

[code] echo ini_get(‘upload_max_filesize’);
echo ini_get(‘post_max_size’);
echo ini_get(‘memory_limit’);
[/code]

If you are looking to save this value as a variable simple convert it to an integer:

[code] $memory_limit = (int)(ini_get(‘memory_limit’));
[/code]

That should do it!