How to change the maximum upload file size in PHP ? Last Updated : 01 Feb, 2019 Comments Improve Suggest changes 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 How to Upload Multiple Images and Text to MySQL Database in PHP? In web development, many times we need to handle multiple files at once while uploading and storing into the database. So in this article, we will see how to do this by various approaches to achieve this using PHP and MySQL. Table of Content Storing Images in the File SystemUsing Base64 EncodingAppr 4 min read How to get the input file size in jQuery ? The task is to get the fileSize when a user uploads it using JQuery. Approach: Display the text Choose file from system to get the fileSize on the screen. Click on the browse button to select the upload file. After selecting a file, the function is called which display the size of the selected file. 2 min read How to get uploaded file information in Receiving Script in PHP ? In this article, we will know how to get the uploaded file information in the receiving script in PHP.When a document/file is uploaded to any application or any browser and to know the basic information of a file like a file name, type of file, and how many bytes are present in the file, PHP offers 3 min read How to write Into a File in PHP ? In this article, we are going to discuss how to write into a text file using the PHP built-in fwrite() function. The fwrite() function is used to write into the given file. It stops at the end of the file or when it reaches the specified length passed as a parameter, whichever comes first. The file 2 min read Write a Code To Upload A File in PHP? PHP makes it easy to upload files in web applications, whether it's for images, documents, or other types of files. With its built-in functions, uploading files to the server becomes a simple task. However, it's important to be cautious when allowing file uploads, as they can pose security risks. Al 6 min read Like