Troubleshooting nginx issues
Nginx sites can hit a few Client Portal issues. The most common is the admin warning that a private file could be opened by its URL. The best fix is to move your files into our private file system with the private file migration. If you still need server-level lockdown, the fallback is to add the Nginx deny rule for the older files folder.
For portals created before November 2026, run the private file migration first: see Upgrade older portal files to private storage. Portals created since then already use private storage for uploads: see Where are files stored in Client Portal?
Common issues and solutions
Admin warning about private files folder
The warning is about the older /wp-content/uploads/leco-cp/ folder being reachable from the web. You will see it at the top of your Client Portal pages in WordPress admin if your site runs on Nginx, because:
Apache uses .htaccess files to lock down that folder automatically.
Nginx does not support .htaccess files, so the folder cannot be locked automatically.
Without proper configuration, files in that folder may be accessible through direct URLs.
Use the private file migration when you can. Once your files are in private storage and unused originals in the old folder are removed, the warning usually goes away. The notice can stay visible for up to 24 hours after you fix the cause, because the check result is cached. Keep reading only if the migration is not an option yet, leftovers remain in the old folder, or your host still needs an Nginx rule.
Test whether the older folder is exposed
Check whether a file in the older folder opens without logging in:
Find a direct URL to one of your portal files. It contains
/wp-content/uploads/leco-cp/.Open an incognito or private browser window.
Paste the URL and try to open the file while logged out.
If you see a 403 or 404 error, the older folder is protected and you do not need to do anything.
If the file opens, continue to the next section.
Add Nginx configuration rules
If you have access to your Nginx server configuration, add this rule to your site-specific Nginx configuration file:
location ~* ^/wp-content/uploads/leco-cp/ {
deny all;
}This rule uses ~* instead of ~ for broader compatibility by matching the path case-insensitively.
Reload Nginx after saving the change:
sudo nginx -s reloadVerify the configuration
After you reload Nginx, verify both of these behaviors:
Open the direct URL for a file inside
/wp-content/uploads/leco-cp/in an incognito window. It should return a 403 or 404 error instead of showing the file.Log in to a portal and click the Download button for a private file. The file should still download normally.
Managed hosting limitations
Some managed hosting providers use global Nginx configurations that cannot be customized per site. If you are on managed hosting and cannot add custom rules:
Your host may already have protections in place, so test whether the older folder is exposed first.
Run the private file migration so your portal files leave the older web-served folder: see Upgrade older portal files to private storage.
Contact your host and ask them to add the rule for you. Below is an email template you can send directly to them.
Email template to send to a managed hosting provider
Subject: Request to add Nginx rule for private files directory
Hi,
Could you add the following rule to my site's Nginx configuration?
location ~* ^/wp-content/uploads/leco-cp/ { deny all; }It blocks direct URL access to a folder used by the Client Portal WordPress plugin. The plugin serves files through PHP at a separate URL, so this rule won't affect normal downloads.
It needs to be added at the server level rather than via .htaccess, and Nginx will need a reload for it to take effect.
More detail here if useful: https://client-portal.io/support/troubleshooting-nginx-issues-l3ms7
Thanks,
[Your name]
403 Forbidden errors on portal pages
If clients or you see 403 Forbidden errors when opening portal pages or files, try these solutions in order:
Check file and folder permissions
Incorrect permissions are the most common cause. Your WordPress folders and files should have these permissions:
Directories: 755
Files: 644
Contact your hosting provider or use FTP or SSH to verify and correct permissions on your /wp-content/uploads/ folder.
Review security plugins
Security plugins can sometimes block legitimate portal access. Temporarily deactivate security plugins to test whether they are causing the issue. If the error disappears, check the plugin settings and whitelist Client Portal URLs.
Check Nginx index directive
Make sure your Nginx configuration includes index.php in the index directive:
index index.php index.html index.htm;Without this, Nginx may not process WordPress requests correctly.
For broader 403 troubleshooting in WordPress with Nginx, see this step-by-step guide.
Login loops or form refresh issues
If clients get stuck in login loops or forms keep refreshing without submitting, the problem is usually caching.
Exclude portal URLs from cache
Your Nginx cache or caching plugin needs to exclude dynamic Client Portal pages. Add these URLs to your never-cache list:
/client/*
/client-portal-login/
Any custom portal slug you created
Full instructions are in Exclude Client Portal from cache.
Need more help?
If you still have issues:
Check your Nginx error logs for specific messages, usually in
/var/log/nginx/error.log.Contact your hosting provider with details about the specific error.
Submit a support ticket with screenshots of the error and details about your hosting environment.
For general Nginx and WordPress configuration guidance, SpinupWP provides a complete Nginx configuration kit.