How to Allow Additional File Types in WordPress

WordPress allows you to only upload the most commonly used file types for security reasons. You can upload commonly used image formats, audio/video, and documents using the default media uploader. But what if you want to upload a certain file with extension that is not allowed? In this section, we will review a simple way to add additional file types to be uploaded in WordPress.

The full list of allowed files types by default can be found here.

Editing wp-config.php file to upload any file type

If you want to allow any and all file types to be uploaded to your website, just one line of code needs to be added to your wp-config.php file.

Visit the following page to learn How to Edit wp-config.php File

It’s very easy to do this, but to avoid unexpected outcomes, you should always make a backup of your wp-config.php file before editing. Even a small error in the file can damage the accessibility of your website.

After you have opened your wp-config.php file, scroll to the bottom of the file. At the end of the file, you will find the line: /* That's all, stop editing! Happy blogging. */. Above this line, copy and paste the following code:

You need to log out of WordPress and sign back in after saving the changes to the file. Now you should be allowed to upload any file type.

Last updated