WP Upload Restriction

Plugin Banner

WP Upload Restriction

by Sajjad Hossain

Download
Description

This plugin allows you to restrict your site users from uploading files of certain types and control the maximum file upload size. Administrator can select the file types and file upload limit by user role. This plugin restricts users from uploading unwanted files using the WordPress media uploader.

It is very simple to use. You will be able give permissions role wise. To restore WordPress’s default selection, just deactivate the plugin.

Any issue? Please let me know (http://sajjadhossain.com/contact-me/).

  1. Upload wp-upload-restriction folder to the plugins directory (/wp-content/plugins/).
  2. Activate the plugin through the ‘Plugins’ menu in WordPress.
  3. Go to Settings > WP Upload Restriction settings page.
  4. Check/uncheck the extensions you want to allow/deny for each role.
  5. Check “Restrict upload size to” checkbox to restrict file upload size and enter the file size in MB.
  6. Save the changes.

To return back to WordPress’s default selection, just deactivate the plugin.

  1. Settings - Restriction page

    Settings - Restriction page

  2. Settings - Custom File Type management page

    Settings - Custom File Type management page

A few suggestions and bug report

By Abdolaziz (abdolaziz) on August 28, 2025

Hello
Thanks for your awesome plugin.
I use it in my marketplace. There are a few suggestions.

  1. [BUG] Even though I deselected all the image formats, I/users can upload .json files.
  2. Restricting users to a specific number of files or min/max.

Works perfectly and still alive WordPress 6.6

By stephunique on July 23, 2024

This is probably the only one of its kind on the wordpress plugin market and I am so happy it not only works, but that it had been updated. Works perfectly fine for WordPress 6.6. Thank you so much for this!

Worked perfectly

By Candace (candace1961) on June 28, 2023

Thank you for this plugin!

No funciona

By nextep (nextep2) on December 22, 2022

Hace meses que no se actualiza y da mensajes de error al intentar configurarlo.

Perfect!

By Gustavo Tadeu (gtsantos) on February 18, 2022

Very good indeed.

Didn't work

By ksnakew on June 25, 2021

It only shows "Settings could not be saved." and does nothing. In support section there is several topics for this issue without answer or solution.

Didn't work

By robhauer6 on November 6, 2020

Nothing happens, loading animation all the time in "Restrictions", nothing happens when you try to add a custum file type.

Unable to save settings

By RJRISO on October 7, 2020

Installed and activated. Admin screens are easy enough to understand, but unfortunately it won't save settings under the current version of WP and WooCommerce. I gave it two stars in hopes that it will be fixed. If not, I'll downgrade to 1 star.

Thank U so much, U are awesome

By oscarbg on September 13, 2020

It works perfectly! U made my day! Best regards!

Settings could not be saved.

By ivanjst2 on October 19, 2019

Settings could not be saved. Generated this error

2.3.0

  • Fixed: Settings were not saving when no mime types were selected.
  • Tested with WP version 6.8

2.2.9

  • Fixed: Limit unit was saving but not showing the actual selection.
  • Tested with WP version 6.5.5

2.2.8

  • Fixed security related issues.

2.2.3

  • Minor fixes.

2.2.2

  • New feature: Added option for selecting file size unit (MB and KB).
  • Compatibility check.

2.2.0

  • New feature: Added option for managing custom file type.
  • UI improvements

2.1.0

  • Role wise file upload size restriction added.
  • Fixed some minor issues.

2.0.1

  • Fixed design break in settings page.

2.0.0

  • Restructured the plugin to add role wise restriction.
Back to top