WordPress upload bulky file issue

Solution:1

Looking at the code to the plugin, in custom-contact-forms-front.php in function processFileUpload($field) I see:

if ($field->field_max_upload_size > 0 && $_FILES[$field->field_slug]['size'] > ($field->field_max_upload_size * 1000))
   $errors[] = basename($_FILES[$field->field_slug]['name']) . __(' is too large of a file. The maximum file size for that field is ', 'custom-contact-forms') . $field->field_max_upload_size . __(' KB.', 'custom-contact-forms');

Which is horrendously cryptic, IMO, but looks like it should be putting an error message in the $errors array. Down below I see

$upload_result = $this->processFileUpload($field, $post_time);
foreach ($upload_result as $err) {
$this->setFormError($field->field_slug, $err);

So it looks like the plugin attempts to create an error message. Would have to dig into some layers to see where it’s going wrong.

Solution:2

In order to bulk upload your files to the WordPress media library, you’ll need a few tools and pieces of information:

  • The FTP account details for your host – we’ll show you how to find these for your Kinsta account. If you’re using a different host, you’ll need to get those details from your own hosting dashboard.
  • An FTP program – a piece of software that allows you to upload files to your host. FileZilla is a good free option, but you can pick another FTP program if you’d prefer.
  • Add From Server plugin – this free plugin helps you to register your uploaded files to your media library.

Step 1: Connect to Your Website via FTP

To get started, you’ll need to connect to your site via FTP or SFTP (understand the difference between the two here). SFTP is just short for Secure FTP. Kinsta exclusively uses SFTP, but some other hosts operate on FTP still.

Remember – you’ll need an FTP program to do this. We’ll use FileZilla in our screenshots, but you can use a different FTP program if you’d like.

To actually connect, you’ll need your FTP login details (specifically SFTP for Kinsta). If you’re using Kinsta, you can find these details by going to the Sites > Your Site > Info in MyKinsta.

In the SFTP/SSH section, you’ll need the host, username, password, and port.

 

SFTP/SSH details in MyKinsta.

Now, you have all the information you need to connect via FTP. If you’re not using Kinsta, you should be able to get this same information from your host.

Armed with your SFTP details, go back to your FTP program and enter them as follows:

  • Host – your host name preceded by “sftp://”. For example: sftp://35.224.70.159Additionally, some FTP programs allow you to specify the SFTP method in a separate dropdown. You can view a guide for such programs here.
  • Username – from your Kinsta dashboard
  • Password – from your Kinsta dashboard
  • Port – from your Kinsta dashboard

 

Filezilla login via SFTP

Once you’ve entered the information, click the Quickconnect button and FileZilla (or your FTP program of choice) will handle the rest.

Step 2: Upload As Many Files As You’d Like

At this point, you should be connected to your site via an FTP client. You can confirm this by looking for the Status: Connected to yoursite.com message:

Connected with Filezilla FTP client

Now, you need to upload your files to the uploads folder in your WordPress site. To do that, expand the folder structure of your Remote Site tab in your FTP program by clicking the buttons. You can see the file path to follow in the screenshot below:

 

Expanding FTP folders

Now, you can navigate to the files you’d like to upload in the Local Site tab of your FTP program. All you need to do is drag those files from the Local Site side to the Uploads folder in your Remote Site:

 

Upload local files via FTP

Depending on the size of your files, it might take some time for them to upload. But other than waiting for the uploads to complete, you’re now finished with this step.

Step 3: Register Your Newly Uploaded Files to the WordPress Media Library

Once the FTP uploads finish, your files are live on your server. But if you go to your WordPress site’s media library, you’ll notice that the files are nowhere to be seen:

 

WordPress media library

To bring those files into your library, you need to install and activate the free Add From Server plugin.

Once the plugin is activated, you can navigate to Media → Add From Server. Then click the uploads folder in the list:

 

Add From Server WordPress plugin

Now, you should see a list of the files you just uploaded via FTP. Assuming you want to import every single file, you can just tick the checkbox to Select All (if not, you can always select individual files). Then, click the Import button at the bottom:

 

Add From Server – select files

After clicking the button, you should see a success message for each individual file at the top of your screen:

 

Adding media library folders via FTP

And when you go back to your media library, you should see all of the files you uploaded via FTP:

 

FTP files show in WordPress media library

That’s it! You’re done at this point. That’s all you need to do to bulk upload files to your WordPress media library.