How to increase and set upload size to 100MB in PHP-Apache

To increase the maximum upload size to 100 MB in PHP running on Apache, you can follow these steps:

  1. Open the PHP configuration file:
sudo nano /etc/php/7.x/apache2/php.ini
  1. Change the following values:
upload_max_filesize = 100M
post_max_size = 100M
  1. Save and close the file.
  2. Restart Apache:
sudo systemctl restart apache2

The maximum upload size has now been increased to 100 MB.

Note: The version number (7.x) in the path to the PHP configuration file may vary depending on the version of PHP installed on your system. Additionally, these steps are specific to a system running PHP and Apache on Ubuntu. The exact steps and configuration file paths may vary for other operating systems.

Leave a Comment