Share this
Rate this post

Have you ever wanted to upload something to your website and you are returened with the error maximum upload size exceeded ? it can be very annoying.By default, maximum upload size in WordPress,joomla set by hosting providers range from 2MB to 150MB depending on the settings of your web hosting provider is giving by default.If you are building a WordPress website that hosts a portfolio with large image files or a video hosting site with single media file size running into GBs, then you might face a roadblock of not being able to upload media files larger than 25MB (in most cases). I recently encountered this challenge and i could not find the php.ini file in my cpanel. i could not find helpful methods on the net, but using the methods i’m about to show you, i was able to increase to 250mb. normally the php.ini method is all over the net.what if like me you could not access the php.ini file? most providers don’t allow you access to this file. To check what is the current max upload size limit in your WordPress site then navigate to WP Admin -> Media -> Add New. You will see the current max upload size on the bottom
in this tutorial i will be putting you through several steps and strategies that will help you out.
method 1
if you’re using wordpress then you are a bit at an advantage.
You can easily increase the size limits by adding the following lines of code in the functions.php file of your theme.

However, remember if you change the theme then max upload size will return to its default values until you edit the functions.php file of the new theme.and chang the values in the following lines of code.

note: i used 56m for sample, replace with your own desired value.
@ini_set( ‘upload_max_size’ , ’56M’ );
@ini_set( ‘post_max_size’, ’56M’);
@ini_set( ‘max_execution_time’, ‘300’ );
method 2
Editing PHP.ini
this is the most common method.
Note: Before you start making changes to your server’s configuration, you should make a backup of your site and database. If you find your php.ini file, you will also want to back this file up locally.
Depending on your web host, you may be able to edit this php.ini file directly. To find this file, FTP into your site, and go to the folder that your WordPress install is in. This usually exists in an “html” or “www” folder. What you will need to do is navigate via FTP to the absolute root directory. This will typically be one or two directories higher than where the WordPress files live.
From the root directory of your server, you are looking for the folder that your php.ini file is located. This is typically in a “conf” or “etc” folder. Search through these folders to find a file labeled “php.ini”. If you are unable to locate it, trying searching through your web host’s knowledge base to find its location.Drag this file to somewhere on your local hard drive, and open it up in any text editor.you can also do this from your cpanel using the editor in your file manager., find the “memory_limit” value, and change this to 56M (unless this is already set to something higher). Next, find the the “post_max_size” and change this to 56M. Finally, find the “upload_max_filesize” and once again change this to 56M. It is important that we use an “M” to define our filesize limit in megabytes, instead of the commonly used MB. You may also want to find the “max_execution_time” variable and set it to something like 300. This will ensure that your site does not time out when uploading larger files. In the end, your values will look like this:
memory_limit = 56M
upload_max_filesize = 56M
post_max_size = 56M
max_execution_time = 300
Though these values will be scattered throughout the file. When you are done, save your file, and drag it back to the directory where your php.ini file is located and overwrite the existing file. It may take a little while for these changes to take effect. If you are on a dedicated server and are able to, you should try restarting your server. If you’re unclear about how to restart your server, check with your web host. Otherwise, make sure your browser and site’s cache is cleared. Hopefully, when you visit Media -> Add New you will see a new maximum upload size, and you’ll be all set.
method 3 create and upload your own php.ini
this applies in a case where you are unable to locate the file in your file manager.you should ftp into your cpanel or use file manager,create a new file and paste the following lines of code in.
memory_limit = 56M
upload_max_filesize = 56M
post_max_size = 56M
file_uploads = On
max_execution_time = 300
method 4 modifying your .htaccess
Update Your .htaccess file

If your web server is using Apache and PHP is set as an Apache module, then you can add a few lines of code in your WordPress .htaccess file to increase the max upload size in WordPress.

To access your .htaccess file, connect to your server via FTP client and navigate to the folder where WordPress is installed. Open up .htaccess file in a code editor or Notepad and add the following lines.

