Title: Max File Upload Problem (yes I&#039;ve tried)
Last modified: August 31, 2016

---

# Max File Upload Problem (yes I've tried)

 *  [unalignedcoder](https://wordpress.org/support/users/unalignedcoder/)
 * (@unalignedcoder)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/max-file-upload-problem/)
 * I know this has been asked a countless number of times; but I tried all ways 
   and still have problems…
 * 1) my hosting service raised the limit to 256M; this is confirmed by both cpanel
   and a phpinfo() page in wordpress;
 * 2) I raised the limits accordingly in the functions.php file;
 * 3) I can’t use the htaccess trick because it gives me a 500 error, anyway, as
   I said, php.ini is properly modified;
 * **DESPITE ALL OF THE ABOVE, the wordpress media upload limit is still 8 Megabytes.**
 * Funny thing is, before changing the limit it said “2 Megabytes”, and now it says“
   8 Megabytes”; it sounds like a wordpress limitation/misunderstanding of the server?

Viewing 8 replies - 1 through 8 (of 8 total)

 *  [neotechnomad](https://wordpress.org/support/users/neotechnomad/)
 * (@neotechnomad)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/max-file-upload-problem/#post-6955001)
 * Try wp-config.php –
 * `define('WP_MEMORY_LIMIT', '256M');`
 *  [neotechnomad](https://wordpress.org/support/users/neotechnomad/)
 * (@neotechnomad)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/max-file-upload-problem/#post-6955002)
 * Elegant Themes Blog : [Is The WordPress Upload Limit Giving You Trouble? Here’s How To Change It](https://www.elegantthemes.com/blog/tips-tricks/is-the-wordpress-upload-limit-giving-you-trouble-heres-how-to-change-it)…
   scroll down to “Using .user.ini”.
 *  Moderator [James Huff](https://wordpress.org/support/users/macmanx/)
 * (@macmanx)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/max-file-upload-problem/#post-6955015)
 * [@unalignedcoder](https://wordpress.org/support/users/unalignedcoder/) The maximum
   upload size is controlled at the server-level, not by WordPress. Here are three
   ways you can increase the upload limit:
 * You need to make sure that you have set *both* `upload_max_filesize` *and* `post_max_size`
   as setting just one won’t do it.
 * 1. If you can edit or override the system `php.ini` file, increase the maximum
   file and post sizes. For example, `upload_max_filesize = 100M ;` and `post_max_size
   = 100M ;`
 * 2. If you cannot edit or override the system `php.ini` file, add `php_value upload_max_filesize
   100M` and `php_value post_max_size = 100M` to your `.htaccess` file.
 * 3. If neither of these work, it’s time to ask your hosting provider to increase
   the maximum file and post sizes on your account. Keep in mind that most decent
   hosting providers allow this, and If your hosting provider won’t accommodate 
   you, perhaps it’s time to find a new hosting provider.
 * (in the above examples, the limit is set to 100MB)
 * [@neotechnomad](https://wordpress.org/support/users/neotechnomad/) `define('WP_MEMORY_LIMIT'`
   increases the RAM/memory allocated to PHP, it doesn’t affect upload size. Though
   RAM/memory allocation can sometimes affect uploads, it doesn’t set the upload
   limit. [https://codex.wordpress.org/Editing_wp-config.php#Increasing_memory_allocated_to_PHP](https://codex.wordpress.org/Editing_wp-config.php#Increasing_memory_allocated_to_PHP)
 *  [neotechnomad](https://wordpress.org/support/users/neotechnomad/)
 * (@neotechnomad)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/max-file-upload-problem/#post-6955020)
 * > [@neotechnomad](https://wordpress.org/support/users/neotechnomad/) define(‘
   > WP_MEMORY_LIMIT’ increases the RAM/memory allocated to PHP, it doesn’t affect
   > upload size. Though RAM/memory allocation can sometimes affect uploads, it 
   > doesn’t set the upload limit. [https://codex.wordpress.org/Editing_wp-config.php#Increasing_memory_allocated_to_PHP](https://codex.wordpress.org/Editing_wp-config.php#Increasing_memory_allocated_to_PHP)
 * You’re right. I was mistaken in this case.
 *  Moderator [James Huff](https://wordpress.org/support/users/macmanx/)
 * (@macmanx)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/max-file-upload-problem/#post-6955022)
 * No worries, I learned most of what I know because of mistakes here and there.
   🙂
 *  Thread Starter [unalignedcoder](https://wordpress.org/support/users/unalignedcoder/)
 * (@unalignedcoder)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/max-file-upload-problem/#post-6955069)
 * Thanks all for the input! James, thank you, I think you were right as “post_max_size”
   is still set to “8M”! you would expect people from a hosting service to know 
   about this when a client ask them to raise the limit, what is the point to raise
   one to 256 and leave the other one untouched? I’ve contacted them, hopefully 
   this will work —
    I used to know all this server/php stuff real well but it’s
   amazing how much of a software you can forget once you stop using it even for
   a short while.
 *  Thread Starter [unalignedcoder](https://wordpress.org/support/users/unalignedcoder/)
 * (@unalignedcoder)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/max-file-upload-problem/#post-6955074)
 * … Ok, now wp gives the correct upload limit of 256 Megabytes in the media upload
   panel.
 * however as soon as I try to upload a video of ~50 M, it gives me an unspecified“
   http error”. 🙁
 * Of course this doesn’t happen with your regular ~ 5M file…
 * worth noticing, I am in debug mode but wp isn’t verbose at all. 🙁
 *  Moderator [James Huff](https://wordpress.org/support/users/macmanx/)
 * (@macmanx)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/max-file-upload-problem/#post-6955128)
 * Let’s boost PHP’s memory allocation too.
 * Here are three ways to increase PHP’s memory allocation:
 * 1. If you can edit or override the system `php.ini` file, increase the memory
   limit. For example, `memory_limit = 128M`
 * 2. If you cannot edit or override the system `php.ini` file, add `php_value memory_limit
   128M` to your `.htaccess` file.
 * 3. If neither of these work, it’s time to ask your hosting provider to temporarily
   increase PHP’s memory allocation on your account. Keep in mind that most decent
   hosting providers allocate 32 MB to PHP under each account, and most decent hosting
   providers allow users to temporarily increase the memory allocation. If your 
   hosting provider won’t accommodate you, perhaps it’s time to find a new hosting
   provider.
 * (in the above examples, the limit is set to 128MB)

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘Max File Upload Problem (yes I've tried)’ is closed to new replies.

## Tags

 * [limit](https://wordpress.org/support/topic-tag/limit/)
 * [php](https://wordpress.org/support/topic-tag/php/)
 * [upload](https://wordpress.org/support/topic-tag/upload/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 8 replies
 * 3 participants
 * Last reply from: [James Huff](https://wordpress.org/support/users/macmanx/)
 * Last activity: [10 years, 3 months ago](https://wordpress.org/support/topic/max-file-upload-problem/#post-6955128)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
