Title: Media File Limiter
Author: teamredfox
Published: <strong>5 نوفمبر، 2025</strong>
Last modified: 5 نوفمبر، 2025

---

البحث عن الإضافات

هذه الإضافة **لم يتم تحديثها وتجربتها لأكثر من 3 إصدارات ووردبريس رئيسية**. قد لا
تكون خاضعة للصيانة أو تقدم الدعم والمساعدة بالوقت الحالي وقد تكون بها مشاكل في التوافق
عند إستخدامها مع إصدارات حديثة من ووردبريس.

![](https://s.w.org/plugins/geopattern-icon/media-file-limiter.svg)

# Media File Limiter

 بواسطة [teamredfox](https://profiles.wordpress.org/teamredfox/)

[تنزيل](https://downloads.wordpress.org/plugin/media-file-limiter.1.0.zip)

 * [تفاصيل](https://ar.wordpress.org/plugins/media-file-limiter/#description)
 * [المراجعات](https://ar.wordpress.org/plugins/media-file-limiter/#reviews)
 *  [التنصيب](https://ar.wordpress.org/plugins/media-file-limiter/#installation)
 * [التطوير](https://ar.wordpress.org/plugins/media-file-limiter/#developers)

 [الدعم](https://wordpress.org/support/plugin/media-file-limiter/)

## الوصف

Media File Limiter is a lightweight and efficient plugin designed to strengthen 
your WordPress upload security.

It limits the maximum upload file size (in MB) and blocks specific dangerous file
extensions (e.g., .exe, .php, .html, .js), preventing malicious or oversized files
from being uploaded to your media library.

Unlike traditional file validation, this plugin operates at the earliest possible
stage of the upload process via the wp_handle_upload_prefilter hook, ensuring that
dangerous files are blocked before WordPress processes them.

Key Features
 Set a custom maximum upload size (in MB).

Define forbidden file extensions (comma-separated).

Displays current PHP/WordPress upload limits for reference.

Early-stage security enforcement — before files reach media processing.

Fully translatable and internationalized (media-file-limiter text domain).

Compatible with multisite environments.

Why This Plugin?
 WordPress allows large files and executable extensions under certain
misconfigurations, which can lead to:

Server performance degradation.

Potential remote code execution (RCE) risks.

Media library clutter and upload errors.

Media File Limiter addresses these issues with a simple, configurable interface 
under the WordPress “Settings  Media Limit” page.

### License

This plugin is free software: you can redistribute it and/or modify it under the
terms of the GNU General Public License as published by the Free Software Foundation,
either version 2 of the License, or any later version.

This plugin is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.

### Additional Notes

The plugin follows WordPress Coding Standards (WPCS).

All options use the Settings API (register_setting / add_settings_field).

Security first: early execution priority (wp_handle_upload_prefilter, priority 1).

Uninstall hook (register_uninstall_hook) ensures full cleanup.

## لقطات الشاشة

[⌊Settings page under “Media Limit”⌉⌊Settings page under “Media Limit”⌉[

Settings page under “Media Limit”

## التنصيب

 1. Upload the plugin files to the /wp-content/plugins/media-file-limiter/ directory,
    or install the plugin via the WordPress plugins screen directly.
 2. Activate the plugin through the ‘Plugins’ screen in WordPress.
 3. Navigate to Settings  Media Limit to configure:
 4. Maximum upload size (MB)
 5. Forbidden file extensions (comma-separated)

## الأسئلة المتكررّة

### Q1. Does this override the PHP upload limit (upload_max_filesize)?

No. This plugin enforces an additional upper bound below your PHP/WordPress limit.
You cannot exceed the PHP upload_max_filesize or post_max_size settings.

### Q2. What happens when an upload exceeds the configured size?

The upload process is immediately stopped, and a descriptive error message appears
to the user.

### Q3. Can I allow some extensions while blocking others?

Yes. You can specify any combination of extensions in the settings field (e.g., 
exe, php, html).

### Q4. Does this affect plugin/theme uploads or imports?

No. It only affects media uploads (via wp_handle_upload_prefilter), not plugin/theme
installers.

### Q5. Is it compatible with multisite?

Yes. Each site can configure its own upload limit and forbidden extensions independently.

## المراجعات

لا توجد مراجعات لهذه الإضافة.

## المساهمون والمطوّرون

“Media File Limiter” هو برنامج مفتوح المصدر. وقد ساهم هؤلاء الأشخاص بالأسفل في هذه
الإضافة.

المساهمون

 *   [ teamredfox ](https://profiles.wordpress.org/teamredfox/)

[ترجمة ”Media File Limiter“ إلى لغتك.](https://translate.wordpress.org/projects/wp-plugins/media-file-limiter)

### مُهتم بالتطوير؟

[تصفّح الشفرة](https://plugins.trac.wordpress.org/browser/media-file-limiter/)، 
تحقق من [مستودع SVN](https://plugins.svn.wordpress.org/media-file-limiter/)، أو 
الاشتراك في [سجل التطوير](https://plugins.trac.wordpress.org/log/media-file-limiter/)
بواسطة [RSS](https://plugins.trac.wordpress.org/log/media-file-limiter/?limit=100&mode=stop_on_copy&format=rss).

## سجل التغييرات

#### 1.0

Initial release.

Added:

Maximum file size limit setting.

Forbidden extensions list (comma-separated).

Early upload filtering using wp_handle_upload_prefilter.

Uninstall cleanup for stored options.

Admin settings UI with contextual help and current PHP limit display.

## ميتا Meta

 *  Version **1.0**
 *  Last updated **قبل سنة واحدة**
 *  Active installations **10+**
 *  WordPress version ** 6.8 أو أعلى **
 *  Tested up to **6.8.12**
 *  PHP version ** 7.4 أو أعلى **
 *  Language
 * [English (US)](https://wordpress.org/plugins/media-file-limiter/)
 * Tags
 * [file size](https://ar.wordpress.org/plugins/tags/file-size/)[media](https://ar.wordpress.org/plugins/tags/media/)
   [mime](https://ar.wordpress.org/plugins/tags/mime/)[security](https://ar.wordpress.org/plugins/tags/security/)
   [upload](https://ar.wordpress.org/plugins/tags/upload/)
 *  [عرض متقدم](https://ar.wordpress.org/plugins/media-file-limiter/advanced/)

## التقييم

لم يتم تقديم أي مراجعات بعد.

[Your review](https://wordpress.org/support/plugin/media-file-limiter/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/media-file-limiter/reviews/)

## المساهمون

 *   [ teamredfox ](https://profiles.wordpress.org/teamredfox/)

## الدعم

لديك شيء لتقوله؟ بحاجة الى مساعدة؟

 [عرض منتدى الدعم](https://wordpress.org/support/plugin/media-file-limiter/)