Pheditor is a single-file editor and file manager written in PHP.
- Editor with syntax highlighting
- File Manager (create, rename and delete files and directories)
- Password protected area
- Keeping the history of edited files and changes
- Keyboard shortcuts
- Access levels for reading and writing and other permissions
- Dark mode
- Web server (Nginx, Apache, or etc)
- PHP 7.2 or above
Install & Usage
Install using composer:
composer create-project pheditor/pheditor
or just upload
pheditor.php to your web host (and/or rename it as you wish).
By default Pheditor uses CDN to load required libraries but also it is possible to load assets from local directory.
For using local assets follow these steps:
npm ito install required dependencies.
- The default password is
admin. Please change the password after install or first login.
- As the script gives permission to edit files, it is recommended to keep the address secret or protected depending on the web-server you are using.
The settings would be editable in the main PHP file (pheditor.php by default). The settings are as below:
- Define patterns for files and directories to view/edit (empty means all files & directories)
- Log file path
- Show/Hide hidden files
- Limit access to the page only for an IP address (empty means access for all)
- Show/Hide main pheditor file (pheditor.php) in files list to edit
- History files path
- Word wrap
- Changing main directory (
- Enable/Disable Terminal
- Define allowed terminal commands
- Change editor theme (
EDITOR_THEME) (theme list)
- New file and directory permissions (
Using without password:
You can empty the
PASSWORD constant in the source code to access the script without the password. But it is highly recommended to use it and change the default password after installation.
Access Levels and Permissions:
There are eight permissions for users that is defined in
PERMISSIONS constant. You can remove any of them as you need.
If you found this project useful, please consider making a donation to keep this project alive.