LinkStack theme upload: 413 Request Entity Too Large
LinkStack theme upload fails with 413 Request Entity Too Large? Raise the nginx and PHP size limits, or install by hand and rename folders with dots.
The Liite team8분 분량
Short answer
The 413 comes from your web server or a proxy in front of it, not from LinkStack. Raise client_max_body_size in nginx, raise upload_max_filesize and post_max_size in PHP, reload both, and upload again. If you install the theme by hand and it then fails, remove the dots from the folder name (stargazer-1.9 becomes stargazer).
You tried to upload a theme zip in your self-hosted LinkStack admin area, and the upload died with this:
413 Request Entity Too Large
Searching this error usually leads to generic nginx answers. Those answers miss the second problem LinkStack users hit right after: theme folders with dots in their names.
Why the 413 happens
MDN describes a 413 as the server saying the request body is larger than the limits it has defined. That is the whole story here. Your theme zip is the request body, and something between the browser and LinkStack refused it for size. It never reached the app, so reinstalling LinkStack changes nothing.
There are three layers that can each reject the upload, and each has its own limit:
- The web server. Nginx's default
client_max_body_sizeis 1 MB, so a theme with a few images can exceed it. Apache has no default body cap, so a 413 on Apache usually points to aLimitRequestBodysetting or a proxy. - PHP.
upload_max_filesizecaps a single uploaded file, andpost_max_sizecaps the whole POST request.post_max_sizehas to be at least as large asupload_max_filesize. If you raise only the web server limit, the upload gets further and then fails inside PHP. - Anything in front. A reverse proxy, load balancer, CDN or hosting panel can have its own body-size cap. People who change nginx and still get a 413 often find the limit was set in a layer in front of it.
The second problem, the dots, comes from a LinkStack GitHub issue (number 819, opened in September 2024). It describes a manual theme upload that errored because the folder name contained a dot. Theme archives are often named with a version, like stargazer-1.9, and the reported fix is to rename the folder to stargazer. I could not confirm whether a later LinkStack release changed this. As of November 2026, check that issue and your installed version before assuming the rule still applies.
| Cause | What you see | Fix |
|---|---|---|
| Nginx body limit | 413 page from nginx, upload fails at once | Raise client_max_body_size, reload nginx |
| PHP limits too low | Upload gets further, then fails or returns an error | Raise upload_max_filesize and post_max_size, restart PHP |
| Proxy or panel cap | 413 survives your nginx change | Raise the limit in the proxy or panel |
| Dots in folder name | Manual install errors even though the files are there | Rename the folder, for example stargazer |
Fix the 413 step by step
1. Raise the nginx limit
- Open the nginx config that serves your LinkStack site. This is usually a file in
sites-enabled, ornginx.conf. - Add or change this line inside the
serverblock (orhttpblock to apply it everywhere):
client_max_body_size 32M;- Test the config with
nginx -t, then reload nginx.
Pick a value above your theme zip's size. You don't need a huge number, and a theme zip is normally far smaller than 32 MB.
Don't set the limits huge
CERT-EU's October 2026 advisory on critical PHP vulnerabilities suggests a post_max_size of 32M for apps that need uploads, with upload_max_filesize kept below it. Keep your limits close to what you need, and update PHP to a fixed release.
2. Raise the PHP limits
- Find the
php.inithat PHP-FPM actually loads.php --inishows the CLI one, which can differ from the web one. - Set both values, keeping
post_max_sizeat least as large asupload_max_filesize:
upload_max_filesize = 32M
post_max_size = 32M- Restart PHP-FPM (or your PHP handler).
- Confirm the new values are live. A
phpinfo()page for the site shows what the web process really uses. Remove that page afterward.
On shared hosting you often can't edit php.ini. The hosting panel usually has a PHP settings page, or lets you set the same values in a .user.ini or .htaccess file. The exact route depends on the host, and some hosts cap the values at the plan's maximum.
3. Check everything in front of the server
If the 413 survives steps 1 and 2, something else is rejecting the request.
- List what sits in front of LinkStack: a reverse proxy (Nginx Proxy Manager, Traefik, Caddy), a load balancer, a CDN or a hosting panel.
- Look for a body-size or upload-size setting in each and raise it.
- In Docker setups, change the config inside the container or in the mounted config files, then restart the container. Editing the host's nginx does nothing if the request is rejected inside the container.
4. Upload again and read the log
Retry the theme upload. If it still fails, open the web server error log. For an oversized body, nginx normally logs that the client sent too large a body, which tells you that layer's limit is still too low. A PHP-level failure shows up in the PHP error log instead.
Install the theme by hand (and fix the dots)
If you can't change the server limits, skip the upload form.
- Unzip the theme on your computer.
- Check the folder name. If it contains a dot, rename it:
stargazer-1.9becomesstargazer. - Copy the folder into the themes folder of your LinkStack install on the server.
- Make the file ownership and permissions match the other theme folders. A theme copied in as the wrong user is a common reason it doesn't show up.
- Open the theme settings in the admin area and look for the theme.
Rename, don't edit
Only the folder name needs changing. Leave the files inside the theme as they are.
What won't help
- Deleting files from the zip at random. You may break the theme, and the limit comes back with the next one.
- Changing only the nginx value. PHP's limits block the same upload.
- Reinstalling LinkStack. The limits live in your server config.
- Renaming the zip file itself. The dots problem concerns the extracted theme folder.
Checklist before you try again
- The nginx (or other web server) limit is above the zip size, and the server was reloaded.
upload_max_filesizeandpost_max_sizeare raised, withpost_max_sizeat least as large, and PHP was restarted.- Any proxy, CDN or panel in front has its own limit raised.
- For a manual install, the folder name has no dots.
- The folder's ownership and permissions match the other themes.
If nothing works
Contact whoever runs the layer that rejects the request: your hosting provider's support if you are on shared hosting or a managed VPS, or the LinkStack project on its GitHub issues page for app behavior such as the folder-name rule. Include:
- the exact error text and the time it happened;
- your LinkStack version and the theme name and zip size;
- the nginx or Apache version, and whether a proxy or panel is in front;
- the relevant lines from the web server and PHP error logs;
- what you already changed (limits, restarts).
Subject: 413 Request Entity Too Large when uploading a theme to LinkStack
Hi,
Uploading a theme zip (about 4 MB) in the LinkStack admin area fails with
"413 Request Entity Too Large" at [time, timezone].
Setup: LinkStack [version], nginx [version], PHP [version], [Docker / shared
hosting / VPS], [reverse proxy or panel, if any].
Already tried: client_max_body_size 32M (nginx reloaded), upload_max_filesize
and post_max_size set to 32M (PHP restarted). The error still appears.
Could you tell me whether another limit applies in front of my site, and
what I should raise? The relevant error log lines are below.
[paste log lines]Common questions
Does a 413 mean my LinkStack install is broken?
No. The request was refused at the server layer because of its size, before LinkStack saw it.
Why does the upload still fail after I raised the nginx limit?
PHP has its own limits, and a proxy or panel in front may have another. Work through all three layers above, and check the logs to see which one rejects the request.
Do theme folder names really have to be free of dots?
That is what the LinkStack issue reports, with stargazer-1.9 renamed to stargazer as the fix. I could not confirm whether newer versions changed it, so rename the folder if a manual install fails.
Are there other known LinkStack problems I should check?
The project's issue tracker also lists reports about "Update all Themes" not working and ERR_SSL_PROTOCOL_ERROR on some Android phones and Facebook shares. I haven't verified fixes for those, so read the issues directly.
If you'd rather not run a server for a link page
A hosted page has no nginx or PHP limits to tune. Liite has 15 built-in themes, plus a Design panel for wallpaper, buttons, corners, font and colors, and a link-in-bio page on the Free plan needs no card. It does not accept custom theme uploads or custom CSS, so it only fits if the built-in options are enough for you. See how to make a link-in-bio page in five minutes or the link in bio template.