From a 10-Minute Nap to 300+ Installs: The Story of My 'Restrict WP Upload Type' Plugin
๐ผ It Started With WordPress 4.7 I still remember the version number: WordPress 4.7 . That's when I properly started my journey as a WordPress developer. Not as a "I read a tutorial and now I'm an expert" kind of start โ more like a "I broke a client's site three times before lunch" kind of start. Those were good years, honestly. I built a lot of sites. Small business sites, portfolio sites,โฆ
The story begins with the author's humble beginnings as a WordPress developer. After experiencing multiple crashes and server resource issues due to improper media uploads, they embarked on a journey to develop a solution. This journey started with WordPress 4.7 and led to the creation of their first personal plugin, "Product Category," which taught them valuable lessons about plugin development and the WordPress.org review process.
While taking a brief nap, the author was struck by a realization: "What if there was one simple plugin where a site owner could just check which file types are allowed โ and everything else gets blocked automatically?" This simple idea sparked the development of the "Restrict WP Upload Type" plugin. Before writing any code, the author meticulously planned the plugin, mapping out its features, settings screen, validation process, and ensuring adherence to WordPress coding standards.
Upon completion, the plugin underwent extensive testing, including local development and live production sites. The author encountered a challenge where uploads stopped working entirely in production, which was traced back to a plugin conflict with another plugin. To resolve the issue, the author added compatibility functions and adjusted the restriction logic to work harmoniously with other plugins.
Finally, in April 2022, the "Restrict WP Upload Type" plugin was launched on WordPress.org. The plugin allows users to control over 97 file extensions and MIME types, offering a simple allow/block toggle for each format. It also includes a dedicated SVG security toggle and a real-time validation system that blocks bad uploads before they reach WordPress. The plugin is highly configurable with zero configuration complexity, making it easy for site owners to implement.
The launch of the plugin received positive reviews, with a 5-star average rating. These reviews provided valuable insights into areas for future development. The plugin's success demonstrates the importance of addressing common issues faced by WordPress users, such as improper media uploads, and providing a simple, effective solution to streamline the process.
Written by urgent.news from Dev.to's reporting โ not their text. Machine-written โ may contain errors; check the original before relying on it.
