You need to edit the file called /etc/php/7.0/apache2/php.ini.
Increase file upload size limit in PHP-Apache
Type the following command to edit the php.ini:
$ sudo vi /etc/php/7.0/apache2/php.ini
Find and set the following two values:
post_max_size = 100M
upload_max_filesize = 100M
Save and close the file. Where,
- post_max_size = 100M :
- upload_max_filesize = 100M : Maximum allowed size for uploaded files.
Restart Apache server
Type the following command to restart the Apache2 server:
$ sudo service apache2 restart
OR
$ systemctl restart apache2.service
Now you should able to upload file upto 100MB:
Fig.01: Changed upload_max_filesize on PHP
🐧 Get the latest tutorials on Linux, Open Source & DevOps via RSS feed or Weekly email newsletter.
🐧 1 comment so far... add one ↓
🐧 1 comment so far... add one ↓
Category | List of Unix and Linux commands |
---|---|
File Management | cat |
Firewall | Alpine Awall • CentOS 8 • OpenSUSE • RHEL 8 • Ubuntu 16.04 • Ubuntu 18.04 • Ubuntu 20.04 |
Network Utilities | dig • host • ip • nmap |
OpenVPN | CentOS 7 • CentOS 8 • Debian 10 • Debian 8/9 • Ubuntu 18.04 • Ubuntu 20.04 |
Package Manager | apk • apt |
Processes Management | bg • chroot • cron • disown • fg • jobs • killall • kill • pidof • pstree • pwdx • time |
Searching | grep • whereis • which |
User Information | groups • id • lastcomm • last • lid/libuser-lid • logname • members • users • whoami • who • w |
WireGuard VPN | Alpine • CentOS 8 • Debian 10 • Firewall • Ubuntu 20.04 |
Should also mention that PHP has a time out limit, regardless if the file is done or not. I ran into this issue with importing databases. My DB was over 2GB, and it timed out constantly.
Just something people should be aware of, especially if you have slow internet.