Junal on the run

Increase the import “file size” in phpMyadmin

Posted on: October 3, 2007

if you are using WAMP, you may notice that your phpMyadmin allows you to import only 2mb file size. well yesterday i had to  import a file which was greater than the limit. my project database size was 6mb so i had to split the whole file in three. that was time consuming and annoying ! so i edited some stuff in phpMyadmin libraries! this is very simple. you just have to find the right file and increase the size limit..

so if you want to increase the size limit of import file then follow this ………….

go here first www\phpmyadmin\libraries

now find the file name “common.lib.php” and open it ……

goto line # 183

you will see something like below ….

$scan[‘MB’] = 1048576;
$scan[‘Mb’] = 1048576;
$scan[‘M’] =  1048576;
$scan[‘m’] =  1048576;
$scan[‘KB’] = 1024;
$scan[‘Kb’] = 1024;
$scan[‘K’] = 1024;
$scan[‘k’] = 1024;
just increase the size of’ all ‘M’ . now run your phpMyadmin again and see the change .:)

Update: @All : please don’t follow this original post as this is not the actual (indeed stupid) way to solve this problem, Please follow all the comments in this post that have the solution of this problem. Thanks.

50 Responses to "Increase the import “file size” in phpMyadmin"

hi this is nizam from uk . basicaly from i am bangladesh too . thanks mate your tips helped me alot to import my existing database in my localhost . thanks alot .

hat off to you bangali .

i am bangali too — proud to be that .


Very stupid, you can do it in php.ini

chnage the value of upload_max_filesize

Even you are bengali you should use ur brain

Hey, I am using WAMP. I found the common.lib.php file in phpmyadmin\libraries folder but I couldn’t find the specified coding. There isn’t even specification of file size limit anywhere on this file. I tried to find in common.inc.php but even there I couldn’t find anything related to this.

So can you tell me where should I look into?
Please mail me if you can help me out.

Thank You Very Much

– Mittal Patel

I have to disagree a bit on the solution. I just tried it out, but actually the maximum upload file size is read from php.ini or if it is not available there it is set to 5MB.
So if you wanna change the limit from 2MB to a greater value, make the change in PHP.INI, look for
upload_max_filesize = 2M (default) change this to what you want!

Joro Stoimenov

@G. Stoimenov, you are right. Thing is, that time i didnt have idea about it so i tried it different way…..anyways,
@all please dont follow this procedure i mentioned. You better increase the size from php.ini as G. Stoimenov mentioned.

I have Tried Both.
Both are Not Working Unfortubately,

is there any better option?

post_max_size increase this too

you need to restart the server after the change

a better solution is SQLYOG ! get it from here : http://www.webyog.com/en/downloads.php

I agree with Joro Stoimenov. If you wanna change the limit from 2MB to a greater value, make the change in PHP.INI. But this maximun until 8M.

How if I want to 20 MB ?

Asev Wyd

