Hosting Question? Find the Solution - Browse our Guides, Articles, and How-To's

Increasing Max Upload Filesize and Post Max size in DirectAdmin’s PHPMyAdmin

Unlike its counterpart, DirectAdmin still requires some manual modification in order to adjust certain values outside of the DirectAdmin panel. This makes DirectAdmin require a bit more hands-on knowledge for those savvy with command lines and for those and those that aren’t — this article is to tell you what to change and how to change.

The primary reason one may want to increase these values is for uploading databases directly through the PHPMyAdmin interface. In order to do this, however, 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.

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.

Find the default PHP version's php.ini

Edit the php.ini upload filesize

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.

We’ll use 256mb for the sake of the example

post_max_size = 256mb

Now that you have the value you want to set then 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 of the values.

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


  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

Check your upload filesize

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

Increasing Max Upload Filesize and Post Max size in DirectAdmin's PHPMyAdmin


All in all, adjusting the configuration to allow for a higher upload filesize in PHPMyAdmin is rather straightforward, and although a little technical — it shouldn’t be scary at all. We hope that this has helped you in adjusting these two values.

KnownHost offers 365 days a year, 24 hours a day, all 7 days of the week best in class technical support. A dedicated team is ready to help you should you need our assistance. You’re not using KnownHost for the best web hosting experience? Well, why not? Check with our Sales team to see what can KnownHost do for you in improving your web hosting experience.