How to change php upload limit in XAMPP

How to change the max upload size in XAMPP

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.

php upload limit error message
Steps to change file upload size:
  • Open C drive with administrative access and then open xampp folder.


    open xampp folder
  • Click on the folder  php and open php.ini file


    open php folder




    open php ini in php folder

  • 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.


    upload max file size


  • 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.



    post max size in php ini



  • Save the changes made and restart the apache in server (XAMPP).


    restart apache in xampp



    Please 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.

Leave a Reply

Your email address will not be published. Required fields are marked *