@Asev : you can use SqlYog [http://www.webyog.com/en/] an excellent GUI client tool….

i’ve tried both of them but not working…
i will try sqlyog


The first and only things to check (or ask your host provider to check) are the values of upload_max_filesize (Default 2M)
memory_limit (Default 16M)
and post_max_size (Default 8M)
in the php.ini
increase all as per your need

This will work for sure

Hi Joro Stoimenov,

Kool man nice idea, keep it up


The method from Mahesh Mahajan works.

Thanks Mahesh and all!

i am unable t find those lines in my wamp, any buddy will help me

I have used XAMPP for WAMP environment. in my case php.ini is located in C:\xampp\php\php.ini

i’ve tried but not working

was very helpful for me,too. Funtastic idea,dude!

Awsome fix man. Changed mine now and i can now upload 250,000 +MB/s.

Thanks very very much

Junal, stfu you piece of trash your tool has nothing to do with fixing the file size.

mysqldump -a -u USERNAME -p DATABASE > FILENAME.mysql



It works for me.


I fully agree.
Two thumbs up!

This really is the ONE and ONLY ONE formula.
It works FAST and in a VERY RELIABLE way.

NONE of the other solutions based on messing around with the conf documents is working nicely.

I have increase them all to 512mb but i can`t upload my dump SQL 😦
I use joomla with 100mb database.

Thanks anyway.

Everything is OK now 🙂
I use wamp 2.0 after restart solved.


Thanks MAN

Mahesh and all above, i m just saved……

thanks to all

You need to increase two things




It doesn’t wokr! I changed those three values, but in phpmyadmin it still says only 2M files are available. Anyone got any idea?


Are you using wamp, for wamp you also need to edit the php.ini file in the apache folder.

Muhammad Umair

yea man
in wamp have to change php.ini in /bin/apache/ApacheX.X/bin/ and in /bin/php/php5.x.x/
It’s working
Thanks 😉

What you mean phpmyadmin you need to choose the values in php.ini, you don’t need to do anything in phpmyadmin.

Thank you

is it these to lines in the php.ini file you change?



How can I increase the size to import a DB from. I am trying to import the DB using phpmysqladmin and it says error size exceeds.

Math – in /etc/php.ini change the 2 variables talked about here:

post_max_size = 50M

upload_max_filesize = 50M

You can set “50M” to whatever file size you want – just be careful if you let users upload their own files via a php script because it could get real hairy real quick. Otherwise don’t worry about it.

Then you have to restart the web server

As root: /etc/rc.d/init.d/httpd restart

When you reload (going back to the page via web browser) phpmyadmin you should see your file size change.

I’ve just been trying to fix the same problem on a test installation of WordPress 3.0 on Ubuntu 9.10. It’s using localhost, and I installed the LAMP stack myself using Apache2 and PHP5. None of the fixes above seemed to work, clearly because a different ini file was being read.

The fix for me was to find the php.ini file being used for Apache2 and that was found in the folder:

Making the change to the entry post_max_size (in my case setting it to 16M) made an immediate effect without needing to restart apache, or reload the browser.

All the other php.ini files proved to be irrelevant. With the installation I had, there was no original php.ini in the root, nor in wp-admin, nor in wp-content and putting them there had no effect.

It’s clear that the solution for Windows users is slightly different since putting a php.ini file with the appropriate settings in wp-admin seems to be a popular choice. But it certainly doesn’t work on the typical set-up on Ubuntu.

For reference, the LAMP stack was installed to Ubuntu in the default locations, and the WordPress install went to /var/www into a folder called wordpress.

Thanks for all the comments above – without them I wouldn’t have been able to track down my problem.

Mahesh and all above, i m just saved……
thanks to all

The fourth thing you might need to adjust is the max_execution_time in php.ini since the file may not complete uploading if the script times out.

1. Open PHP.INI file
2. upload_max_filesize:20M
3. Save & Close File.
4. Resart Apache (Or your WAMP or XAMP whatever you use)
5. Noe go to PHPMYADMIN IMPORT , it will allow you to import file up to this size.
6. If error ocurrs then increst MEMORY LIMIT in PHP.INI


upload_max_filesize:20M and post max size 20M olduğunda sorun giderilmektedir.

Dear just go to php.ini and search post_max_size
here u can set import and Export size limit ,
after doing this restart the computer

i found it..thanks 🙂

You can Watch this video to know How to increse file upload size in wamp server by editing php.ini.

Fuck your ass with donkey Dick….

Hi there – thank you for the correct answer (first post by Santanu). Indeed you gotta change the “upload_max_filesize” value from your \\xampp\phpphp.ini . What I noticed as well is that the changes will not reflect until you restart (stop-start) your mySQL and Apache services from the xampp control panel. Thanks. chagbert.

Hi, I do believe this is an excellent site. I stumbledupon it
😉 I am goiing tto come baxk once again since I book marked it.
Money and freedom is thhe best way to change, may you be rich annd continue to guide
other people.

Hi! I use xampp and I tried your solutions.But it doesn’t work. In the php.ini file ,there is already given the size of upload_max_filesize is 32M & I can upload only less than 16.4 M.I made changes in php.ini file as you told, but the result is same as well.It doesn’t works.Is it only woks for wordpress? I don’t use wordpress. Then what will be the solution?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

View Junal Rahman's profile on LinkedIn
Subscribe to me on FriendFeed

Follow Me on Twitter


My photos

Blog Stats

  • 424,735 hits
%d bloggers like this: