How to Change Upload Limit for phpMyAdmin in CyberPanel | | Gotmyhost

If you are trying to import a large SQL database file into phpMyAdmin and see an error like “Request Entity Too Large” or a limit of 2MB, you need to adjust your server’s PHP configuration.

In CyberPanel, the phpMyAdmin interface is powered by the internal PHP version of the panel. Increasing this limit allows you to migrate larger websites and databases seamlessly.


Why Is There an Upload Limit?

By default, most servers set a low upload limit (usually 2MB or 8MB) to prevent users from accidentally exhausting server resources. However, for modern websites, database files often exceed 100MB.

Key PHP Variables Explained:

  • upload_max_filesize: The maximum size allowed for a single uploaded file.
  • post_max_size: The limit for the entire “POST” request. This must be equal to or larger than the upload_max_filesize.
  • memory_limit: The amount of RAM a script can use. This should generally be larger than your upload size.

Step-by-Step: Changing the Upload Limit in CyberPanel

Follow these steps to modify your settings via the CyberPanel dashboard:

1. Access Advanced PHP Configurations

  • Log into your CyberPanel dashboard.
  • In the left sidebar, navigate to PHP > Edit PHP Configs.
  • Select the Advanced tab.

2. Select the Correct PHP Version

  • From the dropdown, select the PHP version used by your system (e.g., PHP 7.4 or PHP 8.x).
  • Note: Even if your website uses a different version, CyberPanel’s internal tools often rely on the system’s default PHP.

3. Modify the Directives

Search for the following lines in the configuration box and update their values:

  • Find: post_max_size = 8MChange to: 100M
  • Find: upload_max_filesize = 2MChange to: 100M
  • Find: max_execution_time = 30Change to: 300 (Optional: This prevents the import from timing out).

4. Save and Restart Services

  • Click the Save Changes button at the bottom.
  • To apply the changes to the panel, you must restart the LSCPD (LiteSpeed Control Panel Daemon). Open your SSH terminal and run:Bashsystemctl restart lscpd

Troubleshooting: What if the Limit Doesn’t Change?

If you’ve followed the steps above and the limit in phpMyAdmin still shows the old value, try these fixes:

  1. Clear Browser Cache: Sometimes your browser “remembers” the old limit page.
  2. Check php.ini via SSH: If the GUI fails, you can manually edit the file located at: /usr/local/CyberCP/bin/php.ini
  3. Restart OpenLiteSpeed: Occasionally, a full web server restart is needed: systemctl restart lsws

Leave a Reply

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