Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

This include all question concerning the process of uploading file, whether from the WP Admin Pages or from a front end editor.

0
votes
0answers
9 views

Media upload not working after moving site [on hold]

I've recently moved a website from a different server. All went pretty smoothly, except I can't upload any media. I get the following error: Unable to create directory uploads/2014/06. Is its ...
0
votes
0answers
18 views

can't skip forward vidos in most browsers

I have two wordpress sites in separate folders on hosting. On one of them video plays fine, so it is not a server problem. Second site cannot navigate(rewind) back/forward all videos. Video playback ...
0
votes
0answers
23 views

Uploading media to WordPress gives an error occurred in the upload. Please try again later after chagning host

I Recently changed web host and I realized that uploading images gives the error "An error occurred in the upload. Please try again later." (because I turned on debug mode. Normally the error was "...
0
votes
0answers
16 views

Remove [gallery] shortcode and print html

When create new gallery from "Create Gallery" in Media into a plugin I need remove the shortcode [gallery ids="...,..."] that it print after loading and selecting photo action in text editor with a ...
0
votes
2answers
26 views

Upload media (image) and set the category

I want to upload an image and attach to it a category. This is my code: function upload_cover(WP_REST_Request $request) { require_once( ABSPATH . 'wp-admin/includes/image.php' ); ...
0
votes
0answers
13 views

wp_delete_attachment doesn't delete image files / doesn't work

wp_delete_attachment should delete everything that is about attachment. However if I do wp_delete_attachment( (int)$delete_attachment_id, true ); The files remain on the server (even true should ...
2
votes
1answer
32 views

getting uploaded SVG dimensions on front-end

Having successfully uploaded an SVG image through WordPress's back-end media uploader with the help of a third party plugin such as Safe SVG by Daryll Doyle, how can one get the image's dimensions ...
0
votes
1answer
21 views

Bulk upload images in upload folder does not show in media library

my website currently in staging site and I host it locally. Today, I upload some pictures from Live website to wp-content > upload folder but It does not show in Media library, however if I use ...
0
votes
1answer
14 views

Save uploads directly in the uploads folder (on a multisite)

on my current page I want my uploads to be saved directly in the uploaded folder. So their links should be something like https://example.com/wp-content/uploads/myimage.jpg instead of https://example....
1
vote
1answer
27 views

Copying uploaded images not working in wordpress

I am trying to copy an image uploaded using Contact Form 7 to the uploads directory but this only produces an empty jpeg file with 0644 permissions even though the dev directory and the uploads ...
0
votes
1answer
19 views

Rename image filename using 'media_handle_upload'

I need to rename images uploaded by the user when they post on my site. I have a code that works perfectly to save the image and make it part of the post. But I want the images to be renamed to have ...
0
votes
0answers
12 views

Replace media hook

We have developed a custom image media plugin. But now i need to force all media buttons (wordpress wide) to open our plugin not the default wordpress media viewer. How do I do that?
0
votes
2answers
36 views

Website does not reflect changes on live after uploading files via FTP

I have a Wordpress site that is already published on a domain. As I wanted to update the content of some pages, I edited the local version of my website on localhost and then uploaded the files using ...
2
votes
4answers
41 views

how to change max file upload size WordPress 4.9.8 [closed]

As the title states i have tried it with the htaccess file to change the maximum upload size and nothing i have even created a php.ini file in the root of the wordpress folder and still nothing can ...
1
vote
2answers
63 views

WordPress Issue : The uploaded file could not be moved to wp-content/uploads/

I have created a local WordPress 4.9.8 setup with PHP 7 inside a Fedora running machine. When I try to upload media into the WordPress admin, it keeps saying that The uploaded file could not be ...
1
vote
1answer
13 views

Convert (-) and (escape) signs to (_) when uploading files on wordpress media library automatically

For internal purpose, I'm looking for to convert (-) and (escape) sign to (_) automatically when we upload a file (photo,video,audio) on WordPress media library. Example: If i try to upload this 2 ...
0
votes
0answers
7 views

Add an Upload Button on Wordpress Dashboard

I have a membership site, and once a member registers, a Wordpress subscriber account is opened for them. Can someone give me a code to add to my functions.php if I want an upload button to appear ...
0
votes
0answers
16 views

In a sub-directory installation, how to serve media content from main directory?

I have moved WordPress to a subdirectory www.site.com/SUBDIR Media files are stored on www.site.com/SUBDIR/wp-content/uploads/... In WP-settings, WordPress Address (URL) is www.site.com/SUBDIR and ...
0
votes
0answers
11 views

Only allow 1 Image to be uploaded at a time

I need to disable multiple uploads at a time. I am using wp.media.frames on the front end of the site, and cannot use upload_prefilter since it would need to check a post for total uploads - which is ...
0
votes
0answers
11 views

Prevent duplicate uploads?

I created an external upload script for bulk uploading post on per line basis of course the context of this will be hard to see without seeing it, so I attached an image. Each line using my script is ...
0
votes
1answer
17 views

How To Upload Existing WordPress Site To WordPress Multisite Using SSH

I have a WordPress site that needs to move into a WordPress Multisite. I tried to find the site file to upload in wp-content/uploads/sites but I couldn't locate the file. I also tried to upload the ...
0
votes
1answer
21 views

Is there some way to find if media items are used anywhere on the site?

We have a large, old site that has long gone without care and attention, leading us to have several thousand media items, stretching back to 2014. While being tasked to clear up old media items, in ...
0
votes
0answers
21 views

Right path for renaming a file in uploads folder

I wrote a function in my functions.php which automatically renames images in the uploads folder of WordPress with [rename()][1]. I tried different solutions but I always get the error No such file ...
0
votes
0answers
33 views

Unable to upload images or files to WP

I just created a new website with Wordpress and I´m trying to upload a new template from a Zip file. When I do it, I get this message in Spanish (translation below): No se pudo crear el directorio ...
0
votes
0answers
17 views

Allowing upload of files without an extension based on MIME type

I am trying to allow the upload of files that match a specific mime type, regardless of what the extension is (and even if there is no extension at all.) Currently, wordpress is blocking these ...
0
votes
0answers
11 views

Media libarary | wp-content/uploads missing file

I've been experiencing the problem that files are either completely missing from the directory uploads or are within a different directory within uploads. For example: /wp-content/uploads/2017/09/i-...
0
votes
0answers
18 views

Compare the name of two images in wordpress

I have this function in wordpress implemented, add_action('wp_ajax_questiondatahtml', 'questiondatahtml_update'); add_action('wp_ajax_nopriv_questiondatahtml', 'questiondatahtml_update'); function ...
0
votes
1answer
23 views

How to accept images at multiple sizes and aspect ratios and display as standardized image size / ratio?

Lets say I accept guest post submissions. On the post archive page I have the image the user uploaded with the post on the left and an excerpt of the post on the right. Unless I programmatically ...
0
votes
0answers
9 views

Customize media uploader by user role

I am having a media uploader like below. I want to remove the sidebar on the left so that only portion below the visible. It can be done with css but i hoping that that there is some better way to ...
0
votes
0answers
43 views

WP multisite to use one media library for all sub-site

I am working on a Multisite project. Overview: We are creating the content/posts on main site using Visual Composer page builder plugin and then cloning that post across all sub site using a cloner ...
0
votes
1answer
26 views

Cannot upload png photo files into media library. I get a 'Could not insert post into the database'

I uploaded 7 files this morning but this afternoon all I get is the 'Could not insert post into the database' message. I am a novice at best to WordPress and I have no clue what to do.
0
votes
1answer
9 views

Images not found after migrating Wordpress website

I recently migrated my website to a new hosting platform and since uploading the files and changing the database details, some images aren't being found. I've checked the FTP and the files are in the ...
0
votes
0answers
17 views

Save File from Url to Wordpres

I am writing a custom Plugin for a client, where I want to access a [FILE] (type can be anything from Images to Videos) from a Url on a Server and I want to save that [File] to the Media Database or ...
0
votes
1answer
9 views

Media uploads error

I am very new to this and just created my site yesterday. Suddenly I can’t upload any photos and an error is being displayed ‘An error occurred in the upload. Please try again later’. I saw a ...
0
votes
0answers
13 views

Add Media Dialog In WordPress Post Screen Too Confusing For My Users

How can I edit the contents of the Add Media box (shown above) in the WordPress post screen? All these options are unnecessary for my users, and I need to edit the short-codes as well, but it needs ...
0
votes
0answers
142 views

How to bulk action with uploading images?

I have bulk action to transfer product to woocommerce. I need to create a variation product then attach an image for every variations and product gallery. The image is coming from external url so I ...
0
votes
0answers
13 views

Switch which IPTC field WordPress defaults to for the image title on upload

While looking at the core code documentation, I see wp_read_image_metadata() ( https://codex.wordpress.org/Function_Reference/wp_read_image_metadata ) decides how to populate image "titles" via this ...
0
votes
1answer
15 views

How to change the text of the “You are about to permanently delete these items…” alert message when deleting media from the media library?

This alert shows when you click Delete Permanently on a media (attachment) item. My Goal: I want to change the text of the alert if the current user has a certain custom meta value. Also, changing ...
0
votes
1answer
16 views

How to move UPLOADS folder in sub-domain which hosted in another server

I want to move the uploads folder to a sub-domain. it hosted on another server. there are a lot of guides which is mentioned move the folder to a subdomain which hosted on the same as the main site is....
1
vote
0answers
29 views

Custom Post Type Video - Online/Offline

I have created a custom post type which will store posts that contain videos, i have made use of the ACF wysiwyg field to display the video content and i have a further true/false field which will ...
0
votes
1answer
281 views

WP fails to upload files to media library, /wp-admin/async-upload.php 403 forbidden

I've Googled this question in a large amount of sites, but I've not found any good solution. The problems seems a common one, on the web. These are the details... If I try to upload a file directly ...
0
votes
1answer
176 views

Some Images Disappeared from Media Library?

I am missing some of my images in my Media Library on my site. When I go and look in the Media Library it shows where the images used to be with a blank thumbnail and if I try to view those images it ...
1
vote
0answers
11 views

Why is the temporary upload always 4.1K

My plugin always creates uploads of 4.1KB but these movies should be actually much larger. First I'm registering them as a shutdown function register_shutdown_function(array($this, '...
0
votes
0answers
22 views

Not able to upload Plugins/ Theme from Admin backend

I am facing strange problem that site admin is not able to upload and activate any plugin from the back-end. There is no option available to upload the plugin as well as theme. I have checked all the ...
0
votes
0answers
15 views

Do audio files impact the loading time of the website?

I have to upload 10 audio files (sermons) on the WordPress website for my client, and these files are of around 70mbs explicitly. I need to know whether those audio files affect the loading time of ...
0
votes
1answer
26 views

Can you limit the size of media files being uploaded not using php.ini?

Im facing a problem, we've got several clients who really don't care about what size images they upload but then come to use later in time to ask why the site is slow. So as a solution I would want ...
1
vote
1answer
191 views

Convert all images to PNG on file upload

On my site I have a front end form for users to upload multiple images, using the following code --- if (!empty($_FILES['vidPix']['tmp_name'][0])) { $i = 1; $...
1
vote
1answer
36 views

Email Attachment from Form Submit

I am currently encountering a very strange problem. With the help of two existing wordpress functions (wp_handle_upload and wp_mail) and a form that uses some custom ajax functionality to process my ...
0
votes
0answers
16 views

WordPress Media Uploader set library

I am trying to reuse WordPress Media Uploader and I need to change library. I have looked into the console and this option seems to be under: uploader.options.library.type however setting this does ...
1
vote
0answers
60 views

Can't upload image using media_sideload_image

Have just concern about the media_sideload_image function, its does support https links image? and the wp_upload_dir() support https too? I've tried using media_sideload_image to upload image with ...