I am using my own localhost (ubuntu and apache2) for running wordpress 4.8 . I want to increase maximum upload file size. I tried these ways but didn't solve :
1.creating php.ini in /var/www/html or changing it in /etc/php/7.0/apache2/php.ini:
upload_max_filesize = 512M
memory_limit = 512M
post_max_size = 512M
max_execution_time = 300
2.changing .htaccess in /var/www/html:
php_value upload_max_filesize 512M
php_value post_max_size 512M
php_value max_execution_time 300
php_value max_input_time 300
3.adding these line of codes in functions.php file in the theme folder:
@ini_set('upload_max_size' , '512M');
@ini_set('post_max_size', '512M');
@ini_set('max_execution_time', '300');
4.using Upload Max File Size plugin. this plugin changed Maximum upload file size: 2 MB. message but after uploading file more than 2mb the HTTP error. accrued. (for fixing this i also tried every solution i found on web (ex: +,+,+) but nothing changed. also turning on wordpress log cant help me. there wasn't anything!! So i gave up. i think the root of this error is bad fix for this problem)
5.changing permissions of all files and folder to 777.
6.after every fix i tried, i also restart apache but nothing changed:
$ sudo service apache2 restart
php.ini? - Ankit Singhphp.iniin/var/www/html/. but i found/etc/php/7.0/apache2/php.iniin phpinfo @ankit - erfan mehraban