Home Guides Glossary

Increasing User File Upload Limits Using php.ini on Your Linux Server

For the shared hosting version of these instructions, see PHP upload limits on shared hosting

The location of your php.ini file can vary, depending on your operating system/control panel combination. If you are using Fedora 4 with Parallels Plesk Panel, for example, this file is in the following location: /etc/php.ini

If you are using a different operating system and/or control panel, you can find the location of your php.ini file by running the following from your command line:

php -i | grep php.ini

There are two variables within your php.ini file that are responsible for managing user file uploads.

  • post_max_size This variable determines the maximum amount of data that PHP will accept in a single form submission using the POST method. Its default value is 8 MB, as shown below:
    post_max_size = 8M
  • upload_max_filesize This variable limits the size of an individual file uploaded to your Website. Its default value is 2 MB, as shown below:
    upload_max_filesize = 2M

An increase in the value of these variables expands user file upload limits.

After making changes to php.ini, you must perform an httpd restart for them to take effect. This is accomplished by running the following from your command line:

/etc/init.d/httpd restart

Domain Registration

Pay less for website domain names. Register your own .com, .net or .org for as low as $10.18 per year. We have everything you need to get online with your new domain.

Website Builder

Build an amazing website in just under an hour with Website Builder. Take advantage of designs created just for your industry and then customize them to reflect your one-of-a-kind idea.

Website Security

Protect your website and keep customers safe. Your comprehensive Website Security solution. Get peace of mind by securing your websites.

cPanel Hosting

Everything needed to give your website the high-performance home it deserves.  Protect transactions and secure your customer's data with a SSL Certificate
Copyright © 2005 - 2024.  All rights reserved.  Privacy Policy