• Resolved kbellis

    (@kbellis)


    It seems like the question as to “How do I increase the Media Upload file limitation?” is asked quite frequently by WordPress users (myself included) and the nuanced answers to each inquiry is further obfuscated by which version of WP is installed along with the facilitation of each web hosting service, shared servers, etc.

    Searching for an answer (again) to this matter and in reading posts from others similarly in this community simply wanting to get a file larger than 2MB uploaded, I’ve quickly found lots of posts over the years and as recently as last week but too often the answers have pointed to outdated FAQs or worse.

    So.. just a thought (and not an original one by any stretch); Could there please (PRETTY PLEASE) be consideration given for an added option from

    Dashboard, Settings, Media, Media Settings

      MEDIA UPLOAD FILE SIZE LIMIT

    // Rant complete – Begin Humble Supplication

    In the previous case (sand box), the original install of WP was done about in March 2012 for my firend to experiment / play / etc., in a subdomain.domain.com/wp and the file .htaccess wasn’t automatically created via Lunarpages’ one-click installer, but in the present case, I have done a new install to root (WP 3.5.1) and curiously found an .htaccess file already present. During the sand box sessions, she never hit that 2 MB ceiling.

    .htaccess automatically created January 2013

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    
    # END WordPress

    Many posts on this subject and over a span of years by WP gurus have mentioned creating (from scratch; not appending) an .htaccess file.

    In an earlier separate case, the original install of WP was done in the spring of 2011 in root and the following were added then to get over the 2 MB ceiling.

    To play nice with my host’s server, my .htaccess ends up looking like this:

    suPHP_ConfigPath /home/my_user_name/public_html/
    # Use PHP5 as default
    AddHandler application/x-httpd-php5 .php

    along with the .htaccess I needed the creation of a php.ini:

    upload_tmp_dir = /home/my_user_name/mytmp/
    
    upload_max_filesize = 150M
    post_max_size = 150M

    Both the .htaccess and php.ini files are in root and that has continued to work for the past couple of years without issue (that site is also running WP 3.5.1). But I’m still falling short of success having tried appending the .htaccess as follows for the 2013 installation:

    suPHP_ConfigPath /home/my_user_name/public_html/
    # Use PHP5 as default
    AddHandler application/x-httpd-php5 .php
    
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    
    # END WordPress

    Along with tossing in the php.ini:

    upload_tmp_dir = /home/my_user_name/mytmp/
    
    upload_max_filesize = 150M
    post_max_size = 150M

    My new WP site crashes with that first bit added:

    suPHP_ConfigPath /home/my_user_name/public_html/
    # Use PHP5 as default
    AddHandler application/x-httpd-php5 .php

    and comes back around with it removed.

    What’s a mother to do?

    Many many thanks for any help.

    Kelly

Viewing 8 replies - 1 through 8 (of 8 total)
  • So.. just a thought (and not an original one by any stretch); Could there please (PRETTY PLEASE) be consideration given for an added option from

    Dashboard, Settings, Media, Media Settings

    MEDIA UPLOAD FILE SIZE LIMIT

    That would be a fantastic feature, but unfortunately, it isn’t controlled by the WordPress software. It’s a limitation defined by how the server is configured.

    Why is changing Upload Limits such a pain?

    It actually boils down to two very simple issues.

    a) the limits defined in the server side php.ini file (something that’s beyond your control unless you manage the server)

    b) the method your host provides and recommends (if allowed) for increasing the limit for your site

    In spite of all the information and suggestions you might find in conversation, the solution is usually equally uncomplicated.

    – if you manage the server, just change the maximum limits in php.ini and restart httpd.

    – if you’re on a shared host, contact your support group and ask them

    a) if they allow you to change the limit, and

    b) for instructions and – or – their assistance on making the changes using their preferred method of overriding the default configuration.

    Thread Starter kbellis

    (@kbellis)

    Thanks Clayton for the kind reply.

    So, are you saying that the most recent WP 3.5.1 install didn’t create the first instance of .htaccess? :

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    
    # END WordPress

    I’ll explore further with the web host, but implementing the necessary changes that had been outlined previously by the (same) web host worked when it didn’t exist and I then created that shortened .htaccess alone:

    suPHP_ConfigPath /home/my_user_name/public_html/
    # Use PHP5 as default
    AddHandler application/x-httpd-php5 .php

    So, are you saying that the most recent WP 3.5.1 install didn’t create the first instance of .htaccess?

    I made no mention of the .htaccess file whatsoever in my reply.

    If following the instructions for increasing the php.ini upload limit provided by your host don’t work, contact your hosts support group and ask them why.

    http://wiki.lunarpages.com/Increase_php.ini_Upload_Limit

    Thread Starter kbellis

    (@kbellis)

    Thanks Clayton.

    Yes, that procedure as outlined in the link you kind gave is similar to what Lunarpages folks told me to do a couple of years ago and as I’ve detailed above.

    I’ve submitted a ticket request and will explore this further with them; however, I’m still puzzled why and by whose process this comes to shows up:

    .htaccess:
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    
    # END WordPress

    That’s a default WordPress .htaccess file.

    http://codex.wordpress.org/Using_Permalinks#Creating_and_editing_.28.htaccess.29

    The .htaccess file isn’t limited to use just in WordPress. (This – .htaccess: – doesn’t belong there, but I’m assuming it was just a copy – paste error ) It’s a normal file extension used by the apache web server. It may already exist on a new account in public_html when you log into your web space, or it can be created or updated automatically by WordPress, or you can simply create one manually if needed.

    Thread Starter kbellis

    (@kbellis)

    Hi Clayton,

    Just wanted to let you know that the issue was resolved last night with the added help of Tommy, the host’s support person.

    The final .htaccess file ended up looking like this:

    suPHP_ConfigPath /home/my_user_name/public_html/
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    
    # END WordPress

    And the final phi.ini looking like this:

    upload_max_filesize = 150M
    post_max_size = 150M

    Post Log
    Because Lunarpages uses suPHP to parse php files, there is the option of using a custom php.ini file. There can be multiple php.ini files on a single account in different folders, so you can customize the php processing in different folders should a script require it. A php.ini file will not inherit down into subfolders. However, with the creation of an .htaccess file in the same folder as the php.ini file the inheritance works and appending WP’s default .htaccess with that single call for suPHP allowed the ceiling raised to 150M. While this solution was specifically geared for the Lunarpages customer on a shared server, hopefully it will help others with similar situations.

    Thank you again for all of your help Clayton, I very much appreciate it.

    Best regards,

    Kelly

    @kbellis: 150 meg upload limit? Far, far more than you typically need. Most shared servers allow by default 8 or 16 megs. There’s no reason to upload an image greater than 1 or 2 megs in size.

    Agreed – but for those wanting to offer (say) mp3 downloads, FTP and http://wordpress.org/extend/plugins/add-from-server/ should get around most filesize upload limits.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Why is changing Upload Limits such a pain?’ is closed to new replies.