I'm developing on a localhost on a Mac (AMPPS for Mac).

When I attempt to upload a JPG exported from Photoshop, I receive the error “Sorry, this file type is not permitted for security reasons.”

I have debug turned on with no errors produced.

If I migrate the database to a remote staging server using WP Migrate DB Pro, I receive the same error on the remote staging server.

I have added the constant define('ALLOW_UNFILTERED_UPLOADS', true); in wp-config.php and the issue remains.

I have added the following to my theme functions.php with no change:

function enable_extended_upload ( $mime_types =array() ) {
    $mime_types['jpg']  = 'image/jpeg';
    return $mime_types;
add_filter('upload_mimes', 'enable_extended_upload');

Changing to Twenty Seventeen does not resolve the issue.

If I deactivate all plugins the issue remains.

Reinstalling Wordpress does not resolve the issue.

How do I troubleshoot this please?

Thanks, Steve


Because the problem was not host, theme, or plugin specific, I figured it must be an issue in the database.

On the remote staging site, I dropped all database tables, reran the Wordpress setup wizard, enabled plugins, and then imported a Wordpress export from the local development site.

I can now upload images, but still don't know what was preventing me from uploading them originally.

Edit: I can upload some images. The original Photoshop saved/exported JPGs still produce the same error.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.