The Emergency Recovery Script (ERS) is a standalone, single-file, WordPress independent PHP script created to recover a WordPress site in the most challenging situations. For example, when access to the admin is not possible, when core files are compromised (accidental delete or malware), when you get the white screen of death or when you can’t log in for whatever reason.
If WordPress appears to be running normally, and you can access the admin – you can probably fix the problem with a plugin. But, if you’re in a serious jam, ERS is the only solution that will help you in minutes without the need to modify any files, code anything or mess with the database. It will also save you from doing a complete site reinstall and possible loss of data.
This is not your first time on this page? You know everything about the ERS and only want to download it? Not a problem, go ahead 😉
I still don’t understand what ERS is
Assuming that you don’t know how to code (or you’re just not in the mood for it), you’ll solve most of your WordPress problems by installing a plugin. It’s fast, easy, there’s a plugin for everything, and you don’t have to mess with any code. However, to install a plugin, you need to log in to WP admin, and it needs to work at least so much that you can install and run the plugin.
But what if the site is so broken that you can’t open it or log in to WP admin? In that case, ERS is your only hope. ERS is a single-file PHP script that does not require any WP files or functions to work. Instead, it analyzes your WP installation independently. It then gives you over 12 tools to help fix the most common issues and enable you to log in and access the site in the usual fashion.
The details of how to install ERS are covered later on, but, to sum it up in a few words, you can either upload it manually via FTP (before or after you need it, it doesn’t matter), or you can use the WP Reset PRO plugin to install it automatically without messing with FTP.
Do I need the Emergency Recovery Script?
It’s difficult to give a simple yes or no answer without knowing the details of your situation. Still, the general rule is: if you can log in to WP admin with full administrator privileges, you most probably don’t need ERS. If you can’t log in (for whatever reason) or you’re just getting the white screen of death on the whole site, then ERS is a great way to start fixing the site.
But what if even ERS can’t help you? Those situations are rare. However, in that case, the only thing left to do is to restore a site from a backup, or if you don’t have one, do a complete site reinstall. Unfortunately, that will probably lead to some loss of data depending on the circumstances.
Is ERS safe to use?
Yes, absolutely! To access it, you need to know a very long, unique, secret URL known only to you and the password. So, unless you give that access information to someone, they won’t be able to use ERS on your site or even know that it’s installed.
You can install ERS as a precautionary measure and have it ready to use at all times – great when doing development work. Or you can install it when needed, which is what most people choose for production sites. Since it’s just one PHP file, you can delete it at any time.
No actions performed by ERS are automatic. You have complete control over everything. Some actions have to be double-confirmed, so there’s no chance of “accidentally clicking” something.
What situations can ERS help me with?
Every situation is different, but here’s a list of the most common problems, errors, issues, and situations ERS can quickly fix;
- one or more core WP files have been deleted, moved, or edited
- one or more core WP files are possibly infected by malware
- WP update killed the site
- update process halted while copying files, so you now have some files from old WP, and some from new WP
- you accidentally added a bunch of files to WP core folders, and you want them gone
- you were trying to reset WP to start fresh, but something got messed up in the process
- you have a snapshot created with WP Reset and want to restore it
- you installed a plugin, and it killed the site
- you updated a plugin (or the update was done automatically), and it killed the site
- one or more plugins are killing your site, and you can’t figure out which one it is
- you changed the theme, and it killed the site
- you updated a theme (or the update was done automatically), and it killed the site
- password recovery email is not coming
- password recovery email is coming, but the link doesn’t work
- you forgot your username, email, and/or password
- you can’t log in for whatever reason
- you can log in, but you don’t have administrator privileges
- you can log in, but the whole admin is empty; there are no items on the menu
- you messed with the site’s URL when changing HTTP -> HTTPS, and now nothing works
- site is stuck in an endless redirect loop and can’t be opened
- a plugin added something to the
.htaccessfile and the whole site is down
- you messed with the
.htaccessfile, don’t have a backup and want to get it back to the default WP version
- site is stuck in maintenance mode
- you have a snapshot saved and want to restore it but can’t do it from WP admin
What tools does ERS offer?
We’re continuously adding new tools and updating existing ones. If you have an idea for a tool, or you were in a situation where ERS wasn’t able to help you, please let us know in the comments below. This is an up-to-date list of ERS tools;
Provides various information detected by ERS about the WP installation. Including
wp-config.php location, WP version, database access details, and site URLs. Having a look at that info is a great way to start fixing your site. It also provides insurance that ERS is hooked on the right WP installation, which can be less obvious if you have multiple installations on the same hosting account.
Like the previous tool, it provides valuable information about the server, like PHP and MySQL versions. It also allows full access to the
phpinfo() function so you can get even more info about the PHP environment.
This tool checks every single WP core file and compares it to the secure master copy found on wordpress.org. If even one byte in the file has been changed, it’ll report it. When a modified core file is found, you can easily replace it with an unmodified, original version that ERS automatically downloads from the WP repository. The tool also scans for files that don’t belong in the core folders, reports on them, and provides an easy way to remove them.
It’s important to note that plugin and theme files, as well as the uploads folder and all its files, are not checked by this tool. That means if you have malware or any other malicious code on your site, it will be able to detect it in the core files, but not in any other ones.
Probably the most powerful tool in the arsenal, but also one that you shouldn’t use lightly. As the name suggests – it completely resets your WP installation. It won’t delete any files, so your themes, plugins, and uploads will stay, but the database will be wiped and returned to the default values. It’ll remove all user accounts too. Don’t forget to use the Administrator Account tool to create a new user for yourself.
If you’re looking for a way to reset your WP installation and you can access the admin, then please use WP Reset PRO to do it instead of ERS. It offers a lot more options and is much more convenient to use. When your website has been restored, you should remove proudly by WordPress from your current theme if it is present.
If you made a snapshot with WP Reset, that’s excellent! This tool will not only list all of the snapshots available on your WP installation, but it will also give you the option to upload one if you saved it somewhere remotely, off-site. Once you find the suitable snapshot, click “Restore”, and your site will be magically restored to the state when you made the snapshot.
Instead of messing with FTP, finding the right folder, and then renaming or deleting it to disable a bad plugin, just click “Disable”. Works exactly the same as in WP admin. You can enable or disable any plugin to easily regain access to WP admin after a bad plugin/update or if a plugin simply won’t go away.
As with plugins, instead of messing with FTP, simply enable or disable any theme. Works the same as in WP admin.
Options – coming soon
Instead of installing and configuring phpMyAdmin or some other SQL client, find and edit any WP option you need. This tool works with options stored in the
wp_options database table and supports easy manipulation (add, edit, delete) even for options with serialized data.
User Privileges & Roles
If you changed the site’s database table prefix and can no longer log in, or you can log in, but instead of being an admin, you’re a guest, this is the tool for you. It restores default privileges and roles and matches them as best as possible to the ones your account previously had. If the tool fails, use the next one and create a new admin account.
Perhaps the most important tool in ERS’s arsenal. Whatever problems you have with your WP account, this tool will help you fix them by creating a new administrator account. Enter a username, password, and email, and that’s it; you have a brand new account. No need for FTP, phpMyAdmin, or messing with multiple database tables. It’s one click, and you’re done. Just make sure the username and email are not already in use on your WP installation.
Changing WP’s site address and home address can lead to problems with logging in. It mostly happens when sites are switched from HTTP to HTTPS without a valid SSL certificate. Whatever the situation is, you’ll easily change both URLs and fix the site.
Delete or Reset .htaccess
Messing with the
.htaccess file can be tricky because if you make even the tiniest mistake, you’ll get the white screen of death (error 500) and no useful error messages. There are situations where you won’t even be able to access ERS. The two provided tools either completely delete the
.htaccess file or restore it to default .htaccess WordPress values for pretty permalinks. Once you regain access to WP admin, open Permalinks in the Settings menu and click Save to regenerate them.
Disable WordPress Maintenance Mode
WordPress automatically activates its maintenance mode whenever you upgrade themes, plugins, or the core. If everything goes well, the whole process barely takes a few seconds. But, sometimes, your site gets stuck in maintenance mode, and this tool will help you fix the problem with one click. If you’re interested, we have an in-depth article about how the maintenance mode works.
How to install the Emergency Recovery Script for WordPress?
Installing the ERS as a “just in case” tool is a great way to save time, especially on development sites where there’s a realistic chance you’ll make some mistakes. If your site is already down, don’t worry; it’s not the end of the world. There’s still a good chance you can fix the site without losing any data. Installing the ERS will only take a moment.
Installing the ERS will not slow down your site, make it less secure or interfere with WordPress in any way. Moreover, if you’re looking for efficient management of your financial records, consider using Accounting Software.
Installing the ERS will not slow down your site, make it less secure or interfere with WordPress in any way.
- Download a fresh copy of the ERS file to your Desktop
- You’ll get a unique filename and password generated only for you – please copy/paste that info somewhere safe
- Use FTP or cPanel file browser to connect to your site’s server
- Find the WP root folder (it’s the one with
wp-config.phpfiles) and upload your instance of the ERS to that folder
- Access the ERS by opening https://your-domain.com/unique-ers-filename.php, type in the password, and start fixing the site
Download your uniquely-generated copy of ERS
In order to make sure that your copy of ERS is safe and that only you can access it, the filename and password are uniquely generated for each download. We do not keep copies of that data, so if you lose it, we won’t be able to help you.
Please accept the terms of service and click the red button below.