Articles of uploads

Unable to Upload Images on Local Windows Install

I am having the Famous has failed to upload due to an error Unable to create directory error that soo many people run into. Any search on Google of StackExchange will result is the common, change your file/folder permissions answer. Well I am running WordPress vs 3.5.1 on Windows 7. Permissions aren’t as simple as […]

Check for file extension or mime type fails

I need to check if a uploaded file has .csv or .txt as extension and I’m doing as follow: $uploadfiles = $_FILES[‘uploadfiles’]; echo ‘<pre>’; var_dump($uploadfiles); echo ‘</pre>’; if (is_array($uploadfiles)) { foreach ($uploadfiles[‘name’] as $key => $value) { if ($uploadfiles[‘error’][$key] == 0) { $filetmp = $uploadfiles[‘tmp_name’][$key]; $filename = $uploadfiles[‘name’][$key]; $filetype = wp_check_filetype(basename($filename), null); $filetitle = preg_replace(‘/\.[^.]+$/’, […]

Why is WordPress' file upload limit so low? Is changing it harmful?

Why is the WordPress upload limit set to 2mb? This seems prohibitively low, especially when almost everyone has broadband these days. I know this can be overridden, but I was trying to find a reason it was set to 2mb in the first place, and all I could find was tutorials on how to increase […]

Media not actually deleted on disk when click “Permanent Delete”

I have uploaded a new docx and pdf through the media library and the procedure is completed successfully. I can confirm that the direct link actually works. The problem is being identified when I try to DELETE PERMANENTLY the files. By clicking on “Delete Permanently”, the file record is deleted from the media library, nevertheless […]

Installing new theme on running site

I have a running WordPress site (3.9.6). Now a new theme should be used and for this theme also some customizations have to be made (content, some WP files like page.php and so on). Additionally, I have to update to WordPress 4. All changes shouldn’t be noticed by visitors or at least as small as […]

Upload images and attachments from frontend form

I’m not very expert of wordpress and I’m trying to create a frontend form sending information to my php function through ajax. I’d need help about uploading images and files as attachments of the post. My jQuery / Ajax is sending everything correctly to my php file. The only thing I don’t understand is why […]

Maximum post size?

I use a form to allow users to post tutorials on my website. When there are too many pictures uploaded, it seems like the site reaches a limit and stop uploading them: the post has only the first half of the uploaded photos. Does it mean there is a limit post size ? If yes, […]

WP 4.3.1 new install on localhost missing php.ini

I’ve installed WordPress on my localhost Mac OSX Yosemite box. I’m getting error: The uploaded file exceeds the upload_max_filesize directive in php.ini phpinfo() reports upload_max_filesize = 2M I noticed that there was no php.ini inside the wp-admin folder of the WordPress default install, so I placed one there with upload_max_filesize = 64M. I placed the […]

WordPress media upload “HTTP error”

When I try to upload an image, I get the following error: HTTP error. I know this problem has been solved hundred times but I can’t find the right answer form my configuration. In the php.ini, I have the following: upload_max_filesize = 50M max_file_uploads = 20 post_max_size = 50M And in my wp-config.php, I added: […]

How do I Import / Upload Files with jQuery AJAX?

I keep running into an issue getting the file(s) added in AJAX so that the server ajax function can process the data. How can I get the $_FILES to be passed the same as with the default action (built into form elements)? HTML Form <form id=”frmImport” name=”frmImport” method=”post” enctype=”multipart/form-data” > <input id=”file_import” name=”importData” type=”file” /> […]