How to disable plupload completely from latest wordpress 3.6 and make browser upload default

This is how the plupload upoader is loaded on Media > Add New do_action( ‘pre-plupload-upload-ui’ ); // all the html output for plupload’s use do_action( ‘post-plupload-upload-ui’ ); If it was this instead: ob_start(); // all the html output for plupload’s use ob_end_clean(); Then no UI, no plupload: add_action( ‘pre-plupload-upload-ui’, ‘ob_start’ ); add_action( ‘post-plupload-upload-ui’, ‘ob_end_clean’ ); … Read more

Site running slow on new server?

Your site is very, very heavy at 4+ megs. Lighten it up; see http://gtmetrix.com/reports/www.moseleycoachsales.co.uk/eyz4qxQx Fix the code errors, such as not specifying image dimensions, not correctly scaling your images, not optimizing your images, setting browser caching and expires headers, etc. Your site speed has very little to do with one 404 for one style sheet. … Read more

wp_handle_upload returns empty error array

Okay so Milo was on track to what the answer was. and I needed to brush up on muliple file uploads… anyway the solution for me to at least get it to upload… was this $daFile = $_FILES[‘files’]; foreach ($_FILES[‘files’] as $key => $value) { $daFile[$key] = $value[0]; } $upload = wp_handle_upload($daFile , array(‘test_form’ => … Read more

Using wp_handle_upload() to Direct Specific Path by Using $overrides

You need to specify a list of allowed mime types. You could make it easy by just getting the allowed mime types like: $file = $_FILES[‘the-file’]; $upload_file = wp_handle_upload($file, array( ‘test_form’ => false, ‘mimes’ => get_allowed_mime_types() )); If you look at the codex for Default allowed mime types, you could manually specify which ever mime … Read more

Separate Uploads folder on other server

Assuming you want to have a CDN effect or even for some security reasons (we also look into that but CDN will cost us too much (we have over 1TB monthly)), maybe following links will guide you into the right direction. This info I found here on stackechange itself These links tell some about using … Read more

using wp_insert_attachment() results in guids with file names different to the same file when uploaded via media page in admin

So I figured this out. The function wp_insert_attachment() sanitizes file names parsed to it. In the process it was removing spaces in filenames. To avoid this I did my own sanitization (still using WP functions) before parsing the filenames. I renamed my files using sanitize_file_name() and this added hyphens (what I desired really) into all … Read more