php_value upload_max_filesize 56M
php_value post_max_size 128M
php_value memory_limit 256M
php_value max_execution_time 300
php_value max_input_time 300
This will define the max upload size in Megabytes. Replace the numbers as per your requirement. The max execution time and max input time are in seconds. The execution time defines the limit of time spent on a single script. Choose a number that is suitable for your site
method six create a .user.ini file
if method three above does not work for you,just save the same settings and rename the file to .user.ini.
method 7 try word press plugin
here’s another luck to wordpress users. search and download the wordpress plugin maximum upload size in the wordpress plugins directory. download the plugin, check in your settings and you’ll see a supposed end to your your problems.
method seven contact your hosting provider
finally the last resort,contact your hosting provider and ask them to increase your maximum file upload size limit.
hope this helps, good luck.

Related Post

The following two tabs change content below.
Like this

26 thoughts on “True Story”

  1. It is the best time to make a few plans for the future
    and it’s time to be happy. I’ve read this submit and if
    I may I wish to counsel you some fascinating issues or advice.
    Maybe you can write next articles regarding this article.
    I wish to read even more things approximately it!

  2. I just want to tell you that I’m very new to blogging and site-building and really loved this blog. Likely I’m likely to bookmark your site . You definitely have excellent posts. Thanks a lot for sharing your blog.

  3. Howdy fantastic website! Does running a blog such as this take a great deal of work? I’ve absolutely no expertise in programming but I was hoping to start my own blog soon. Anyway, should you have any ideas or techniques for new blog owners please share. I know this is off topic nevertheless I just had to ask. Kudos!

  4. I haven¡¦t checked in here for some time since I thought it was getting boring, but the last few posts are good quality so I guess I¡¦ll add you back to my everyday bloglist. You deserve it my friend 🙂

  5. Heya i am for the first time here. I found this board and I
    find It really useful & it helped me out much.

    I hope to give something back and help others like you helped me.

  6. Simply want to say your article is as astounding. The clearness on your publish is just great and that i can assume you
    are an expert in this subject. Well with your
    permission allow me to grab your RSS feed to keep updated
    with impending post. Thanks one million and please continue the
    gratifying work.

  7. First of all I want to say great blog! I had
    a quick question which I’d like to ask if you don’t mind. I was curious to know
    how you center yourself and clear your mind prior to writing.
    I have had a difficult time clearing my thoughts in getting my ideas out.
    I truly do enjoy writing but it just seems like the
    first 10 to 15 minutes are lost simply just trying to figure out how to begin. Any recommendations or tips?
    Thanks!

  8. Hi! This post couldn’t be written any better! Reading this post reminds me
    of my previous room mate! He always kept talking about this.
    I will forward this write-up to him. Fairly certain he
    will have a good read. Thank you for sharing!

  9. Hey very cool site!! Guy .. Beautiful .. Wonderful ..
    I will bookmark your site and take the feeds additionally?

    I am glad to find so many helpful info right here within the publish,
    we want develop more strategies on this regard, thanks for sharing.
    . . . . .

  10. Thank you for tһе sensible critique. Мe ɑnd my neighbor were just preparing
    tߋ do a little research on tһis. We got a grab ɑ book
    from our local library Ьut Ӏ think I learned
    morе cleaг from tһis post. I am ᴠery glad to see suсh magnificent
    info Ьeing shared freely out tһere.

  11. Hi to all, how is everything, I think every one is getting
    more from this site, and your views are nice in support of new visitors. Brenda, NEW JERSEY

  12. I’m impressed, I must say. Rarely do I cоme across
    a blog that’s bоth equally educative and entertaining, and let me tell you, you’ve hit the nal on the head.Τhe problem is something whiϲh too feᴡw
    men and women are speaking intelligently about.

    Ι’m veгy appy I found this іn my hunt for something concerning this.

  13. Greetings! I’ve been reading your blog for a long time now and finally got the bravery to go ahead and give you a shout
    out from New Caney Tx! Just wanted to say keep up the great job!

Leave a Reply

Your email address will not be published. Required fields are marked *