Max Upload WordPress File Options

Use these code snippets to modify a website’s max upload settings.

File Options

Media Handling

File uploads Enabled

Max size of post data allowed 256M
Max size of an uploaded file 256M
Max effective file size 256 MB
Max number of files allowed 20

Server Environment

PHP time limit 3600
PHP memory limit 512M
Max input time 300
Upload max filesize 256M
PHP post max size 256M

WordPress Constants

				
					WP_MEMORY_LIMIT 40M
WP_MAX_MEMORY_LIMIT 512M
				
			

Methods

php.ini (edit or create in /wp-admin)

nano /var/www/user/domain/wp-admin/php.ini

				
					upload_max_filesize = 256M
post_max_size = 256M
max_execution_time = 300
				
			
				
					console.log( 'Code is Poetry' );
				
			
				
					console.log( 'Code is Poetry' );
				
			

functions.php

@ini_set( ‘upload_max_size’ , ‘256M’ );
@ini_set( ‘post_max_size’, ‘256M’);
@ini_set( ‘max_execution_time’, ‘300’ );

.htaccess

php_value upload_max_filesize 512M
php_value post_max_size 512M
php_value max_execution_time 3600
php_value max_input_time 3600

Plugins

  • Big File Uploads – Increase Maximum File Upload Size

Related Posts

Ultimate Addons for Elementor causing infinite loading in Elementor
Disable auto-update Email Notifications causing critical errors