WP Emergency File Replacer
Creates a standalone emergency script that lets you upload/replace any file in your WordPress root tree, protected by a password.
by Geek Code Lab · github.com/geekwebsolution/wp-emergency-file-replacer
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/geekwebsolution/wp-emergency-file-replacer/archive/refs/heads/main.zipWordPress plugin that generates a standalone emergency file replacer script so you can recover from fatal errors by replacing files without loading WordPress.
Why?
Sometimes a small change (like editing functions.php in the theme editor) can completely crash your site with a fatal PHP error. When that happens you often:
- Can't load the frontend
- Can't log into
/wp-admin - Only have HTTP access, not FTP/SFTP
This plugin lets you prepare for that situation before it happens.
It creates a script in your WordPress root (by default emergency-file-replacer.php) that:
- Does not load WordPress – so it keeps working even if WP, your theme or a plugin is broken
- Is protected by a password you choose in wp-admin
- Lets you browse your WordPress install from the root down
- Lets you replace any existing file with an uploaded file
- Automatically creates a timestamped backup before overwriting
⚠️ Security warning
Anyone who knows the emergency URL and the password can overwrite files in your WordPress installation.
Use a strong password, only enable this temporarily, and delete the generated script when you're done.
Features
- Simple settings page under Tools → Emergency File Replacer
- Configurable emergency password stored in WordPress options
- One-click generation of
/emergency-file-replacer.phpin the WP root - Optional deletion of the emergency script from the settings page
- Standalone script:
- Password-protected login (no WP dependencies)
- Directory browser (root,
wp-content, themes, plugins, etc.) - File replacement with backup
Installation
- Download the latest release zip (
wp-emergency-file-replacer.zip). - In your WordPress admin, go to Plugins → Add New → Upload Plugin.
- Upload the zip and activate WP Emergency File Replacer.
Or manually:
wp-content/
└── plugins/
└── wp-emergency-file-replacer/
├── wp-emergency-file-replacer.php
├── readme.txt
└── README.md