What You’ll Learn
- Identify the cause of upload failures
- Check server configuration requirements
- Resolve security rule conflicts
- Understand localhost limitations
Prerequisites
- MainWP Dashboard installed and activated
- Admin access to your Dashboard site
- Access to server configuration (or hosting support)
Check Server Configuration
PHP tmpfile() Function
Thetmpfile() PHP function is required for processing file uploads. If disabled, uploads fail.
File Size Limits
Your server must allow uploads large enough for plugin and theme .zip files.| Setting | Recommended Value | Where to Check |
|---|---|---|
| upload_max_filesize | 64M or higher | MainWP > Info > Server |
| post_max_size | 64M or higher | MainWP > Info > Server |
| max_execution_time | 300 seconds | MainWP > Info > Server |
Check Security Rules
Security configurations can block the upload process. Try these steps in order..htaccess Rules
Review .htaccess
Check the .htaccess file in your Dashboard’s WordPress directory for security rules that might block uploads.
Security Plugins
Security plugins on your Dashboard can interfere with upload processes.Server Firewall
Your hosting provider’s firewall may block the connection.- Contact hosting support to check firewall logs
- Request whitelisting for your Dashboard’s internal processes
- Verify that ModSecurity or similar WAF isn’t blocking uploads
HTTP Basic Authentication
If your Dashboard is protected by HTTP Basic Auth (.htpasswd), uploads may fail.Localhost Limitations
If your MainWP Dashboard runs on a local development environment (localhost), child sites on remote servers cannot connect back to receive files.Why This Happens
- Localhost is not accessible from the internet
- Child sites cannot reach your local Dashboard to download files
- The upload process requires two-way communication
Solutions for Localhost
| Option | Description |
|---|---|
| Use a tunnel | Tools like ngrok expose localhost to the internet temporarily |
| Upload directly | Install plugins/themes directly on child sites for testing |
| Use staging | Test with a publicly accessible staging Dashboard |
Self-Check Checklist
- PHP tmpfile() function is enabled
- upload_max_filesize is adequate
- .htaccess doesn’t block uploads
- Security plugins temporarily disabled for testing
- HTTP Basic Auth disabled (if applicable)
- Dashboard is publicly accessible (not localhost)
- Uploads complete successfully
Related Resources
- Resolve System Requirements - Server configuration issues
- Enable tmpfile on Cloudways - Cloudways-specific fix
- Troubleshoot Connection Problems - General connection issues