Linux 软件免费装
Banner图

CodeCaste Media and Safe SVG File Upload Rules

开发者 codecaste
更新时间 2026年11月3日 21:37
PHP版本: 7.4 及以上
WordPress版本: 7.1
版权: GPLv2 or later
版权网址: 版权信息

标签

security media upload svg file size

下载

1.0.0

详情介绍:

CodeCaste Media and Safe SVG File Upload Rules lets you decide which files can be uploaded to your site and how big they can be. You set the rules once, and they are applied everywhere files can come in. What you can do Where the rules apply The same rules are used for: This means a file cannot slip past your limits just because it was uploaded through a different plugin. If you prefer not to check other plugins, you can turn that part off in the settings. Why you might want this Light and simple No extra database tables and no background tasks. Settings are stored in the normal WordPress options.

安装:

  1. Go to Plugins > Add New > Upload Plugin, choose the plugin zip file and click Install Now. (Or upload the codecaste-media-and-safe-svg-file-upload-rules folder to /wp-content/plugins/.)
  2. Click Activate.
  3. Open Media upload restrictions in the admin menu.
  4. Set your default size limit and click Save settings.

屏幕截图:

  • Extension rules: SVG settings, the add-rule form and the list of rules you can edit, switch off or block.

升级注意事项:

1.0.0 First release.

常见问题:

Can this plugin raise my server's upload limit?

No. Your hosting sets a hard maximum (the PHP settings upload_max_filesize and post_max_size), and a plugin cannot go above it. This plugin lets you set limits that are lower than or equal to your hosting limit. Ask your host if you need the hosting limit raised.

Why are SVG uploads off by default?

SVG files can contain scripts and links to outside files, which attackers can misuse. When you turn SVG on, the plugin removes scripts, unsafe attributes and other risky parts from each SVG before saving it. Files that cannot be cleaned are refused.

Does it work with WP File Manager and other plugins that have their own upload button?

Yes. The plugin checks uploads that arrive through other plugins, so your size limits and blocked file types still apply. If one of your plugins has a problem with this, switch off Also check uploads from other plugins on the General tab.

Does it affect plugin or theme installs from a zip file?

No. Installing plugins or themes from a zip file and using WordPress importers are left alone.

What if a file type has no rule?

It uses the default size limit from the General tab.

Does a rule for .jpg also cover .jpeg?

Yes. Common alternative spellings are treated as the same type, so a jpg rule also covers jpeg.

A file was refused. How do I allow it?

Check the message shown. Either the file is larger than the limit for its type, or its type is blocked. Raise the limit or remove the block rule on the Extension rules tab.

Can I turn all checks off temporarily?

Yes. Switch off Enforce upload policies on the General tab. SVG cleaning stays active for safety.

更新日志:

1.0.0