Tuesday, April 16
Shadow

Change upload file size in phpMyadmin on VestaCP.

phpMyAdmin is an open-source and free database administration tool for MySQL and MariaDB. We can do much more database administration from MySQL commands than phpMyAdmin, but it requires advanced knowledge of systems and commands. So, phpMyAdmin is the first choice for database administration and VestaCP uses as a default.

I have created the website in VestaCP. While trying to upload the database from phpMyAdmin for the created website, it says the limit is exceeded. I looked into it and the default max file upload size was 2 MiB (2048kiB). See in the image below.

vestacp phpmyadmin default upload size

Let’s change the file upload size or limits from the phpMyAdmin in VestaCP.
Login to the VestaCP server, navigate to the Apache directory, and edit the php.ini file. I am using php7.4, so your directory path can be different than mine.

# cd /etc/php/7.4/apache2/

Now you have entered into the apache2 directory. Edit the php.ini using a text editor. I am using a nano text editor.

/etc/php/7.4/apache2/# nano php.ini

Find the two parameters. post_max-size and upload_max_filesize inside the php.ini file and change it to your required size.
Please follow this link to learn more about php.ini.

post max file size phpmyadmin in vistacp
Upload max filesize in phpmyadmin

Restart the Apache2 service and refresh or re-open the phpMyAdmin Page.
WAIT !!!
Do you think this is a little bit hard approach?
Let’s achieve the same goal. But from the alternative method using the VestaCP admin panel. From there you can do the same configuration but there will be GUI.
Login to the VestaCP admin panel. Go to the Server tab, select apache2, and click on configure.

Vestacp Apache configuration section

Select the configure php.ini section. make changes in the post_max_size and upload_max_filesize field, click on save and restart apache2 service. If it still doesn’t work, click on advanced options.

VestaCP Apache2 configure php.ini with advance options

After selecting the advanced options, the php.ini configuration file will open. Find both parameters as mentions above and make the required changes.

vestacp php.ini post_max_size for phpmyadmin
vestacp php.ini upload_max_filesize for phpmyadmin

Click on save and restart the Apache2 ,VestaCP service.

Restart Apache service in vestacp

Refresh or re-open the phpMyAdmin page. Now you will get the changes that you make in the php.ini settings.

phpmyadmin upload size increased to 20M

WOW !!! You have just configured the file upload size for phpMyAdmin in VestaCP. Please leave the comment.

Leave a Reply

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