Q:

Working with wordpress using laravel valet, unable to increase maximum upload limit

Wordpress keeps stating max file upload limit is 2mb. phpinfo() says the same. Using PHP ver 7+
Have tried changing by creating php.ini and .htaccess files in both root and wp-admin directories. Nothing seems to work.
php.ini
; Maximum allowed size for uploaded files.
upload_max_filesize = 40M

; Must be greater than or equal to upload_max_filesize
post_max_size = 40M

.htaccess
php_value upload_max_filesize 40M
php_value post_max_size 42M

A:

Make sure that you edited the php.ini file that is referenced in your phpinfo() and that you restart the services using valet restart afterwards.
Worked for me.

A:

Open a terminal and type
$ php --ini

Configuration File (php.ini) Path: /usr/local/etc/php/7.1
Loaded Configuration File:         /usr/local/etc/php/7.1/php.ini
Scan for additional .ini files in: /usr/local/etc/php/7.1/conf.d
Additional .ini files parsed:      /usr/local/etc/php/7.1/conf.d/ext-geoip.ini,
/usr/local/etc/php/7.1/conf.d/ext-gmp.ini,
/usr/local/etc/php/7.1/conf.d/ext-igbinary.ini,
/usr/local/etc/php/7.1/conf.d/ext-imagick.ini,
/usr/local/etc/php/7.1/conf.d/ext-mcrypt.ini,
/usr/local/etc/php/7.1/conf.d/ext-memcached.ini,
/usr/local/etc/php/7.1/conf.d/ext-opcache.ini,
/usr/local/etc/php/7.1/conf.d/ext-redis.ini,
/usr/local/etc/php/7.1/conf.d/php-memory-limits.ini

Open php-memory-limits.ini like that :
nano /usr/local/etc/php/7.1/conf.d/php-memory-limits.ini

You can now update the file with other value for upload_max_filesize and post_max_size
Save it and valet restart.

