There is some methods. Follow any of these for your help-
Method 1: Edit .htaccess
php_value upload_max_filesize 10M
php_value post_max_size 20M
php_value memory_limit 32M
Method 2: Edit php.ini
upload_max_filesize = 10M
post_max_size = 20M
memory_limit = 32M
Method 3: Suhosin (Optional)
This is not installed by default on many servers (latest version of Debian, Ubuntu, and FreeBSD does install Suhosin by default). Use phpinfo() to find out if suhosin enabled or not.
<?php
phpinfo();
?>
If enabled then-
suhosin.memory_limit=32M
You can change the numeric values as your need. But better keep smaller so your server CPU not get much load also your hosting space limit.
You can also check-
max_execution_time = 240
max_input_time = 240