When uploading a file to your WordPress Media Library, you might encounter the “Sorry, you are not allowed to upload this file type.” error. The message appears when you try to upload a file with an extension different than what WordPress allows by default. The default file types allowed are: Show
Trying to upload files with extensions outside of the above will result in the “Sorry, you are not allowed to upload this file type.” error. How to Avoid Getting The “Sorry, you are not allowed to upload this file type” Error?Change File Format Before UploadingTo change the file extension to avoid the “Sorry, You Are Not Allowed to Upload This File Type” error in WordPress, follow the steps below. On MacOS – locate the file, right-click, and select “Get Info.” Under “Name & Extension,” edit the file name, including the desired extension. Confirm the change and acknowledge any warning prompts. On Windows – find the file, right-click, and choose “Rename.” Modify the file name, ensuring the new extension is appropriate. Windows may ask for confirmation; proceed accordingly. After changing the file extension, consider updating any references within the article or associated metadata. Test the upload functionality on WordPress to ensure the error is resolved. Update The wp-configTo allow the upload, go to Site Tools > Site > File Manager and edit the wp-config.php file for your WordPress, which is usually found in the public_html folder. Above the line ‘That’s all, stop editing! Happy publishing.‘ insert the following:
Save the changes to the file and you should be able to upload the desired file from your WordPress wp-admin -> Media -> Add New. For security reasons it is recommended to remove that new line you added in the wp-config.php after you upload the desired files. If you later want to upload more, you can add the line again. Did you encounter an error message when opening photos on an external hard drive? The message says "It looks like you don't have permission to view this file. Check the permissions and try again." The error implies that Windows Photos or File Explorer is not authorized to access this file. In this article, we explain how to fix this error, so you can view your photos again. Why Can't You View the File?You may encounter this error if your external hard drive is connected to a device without the right permissions settings. Other possible causes include user account control settings which restrict access to external drives, or a corrupted Windows Photos app. Now you know what causes this error, let's explore the solution. 1. Grant Full Control PermissionsIt looks like the main issue causing this error is that Windows doesn’t have sufficient permissions to access the file. To fix this, you must grant full control permissions to the account or user accessing the file. Here are the steps to follow:
After making these changes, try viewing the photos again and checking if the error has been resolved. 2. Take Ownership of the FolderIf granting full control permissions does not work, take ownership of the folder to get more control. Taking ownership means you can manage, access, and delete files within it. Here's how to do it:
After that, restart your computer and try accessing the folder. 3. Reset the Photos AppAnother way to fix this error is to reset the Photos app. Resetting the app will delete all settings and cached data and restore it to its default state. Here’s how to reset the Photos app:
After that, try to open photos on your external hard drive. 4. Disable UAC TemporarilyYou may often find that you don’t have enough permissions to perform specific tasks. In such cases, disabling UAC may do the trick. So, disable it temporarily and see if it works. 5. Run the Program Compatibility TroubleshooterIf you're still encountering the error, try running the Program Compatibility Troubleshooter. This tool scans for compatibility issues with installed programs and solves them automatically. Open Files Without a Problem Again on WindowsIf you have the proper permissions, you should not encounter the "you don’t have permission to view this file” message. However, if you run into this issue, read this guide to resolve it quickly. Make sure you grant all permissions and take ownership of the folder. |