How to change the maximum upload file size in PHP ? Last Updated : 01 Feb, 2019 Summarize Comments Improve Suggest changes Share Like Article Like Report The maximum size of any file that can be uploaded on a website written in PHP is determined by the values of max_size that can be posted or uploaded, mentioned in the php.ini file of the server. In case of hosted server need to contact the administrator of the hosting server but XAMPP has interpreters for the scripts written in PHP and Perl. It helps to create local http server for developers and it provides them full physical and administrative access to the local server. Hence it is the most widely used server and it is very easy to increase the limit on upload files to the desired value in this server. The error is generally thrown as follows: Steps to change file upload size: In case of local server Open C drive with administrative access and then open xampp folder. Click on the folder php and open php.ini file in editor mode (like Notepad or Wordpad ). In php.ini file search the keyword upload_max_filesize and update its value to the desired file size of a single attachment of largest size. By default, its value is set to 2 MB maximum. Then search the post_max_size keyword and update its value to the maximum required value which is the size of the whole content and attachments included in the post. Save the changes made and restart the server (XAMPP). Note: The upload_max_size limits the size of single attachment and post_max_size is the limit for all the content of the post. Comment More infoAdvertise with us Next Article How to change the maximum upload file size in PHP ? D dummyid1998 Follow Improve Article Tags : Web Technologies PHP Similar Reads How to upload a file in PHP ? In this article, we will learn how to upload a file using PHP. Let us first understand some basic configurations. Approach: In your "php.ini" file, search for the "file_uploads" parameter and set it to "On" as mentioned below. file_uploads = On In the "index.html" file, the enctype must be multipart 3 min read How to check the Type and Size before File Uploading in PHP ? In PHP, it's essential to validate file types and sizes before allowing users to upload files to a server. This helps prevent potential security vulnerabilities and ensures that only allowed file types and sizes are accepted. PHP provides various methods to perform these validations, including check 2 min read How to Increase Maximum File Upload Size in WordPress? Increasing the maximum file upload size in WordPress is a common need for many site owners. Whether you're uploading large images, videos, themes, or plugins, running into upload limits can be frustrating. This guide will show you various methods to increase the maximum file upload size in WordPress 2 min read How to Change the Number of Open File Limit in Linux? If you are an active Linux user, who has to work with many files on Linux at a time then you might have definitely faced a problem regarding âToo many open filesâ on a Linux system. When you have reached the maximum open file limit you will get an error message displaying "Too many open files (24)â 4 min read How to access actual name of uploaded file in PHP ? In PHP, we can access the actual name of the file which we are uploading by keyword $_FILES["file"]["name"]. The $_FILES is the by default keyword in PHP to access the details of files that we uploaded.The file refers to the name which is defined in the "index.html" form in the input of the file.The 2 min read Like