Plugin Planet

Premium WordPress Plugins

USP Pro enables your users to submit files like images and video to your WordPress-powered site. On properly configured setups, file uploads work perfectly. There are, however, a LOT variables involved when it comes to uploading files, and it is not entirely uncommon to experience issues if everything isn’t dialed in as required. So if you are experiencing issues with file uploads, don’t panic. This guide should help you troubleshoot and diagnose any issue, so you can take remedial action and get things back on track.

Symptoms

Here are some issues and errors typically related to file-upload issues and errors:

  • The file upload function isn’t working for mobile devices
  • Getting the error, “ERR_TIMED_OUT”, in Chrome Desktop
  • Getting the “Aw, snap” Chrome error
  • Blank white screen

If this sounds like you, read on for tips that should help to resolve any of these issues. When it comes to troubleshooting file uploads, you want to begin with the least invasive stuff, and then if needed work your way to the more in-depth, advanced server stuff. That’s the approach we’re taking in the following steps.

Step 1: Check plugin settings

First, check thru the relevant USP Pro settings, which for file uploads are located under the plugin’s “Uploads” tab.

  • Uploads tab > Maximum file size
  • Uploads tab > Max width for images
  • Uploads tab > Max height for images
  • Uploads tab > Allowed File Types

So you can check those first, to make sure they suit your requirements. For example, if you are trying to upload images taken with your mobile device, you’ll need to make sure that the maximum size, width, and height settings are going to allow it. Likewise, if you are trying to upload a specific type of file, like a PDF or something, you’ll want to make sure that the “Allowed File Types” setting is going to allow it.

Step 2: Troubleshooting

After triple-checking that your plugin settings are correct, try uploading another file. If the issue persists, it is time to do some basic troubleshooting. Here are some things that you will want to check:

  • Can you upload via desktop web browser (not mobile)
  • Are you getting any error messages when you submit the form
  • Are you getting any error messages in your site/server error log
  • Have you double-checked all of the settings under the Upload tab
  • Have you double-checked the shortcode you are using
  • Do uploads on mobile work if you are logged in/logged out
  • Try uploading smaller files of different file types

Depending on your setup and goals, some of these steps may or may not be applicable in your specific case. The idea is to be thorough when troubleshooting, in order to eliminate variables and determine the cause of any issue.

Step 3: Check Server Configuration

If you’ve gone through the previous steps and still are experiencing upload issues, most likely things are not adequately configured on your server. For example, it is common for inexpensive web hosts (e.g., some shared hosts) to limit the amount of data that can be uploaded to the server (e.g., like from a file upload). Additionally, phones and other mobile devices tend to capture high-resolution photos and videos (i.e., the file sizes are very large, even for a 5 second video, the file size is over 10MB!). So, if your server is not configured to allow such large file sizes, then uploads will fail.

So what things should you check on the server? Well, I’m not familiar with Windows servers, but on Linux/Apache servers, there are several directives that control things like maximum allowed upload size, post size, memory limit, and so forth. Here is a short list of key configuration directives to check:

memory_limit
max_execution_time
max_input_time
post_max_size
upload_max_filesize

Specifically check the last two directives on that list, and compare against the actual file sizes that you are trying to upload. There probably are similar directives for Windows and other types of servers. If you are unsure about anything, do some research and/or ask your web host for help. They will best know how to increase the limits for any directives related to file uploads.

Bonus: Upload specific file types

While on the topic of troubleshooting file uploads, here is a quick guide that can help if you are experiencing issues when trying to upload a specific type of file, like a PDF or ZIP file.

  1. Make sure the file type is supported
  2. If the file format is on that list, then you can “allow” it with the types attribute, for example: [usp_files types="pdf"]

That’s all there is to it. The trick here basically is making sure that you “allow” the file type in question. This can be done globally (for all forms), or locally (per a specific form), as explained in this tutorial.

Bonus: Upload & display specific file types

As an extra bonus, here are steps that explain how to display a specific type of file (e.g., PDF) on the frontend.

  1. Make sure the file type is allowed for your File(s) field, e.g., [usp_files types="pdf"]
  2. Submit a test post that includes a PDF file (or whatever file type you are working with)
  3. Visit the “Edit Post” screen and open the “Custom Fields” panel
  4. Look to make sure that the file URL is attached as a custom field

If the PDF URL is attached as a custom field, then also check the Media Library, to make sure the file itself was added. Then once everything looks good, you can display a link to the PDF file using the free Helper extension. That free plugin provides options to display custom fields (like PDF) on the front-end of your site. Follow the steps in the tutorial, and also check out our tutorial on displaying custom fields for more information and a video tutorial that shows how to use the Helper extension.