Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Error 413 - Payload Too Large when uploading large files in WordPress with MariaDB on Coolify #4850

Open
clho40 opened this issue Jan 16, 2025 · 2 comments
Labels
🐛 Bug Reported issues that need to be reproduced by the team. 🔍 Triage Issues that need assessment and prioritization.

Comments

@clho40
Copy link
Contributor

clho40 commented Jan 16, 2025

Error Message and Logs

I'm encountering an error when attempting to upload a backup file in a WordPress with MariaDB application. Despite changing the .htaccess settings to allow large file uploads, I still receive a "413 Payload Too Large" error.

These are my /var/www/html/.htaccess settings:

php_value upload_max_filesize 1000M 
php_value post_max_size 1000M 
php_value max_execution_time 300
php_value max_input_time 300

Steps to Reproduce

  1. Deploy WordPress with MariaDB using Coolify.
  2. Modify .htaccess with the following configuration:
php_value upload_max_filesize 1000M  
php_value post_max_size 1000M  
php_value max_execution_time 300  
php_value max_input_time 300
  1. Attempt to upload a 400MB backup file using the WordPress media uploader or import tool.
  2. Check browser's console log

Example Repository URL

No response

Coolify Version

v4.0.0-beta-3.8.0

Are you using Coolify Cloud?

No (self-hosted)

Operating System and Version (self-hosted)

Ubuntu 24.04

Additional Information

No response

@clho40 clho40 added 🐛 Bug Reported issues that need to be reproduced by the team. 🔍 Triage Issues that need assessment and prioritization. labels Jan 16, 2025
@djsisson
Copy link
Contributor

@clho40 are you using a cf dns proxy? they have a 100mb limit and also give a 413 error.

solutions are not using the proxy, using a 'tus' style upload or using an ssh tunnel to your vps

@kmbuthia
Copy link

Faced this issue many times.

To add to the above, if you are behind a WAF, check that it's not causing this as well.

If you are running WordPress inside an apache container, you can also increase the upload limit on the apache side by adding this line to your .htaccess:

SecRequestBodyLimit 2000000000

That's 2GB in bytes as an example

Reference: https://serverfault.com/questions/256838/apache-responding-with-request-entity-too-large

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug Reported issues that need to be reproduced by the team. 🔍 Triage Issues that need assessment and prioritization.
Projects
None yet
Development

No branches or pull requests

3 participants