KNOWNHOST WIKI

User Tools

Site Tools


control-panels:directadmin:how-to-increase-upload-max-filesize-and-post-max-size-in-directadmins-phpmyadmin

How to Increase the Max Upload Filesize and Post Max Size in DirectAdmin's PHPMyAdmin


To increase the maximum size of a database that can be uploaded in DirectAdmin's PHPMyAdmin, one must edit the used PHP version's php.ini to adjust the setting, and then restart the appropriate services. The examples given below apply to a DirectAdmin server using PHP-FPM as the PHP handler.


1) Find the default PHP version's php.ini

You can run the following command to find out what configuration files are in use on your server and what their locations are:

  /usr/local/directadmin/custombuild/build used_configs

PHPMyAdmin on DirectAdmin will use the default PHP version. There may be a blank php.ini section in the output of the command above, but you can ignore that as we just want to know the default PHP version and the location of its php.ini file.


2) Edit the php.ini

Now that you can see the location of the default PHP version's php.ini file, you can now edit it to increase the post_max_size and the max_upload_filesize variables.

Using the example in the image above, you could use this command via SSH as root to edit the file:

  nano /usr/local/php73/lib/php.ini

Note that the upload_max_filesize determines the Mib displayed in PHPMyAdmin, but you'll want to increase both.


Now you need to restart the webserver and any related services to ensure the changes take place.

Apache:

  service httpd restart

If using php-fpm, restart it (replace XX with the appropriate version of PHP, e.g., php-fpm73):

  systemctl restart php-fpmXX


4) Check your work

Now you can log into PHPMyAdmin and confirm that the value has been increased as desired by checking under the Import tab.

If you require assistance with this, please feel free to submit a ticket to your KnownHost support team! :)

control-panels/directadmin/how-to-increase-upload-max-filesize-and-post-max-size-in-directadmins-phpmyadmin.txt · Last modified: 2020/06/15 09:56 by Karson N.