To increase the upload file size limit on your website, you need to edit PHP’s configuration settings. Unfortunately, not everyone has their own web server, so most of the time people are constrained by the limits of shared hosting. But you can still modify your base php.ini file by creating your own php.ini with the edits that you want.
Your php.ini file needs to be in every folder that’s going to be affected, or at least in the folder where the php script is being called from. Unfortunately if you have dozens of folders that need this edit, then you’ll need dozens of php.ini files.
An alternative is to then use .htaccess. By just placing a.htaccess file in your root folder, all folders beneath it will also have the change. The code to change your PHP max file upload size is:
RewriteEngine On
php_value post_max_size 1000M
php_value upload_max_filesize 1000M
php_value max_execution_time 6000000
You can edit it to suit your needs. 1000M = 1GB, so edit accordingly. Do note that your host will need to allow PHP edits though.
Similar Posts:
- How To Solve Problem of PHP Fatal error: Allowed memory size of 8388608 bytes exhausted…
- How To Create And Use .htaccess Files For Apache Web Server in Microsoft Windows
- How To Edit .htaccess So That SSI Include Code Will Run
- Microsoft Office Outlook (Outlook XP/2002, Outlook 2003 or Outlook 2007) Personal Folders (PST) Backup Tool
- How To Print The List of Files in a Folder on the Mac


August 7th, 2008 at 10:28 pm
thanks very helpfull my friend
October 11th, 2008 at 6:55 am
I get error internal server error when doing this things.
January 2nd, 2009 at 6:58 am
tankyou my friend you are the legend
very tanks
best wishes
October 16th, 2009 at 10:42 am
Cool. I’m going to try this out on the rackspace cloud.
January 17th, 2010 at 11:03 am
Same error
June 8th, 2010 at 10:32 pm
Do you know of anyway with htaccess to disable someone from using your domain to point to their own website on the same server? Ex: they use YOURDOMAIN.com to promote their PHISHING WEBSITE.COM by using this simple URL to send users : YOURDOMAIN.COM/~phishing/file.html
Any help would be greatly appreciated. Thanks
June 9th, 2010 at 12:25 am
Do you know the URL in question? if you do, sounds like you could use a redirect command, like so: RedirectTemp /~phishing/file.html http://www.yourdomain.com