How To Increase Import Size Limit of phpMyAdmin on a CentOS 7 Server

phpMyAdmin Increase Import Size Limit

Many times when we’re migrating our hosting providers or platforms, we occur problems to import the database in the new host’s database. This is because of the import size limit that is imposed by default. This can be limited to 10 MB, 20 MB or sometimes even 2 MB. Mostly in VPS or Linux servers.

In this article, we’re going to learn how to increase the import size limit of phpMyAdmin on a CentOS 7 machine. So let’s begin.

How To Install phpMyAdmin on CentOS 7?

Now if you don’t know how to install phpMyAdmin on a CentOS 7 server, refer to this article on how to install phpMyAdmin on a fresh CentOS 7 machine. So let’s begin increasing the upload limit.

Increase Import Size Limit of phpMyAdmin

The limit is imposed by PHP settings on your server which means it has nothing to do with phpMyAdmin configurations. To increase the limit, we have to edit the PHP configuration which lies in “php.ini”. Whatever we do, we should do it precautiously because doing anything wrong can result in getting the whole PHP broken.

Editing PHP.ini

To edit PHP.ini, we need to find where actually it exists. Generally, people use Apache so we’d consider Apache in this article. The “php.ini” is located inside /etc directory. So we’d use the nano text editor to edit the file. Use the below-mentioned command to find the php.ini file properly.

nano /etc/php.ini

Now there would be a bunch of codes you’d see on your screen. Scroll down by pressing down arrow button till you find any one of these three lines because we’ve to edit them.

memorylimit
postmaxsize
uploadmaxfilesize

Since we’re upgrading the limit, we’d keep it at a moderate level of 128 MB. So to do so, replace old values of above-mentioned defines and put it as desired(recommended 128 MB unless you’re trying to upload big files).

memory_limit = 128M

post_max_size = 128M

upload_max_filesize = 122M

Once done, press CTRL + X and then press Y and then Enter button to save the changes we’ve made. To make them work in effect, we need to restart Apache. To do so, use the following command.

service httpd restart

We’re done! You can now see the limits are increased to what we’ve set(128 MB for this article). From…

2 MB limit - Old
Before configuration

To…

phpMyAdmin import size limit increased
After configuration

Troubleshooting

If you still see the limit, try restarting your system. To restart immediately, use the following command.

shutdown -r now

This will restart the server as we’ve mentioned “-r” parameter which means “restart” and “now” means immediately.


The Best VPS Hosting To Try This One!

If you need a VPS hosting, the best one, you should definitely use Shadow Hosting’s VPS hosting service at the most affordable price for its service and support. If you have any issue while handling phpMyAdmin import size limit, let us know and we’d be glad to assist you out of the issue. And for what? For FREE! Yea! Support comes for free for issues you face which is in our scope. Don’t wait for anybody and purchase today!

Conclusion

Thank you for reading our article. If you have any suggestion or thoughts, you’re welcomed in the comment section below in the comment box.

Join Our Discord Server

Talk with other members, assist each other out or just discuss topics in our discord server. Join now.

About Manal Shaikh 17 Articles
Manal Shaikh, the Founder of Shadow Networks International and CEO/Chairman of Shadow Hosting International. A cybersecurity analyst, network analyst and a web administrator.

Be the first to comment

Leave a Reply

Your email address will not be published.


*


CommentLuv badge