How to increase and set upload file with size up to 10MB in PHP-Apache

607
0

I’m used another site which the failover are used LAMP with CentOS 7.x from the primary server, so how can I able to upload file with size up to 10MB

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 = 20M
upload_max_filesize = 20M

Save and close the file. Where,

post_max_size = 20M
upload_max_filesize = 20M : 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 10MB:

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.