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
    – Adarsh
    Sep 24, 2018 at 11:58
  • i have full access to it as its hosted on a private ubuntu server Sep 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) Sep 24, 2018 at 12:11

4 Answers 4


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):


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!

  • ill try now n let you know Sep 24, 2018 at 12:03
  • its not worked but thank you Sep 24, 2018 at 12:05
  • Have you check using functions.php ? Sep 24, 2018 at 12:11
@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

  • that didnt work either Sep 24, 2018 at 12:08
  • i changed the code check now
    – Adarsh
    Sep 24, 2018 at 12:10
  • is that the file in the themes folder ?? Sep 24, 2018 at 12:11
  • yes in your theme folder
    – Adarsh
    Sep 24, 2018 at 12:12
  • let me know if its worked
    – Adarsh
    Sep 24, 2018 at 12:20

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.