To increase the upload size in PHP and Apache, you can follow these steps:
Find the php.ini
file on your server. This file controls many PHP settings, including the maximum file upload size.
Edit the php.ini
file and set the following values:
upload_max_filesize = 100M post_max_size = 100M
These values control the maximum size of uploaded files and the maximum size of POST data, respectively. By setting them to 100M
, you are allowing files up to 100MB to be uploaded.
Save the php.ini
file and restart the Apache server for the changes to take effect.
If you don't have access to the php.ini
file, or if you are using shared hosting, you can also set these values in an .htaccess
file. To do this, create a new .htaccess
file in the root directory of your website and add the following lines:
php_value upload_max_filesize 100M php_value post_max_size 100M
Again, save the file and restart the Apache server for the changes to take effect.