Micro File Manager is a fork of TinyFileManager — a versatile, lightweight, single-file PHP web file manager. Drop one PHP file onto any server and instantly get a full-featured file management UI in your browser. MFM builds on TFM's solid foundation with a focus on upgrade-safe configuration, bug fixes, and usability improvements.
Caution! Avoid utilizing this script as a standard file manager in public spaces. It is imperative to remove this script from the server after completing any tasks.
These are the improvements MFM adds on top of the upstream TFM codebase:
| Enhancement | Description |
|---|---|
| Optional external config system | All settings configurable via config.php — no need to touch the main file. You can still keep configs in the main file just like TFM if you prefer.➕ config.php survives version upgrades — drop in a new microfilemanager.php and your settings are untouched.➖ Requires copying both files when deploying — microfilemanager.php + config.php. |
| Smart config merging | $auth_users, $readonly_users, and $directories_users are merged from config.php, not replaced. Main file wins on conflict. |
| Server local timezone | File timestamps display in the server's local timezone. Removed TFM's hardcoded UTC override. Timezone is also configurable via $default_timezone in config.php if you'd prefer a specific zone over the server default. |
| Conflict resolution | Upload, copy, and move operations now show an Overwrite / Rename / Cancel dialog on name collision. TFM previously failed silently or threw an error with no recovery options. |
| Upload conflict queue | When uploading multiple files with simultaneous name collisions, conflicts are queued and resolved one at a time, preventing concurrent conflict dialogs from stomping each other and locking the UI. |
| Advanced Editor (ACE) config | Advanced Editor theme and font size configurable via config.php ($ace_theme, $ace_font_size). TFM has these hard-coded; MFM exposes them as user-configurable settings. |
| Dark-mode file viewer | TFM's file viewer was hard-coded to a light-mode syntax theme regardless of UI theme. MFM's viewer auto-switches the Highlight.js theme to match the UI. Configurable separately for light and dark via config.php. |
| Write-permission awareness | TFM used @fwrite — errors were silently swallowed with zero feedback. MFM removes the suppressor and properly checks is_writable(), fopen(), and fwrite() at each step. Read-only files show a Read Only badge; the Save button is disabled; Ctrl+S is unbound. Save errors surface as specific messages (e.g., "File is not writable. Check permissions/ownership.") rather than TFM's generic "try again". HTTP 403 is returned server-side before any write is attempted. |
| Permission denied on move | When a move operation fails, MFM checks whether the source directory, destination directory, or destination file is the culprit and appends (Permission denied) to the error. TFM returned a generic move-failed message with no indication of why. |
| Full config coverage | Every configurable setting in the main file is documented and overridable in config.php. See config.example.php. |
(Coming soon)
- PHP 5.5.0 or higher.
- Fileinfo, iconv, zip, tar and mbstring extensions are strongly recommended.
Copy microfilemanager.php to your webspace — that's all :)
You can rename the file to anything you want (files.php, index.php, etc.).
Option 1 — Edit the main file directly (simplest)
Open microfilemanager.php and set your users and preferences at the top of the file, just like TFM. One file, done.
Option 2 — Use an external config.php (optional, upgrade-safe)
Copy config.example.php to config.php in the same directory. Settings there are merged in at runtime and survive upgrades — when a new version of MFM drops, just replace microfilemanager.php and your config is untouched.
This also lets you keep a base set of defaults in the main file and layer server-specific settings on top via config.php. Useful if you copy MFM to multiple servers — each gets its own users and paths in a local config.php without needing separate copies of the main file.
cp config.example.php config.phpWhichever approach you use, set your users like this:
$auth_users = array(
'admin' => '$2y$10$...', // generate hash below
);config.php to a public repository — it contains your credentials.
To generate a password hash:
php -r "echo password_hash('yourpassword', PASSWORD_DEFAULT);"Or use the online tool: https://tinyfilemanager.github.io/docs/pwd.html
To enable/disable authentication set $use_auth to true or false.
- 💿 Open Source: Lightweight, minimalist, and extremely simple to set up.
- 📱 Mobile Friendly: Optimized for touch devices and mobile viewing.
- ℹ️ Core Features: Easily create, delete, modify, view, download, copy, and move files.
- ⏫ Advanced Upload Options: Ajax-powered uploads with drag-and-drop support, URL imports, and multi-file uploads with extension filtering.
- 📁 Folder & File Management: Create and organize folders and files effortlessly.
- 🎁 Compression Tools: Compress and extract files in
zipandtarformats. - 😎 User Permissions: User-specific root folder mapping and session-based access control.
- 💾 Direct URLs: Easily copy direct URLs for files.
- ✏️ Code Editor: Includes ACE editor with syntax highlighting for 150+ languages and 35+ themes.
- 📄 Document Preview: Google/Microsoft document viewer for PDF/DOC/XLS/PPT, supporting previews up to 25 MB.
- ⚡ Security Features: Backup capabilities, IP blacklisting, and whitelisting.
- 🔎 Search Functionality: Use
datatable.jsfor fast file search and filtering. - 📁 Customizable Listings: Exclude specific folders and files from directory views.
- 🌐 Multi-language Support: Translations available in 35+ languages with
translation.json. - 🔧 External Config: All settings manageable via
config.phpwithout touching the main file. ‼️ And Much More!
- Available under the GNU license
- Forked from TinyFileManager by prasathmani — original concept and development
- Original concept by github.com/alexantr/filemanager
- CDN Used — jQuery, Bootstrap, Font Awesome, Highlight js, ace js, DropZone js, and DataTable js
- To report a bug or request a feature, please file an issue
