Increase the Max Upload File Size & Post Max Size

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/php71/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-fpm71):

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. :)

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

How to reinstall DirectAdmin in your web server?

Run the following commands to install: cd /usr/local/directadmin./directadmin i./directadmin p

How to install imagick with custombuild of DA?

Run the following command: cd /usr/local/directadmin/custombuild ./build update ./build...

The service ‘exim’ on server xxx is currently down

Rebuild your exim. cd /usr/local/directadmin/custombuild./build update./build set exim...

Change DA port to your choice where CSF installed

Here I will show you how to change the port from 2222 to 9999 in two steps. Step One:...

How to migrate cPanel account to DirectAdmin?

The cPanel conversion script currently only works for Admin Level restores. You must have to be...