Home > Backend Development > PHP Tutorial > How to Increase My Website's Maximum File Upload Size?

How to Increase My Website's Maximum File Upload Size?

Patricia Arquette
Release: 2024-12-27 06:45:09
Original
512 people have browsed it

How to Increase My Website's Maximum File Upload Size?

How to Increase Maximum Upload File Size

When attempting to upload files larger than 30 MB to a website hosted on a PC without direct access, users may encounter an error due to the server's maximum file size limit. To resolve this issue, follow these steps:

Solution:

  1. Locate the php.ini file on your server. You can typically find it in the root directory of your website or in the directory where your PHP installation is located.
  2. Open the php.ini file using a text editor.
  3. Find the line that begins with "upload_max_filesize" and change its value to the desired upload limit. For example, if you want to allow files up to 40 MB, change the line to:
upload_max_filesize = 40M
Copy after login
  1. Find the line that begins with "post_max_size" and change its value to be equal to or greater than "upload_max_filesize". For example, change the line to:
post_max_size = 40M
Copy after login
  1. Save the php.ini file and restart your web server.

Note that if you do not have access to the server's php.ini file, you will not be able to modify the maximum upload file size as it cannot be changed at runtime.

The above is the detailed content of How to Increase My Website's Maximum File Upload Size?. For more information, please follow other related articles on the PHP Chinese website!

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template