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

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.

Wordpress keeps stating max file upload limit is 2mb. phpinfo() says the same. Using PHP ver 7+ Have tried changing by creating php.info and  First lets learn to increase upload size limit of All-in-One WP Migration using htaccess. Increase upload size using htaccess. As per All-in-One WP Migration plugin author help guide you can increase upload size limit by adding few line code in .htaccess file. If you follow this way then you must have root access of the website.

I think it may help you

A) Theme Functions File

There are cases where we have seen that just by adding the following code in the theme function’s file, you can increase the upload size:

@ini_set( 'upload_max_size' , '64M' );

@ini_set( 'post_max_size', '64M');

@ini_set( 'max_execution_time', '300' );

B) Create or Edit an existing PHP.INI file

In most cases if you are on a shared host, you will not see a php.ini file in your directory. If you do not see one, then create a file called php.ini and upload it in the root folder. In that file add the following code:

upload_max_filesize = 64M

post_max_size = 64M

max_execution_time = 300

C) htaccess Method

Some people have tried using the htaccess method where by modifying the .htaccess file in the root directory, you can increase the maximum upload size in WordPress. Open or create the .htaccess file in the root folder and add the following code:

php_value upload_max_filesize 64M

php_value post_max_size 64M

php_value max_execution_time 300

php_value max_input_time 300

To fix the 504 error you need to change the default timeout to m with Ajax file uploading. I no longer see 504 Gateway Timeout when uploading files with Ajax request Which files should be changed on an existing/working Valet installation? Should I create php.ini or set in the php-memory-limits.ini? Do you want to increase the maximum file upload size in WordPress. Some times low file upload size limit can stop you from uploading files via media uploader, or install plugins and themes. In this article, we will show you how to easily increase the maximum file upload size in WordPress to fix those issues.

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.

If you use Laravel Valet and want to increase the memory_limit, you have to edit php-memory-limits.ini: sudo nano  One of the most common of these settings is the maximum upload filesize ("upload_max_filesize"). This is a setting commonly found within a file known as the php.ini file. There are a few common errors that occur in Wordpress and other PHP-based programs that use the php.ini for certain settings.

I don't if this is your case,

BUT

if you are working with a Wordpress Network (multisite) , be aware that there is a network setting for this in /wp-admin/network/settings.php

I spent an hour on this *%#@£%!

How can I change the memory limit for laravel valet? INI by name php-memory-​limits. there you will find the limitations. https://laracasts.com/discuss/channels/​servers/valet-and-memory- Maximum allowed size for uploaded files. ; http://​php.net/upload-max-filesize upload_max_filesize = 255555M [. To register the custom cache driver with Laravel, we will use the extend method on the Cache facade. The call to Cache::extend could be done in the boot method of the default App\Providers\AppServiceProvider that ships with fresh Laravel applications, or you may create your own service provider to house the extension - just don't forget to register the provider in the config/app.php provider array:

Are you using Laravel Valet? I do and I love it for its simplicity, its magic and the fact that it just works. Alright, cool! But actually one day I hit a  PHP upload limits. The current default PHP upload limits on your WordPress Hosting are currently set to the following. upload_max_filesize = 64M; post_max_size = 64M; Raising your PHP limits. Normally, you would find these settings within your php.ini file. On the WordPress Hosting service, these limits my be adjusted within the .user.ini file.

Today I'll be taking you outside of your current shell and these things that I'll be sharing Laravel Valet Increase Max Upload File Size Are you using Laravel Valet? Hey there folks, an update to WordPress Messenger Customer Chat Plugin So today I've stumbled myself working with AbanteCart on my dev machine  Administration tasks require much memory than usual operation. When in the administration area, the memory can be increased or decreased from the WP_MEMORY_LIMIT by defining WP_MAX_MEMORY_LIMIT. WP_MAX_MEMORY_LIMIT sets the maximum just on admin pages. It’s a terrible naming scheme but it dates back to WordPress 2.5 and nobody dares change it now

After setting up Laravel Valet and MySQL with Homebrew a while ago, local ERROR: failed to mkdir /usr/local/Cellar/php@7.2/7.2.19_1/pecl/20170718 To work on a database-driven site like a Craft CMS or WordPress build, the file /​usr/local/etc/php/7.2/conf.d/php-memory-limits.ini was also in use. At some point of time you may want to change PHP Settings in GoDaddy shared hosting account. Most of time we need to increase memory limit, max upload size and max input size limit because by default these settings are extremely low. GoDaddy keeps master PHP.INI file in /web/conf/ folder which we are not allow to edit. But there is an

Comments
  • Hi @shibu-vs. It looks like the content of this answer is copied directly from wpbeginner.com/wp-tutorials/…. Can you edit your post to reflect proper attribution. Plagiarism is not welcome on stack overflow. (Ref: meta.stackexchange.com/questions/160071/…)