# 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 an extension that is not allowed? In this section, we will review a simple way to add additional file types to be uploaded in WordPress.

{% hint style="info" %}
The full list of allowed file types by default can be found [here](https://codex.wordpress.org/Uploading_Files).
{% endhint %}

## **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.

{% hint style="info" %}
Visit the following page to learn [How to Edit wp-config.php File](https://stylemixthemes.com/wp/editing-wp-config-php-file-in-wordpress/)
{% endhint %}

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:

```php
define( 'PATH_CURRENT_SITE', '/' );
define( 'SITE_ID_CURRENT_SITE', 1 );
define( 'BLOG_ID_CURRENT_SITE', 1 );
define('ALLOW_UNFILTERED_UPLOADS', true);

/* That's all, stop editing! Happy publishing. */
```

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.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.stylemixthemes.com/cost-calculator-builder/calculator-elements/file-upload/how-to-allow-additional-file-types-in-wordpress.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
