Chapter 18 · 18.5
Upload too large (error 413) or timeout
You're trying to upload a large file, restore a back-up or import a database, and it's not working. For example, you might see 413 Request Entity Too Large, in WordPress The uploaded file exceeds the upload_max_filesize directive in php.ini, or the page keeps loading and ends in a timeout. In that case, you're hitting a limit on size or duration. You can adjust most of these limits yourself.
Which limit is it?
| Setting | What's it for? |
|---|---|
| upload_max_filesize | The maximum size of a single uploaded file. |
| post_max_size | The maximum size of everything you send at once. Always set this a bit higher than upload_max_filesize. |
| max_execution_time | How many seconds a script is allowed to run. Too low causes a timeout for lengthy tasks, such as an import. |
| max_input_time | How long PHP is allowed to take to receive an upload. |
| memory_limit | How much memory a script is allowed to use. Set this higher than post_max_size. |
Increasing the limit
- In DirectAdmin, open Select PHP version under Extra Features.
- Go to the options and increase upload_max_filesize and post_max_size, and if needed max_execution_time and memory_limit.
- Save and try again.
You'll find the full explanation in PHP options: upload_max_filesize, memory_limit and max_execution_time. Have you set your own values under PHP Instellingen in DirectAdmin for a domain? Then those take priority. Read PHP Settings in DirectAdmin or Select PHP version: what's the difference? to find out how the two relate to each other.
Tip: Do you need a higher value than you can choose in Select PHP version? You can do this with a line such as php_value upload_max_filesize 1024M in your website's .htaccess file (see PHP settings per directory and via .htaccess).
Specific situations
Importing a large database in phpMyAdmin
phpMyAdmin has its own limit on import size. Compress the file as .sql.gz, which often saves more than half the size. Still too large? Read Importing a database, including large files for other options.
Uploading in File Manager
For large files or many files at once, an FTP program such as FileZilla works better than uploading through the browser (see Verbinden met FileZilla (FTP, FTPS en SFTP)).
Extracting or compressing a large zip file
Does extracting in File Manager end in a timeout? Try again, or extract it via the Terminal if your package includes it (see Extracting and creating zip files and Terminal in your browser).
A migration plugin in WordPress
Plugins that move an entire website in a single file often hit these limits. Temporarily increase the values above. Are you moving your website from another provider to WebOké? You can also use our free migration service: we'll move your website and email for you.
Your site runs through Cloudflare
If you use Cloudflare with the orange cloud enabled, the free plan applies a limit of 100 MB per upload. This limit comes from Cloudflare, not from us.
A timeout when saving or loading a page
If a regular page takes so long that it times out, that's not an upload problem but a slow script. Read My website is slow and use X-Ray to find out which part is taking the time (see X-Ray: tracking down slow pages).
