As the title states i have tried it with the htaccess file to change the maximum upload size and nothing i have even created a php.ini file in the root of the wordpress folder and still nothing can some here please help me.
-
i think we can change this upload limit in the server only– AdarshSep 24, 2018 at 11:58
-
i have full access to it as its hosted on a private ubuntu server– djwayne1985Sep 24, 2018 at 12:01
-
downvoted as it is impossible to answer without much more details. Anyway it sound like a php configuration question than a wordpress development one. Wordpress itself do not have limits (except for multisite)– Mark KaplunSep 24, 2018 at 12:11
4 Answers
php.ini should be in the /wp-admin/ folder, not the root. Also, I've had success using a combination of the following in my /wp-admin/php.ini file AND a directive to increase the memory in my wp-config.php file, increased memory is needed when uploading larger files.
Put something like this in your php.ini file (change values as you need to):
memory=512MB
post_max_size=20MB
upload_max_filesize=50MB
Then in your wp-config.php file, add something like this:
define('WP_MEMORY_LIMIT', '512M');
The upper memory limit doesn't need to be the same in both, but I find it works best when it is the same.
Try to create .user.ini in root
upload_max_filesize = 500M
post_max_size = 256M
memory_limit = 500M
max_execution_time = 300
max_input_vars = 500M
Hope this will help!
@ini_set( 'upload_max_size' , '64M' );
@ini_set( 'post_max_size', '64M');
@ini_set( 'max_execution_time', '300' );
Add this in function.php i think this will works
i have fixed the problem it was a setting within apache itself i had to change sorry if i have messed you about it wasn't intentional just happy to have it sorted now
-
Welcome to WPSE. Thank you for checking back, but please edit your answer and show the setting that you changed to help future visitors who are searching for the solution to a similar issue. After a couple days, come back and click the check mark next to your answer to mark it as accepted and close out the question. Sep 25, 2018 at 17:37