Question

CyberPanel - Unable to Upload Any File Over 100MB.

Hello,

I hope that somebody would be able to help me with this. This is my server configuration:

Droplet: 2 GB Memory / 1 Intel vCPU / 60 GB Disk Panel: CyberPanel Web Server: LiteSpeed PHP Version: 8.2.15 (64-bit support) PHP SAPI: litespeed PHP Settings: Max Input Variables: 1000 Time Limit: 300 Memory Limit: 512M Max Input Time: 300 Upload Max Filesize: 512M Post Max Size: 512M

I am unable to upload files larger than 100MB from both the back and front end of my two WordPress sites. Files under 100MB upload successfully, but files over 100MB get stuck at 1%.

To rule out any conflict with the Wordpress/Plugin/Theme I created a simple upload script inside the root directory and I had exactly the same issue, I was able to upload any file under 100MB just fine, but anything over 100MB would do nothing.

I contacted the DO support if there is any server limitations, but they are basically just giving me generic answers that do not explain the issue.

Any help would be really appreciated.

Thanks.


Submit an answer


This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Hi,

Thank you both for your time trying to help me, but it turns out that the limit of why I am unable to upload any file over 100 MB is not related to Wordpress, Cyberpanel or DO, but to Cloudflare.

I use free CF and it has a 100MB client limit for uploading any file to any part of the site that goes through the CF proxy, when I turned CF off and just used it for DNS hosting I could upload any file over 100MB with no problem.

Somebody just totally randomly mention this somewhere else and it all made sense, so maybe this will help somebody else in the future.

KFSys
Site Moderator
Site Moderator badge
June 21, 2024

Heya,

Most on the topic has been said, what I can offer more as an advice is to check some limits in CyberPanel that might be interfering with the upload limits.

ALso make sure you are updating the proper php.ini and that it’s actually geting these updates you are adding.

To do so, add an info.php file in your WordPress directory with the content of

<?php phpinfo();

Once you open it, you’ll see which php your website is loading, where is the config file, what are the limits and so on.

alexdo
Site Moderator
Site Moderator badge
June 20, 2024

Heya, @bighomerx

You can modify the PHP configuration files directly. Here’s how you can do it:

  1. First, you need to SSH into your DigitalOcean Droplet. You can do this using a terminal or command prompt. Use the following command, replacing your_username with your actual username and your_droplet_ip with your Droplet’s IP address:
ssh your_username@your_droplet_ip
  1. The PHP configuration file, php.ini, controls many PHP settings, including file upload limits. The location of php.ini depends on the PHP version and the server configuration. You can typically find it in /etc/php/{version}/apache2/ if you are using Apache or /etc/php/{version}/cli/ or /etc/php/{version}/fpm/ if you are using Nginx. You can use the php -i | grep "Loaded Configuration File" command to find the exact path.

  2. Once you’ve located the php.ini file, open it in a text editor like nano or vim. For example, if you’re using nano and PHP 8.1, you might use:

sudo nano /etc/php/8.1/apache2/php.ini

Look for the following lines:

  • upload_max_filesize: This directive sets the maximum size of an uploaded file.
  • post_max_size: This directive sets the max size of post data allowed. This setting also affects file upload. To upload large files, this value must be larger than upload_max_filesize.

Increase these values as needed, for example:

upload_max_filesize = 64M
post_max_size = 64M

Replace 64M with the size you need.

  1. After saving the changes, you need to restart your web server for the changes to take effect. The command to restart the server depends on the server you are using. For Apache, you can use:
sudo systemctl restart apache2

Or for Nginx:

sudo systemctl restart nginx
  1. To ensure your changes are active, create a PHP info file (if you don’t already have one) and check the upload_max_filesize and post_max_size values. You can create a file named info.php in your WordPress root directory with the following content:
<?php phpinfo(); ?>

Access this file in your browser (http://yourdomain.com/info.php), and check the updated values. Don’t forget to delete this file after checking for security reasons.

Let me know how it goes!

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Become a contributor for community

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

DigitalOcean Documentation

Full documentation for every DigitalOcean product.

Resources for startups and SMBs

The Wave has everything you need to know about building a business, from raising funding to marketing your product.

Get our newsletter

Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.

New accounts only. By submitting your email you agree to our Privacy Policy

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.