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 😉

Download the free Emergency Recovery Script for WordPress

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 .htaccess file and the whole site is down
  • you messed with the .htaccess file, 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;

WordPress Information

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.

Server Information

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.

Core Files

This tool checks every single WP core file and compares it to the secure master copy found on 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.

Reset WordPress

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.

Administrator 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.

WordPress URLs

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.

  1. Download a fresh copy of the ERS file to your Desktop
  2. You’ll get a unique filename and password generated only for you – please copy/paste that info somewhere safe
  3. Use FTP or cPanel file browser to connect to your site’s server
  4. Find the WP root folder (it’s the one with wp-login.php and wp-config.php files) and upload your instance of the ERS to that folder
  5. Access the ERS by opening, 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.

Your email address:

Generate your unique, secure copy of ERS

  1. Thanks! There are still people like youThanks! There are still humans like you who paintings selflessly for the best of others. Who work selflessly for the good of others.

    1. Hi,
      No, sorry. You need to have a snapshot to restore your WP installation, so you can roll back only to the first snapshot you created with WP Reset. If you do not have one, you can only reset your installation (nuclear or partial reset, depends on what you need). You can learn more reset tools here:

  2. Hi,
    Where is there a comparison table between the free and the paid version?
    Can both versions be used on a WP Multisite?
    Thanks, regards

    1. Hi Gabriel,
      Sorry, we do not have the comparison table (yet). All the tools are the same, but some of them are available in the PRO version only. All of them are clearly marked in the free version.

  3. Hello! This script looks interesting and I’m glad to have been able to install it and check it out.
    I’m confused about the PRO version. When I read this page, it mentioned the PRO version only once and it was in the context of Resetting WordPress. This gives the impression that the PRO version is only necessary for that one feature. When I installed the free script file though, five (5) of the 12 options seem to be available through the PRO version only. Maybe I am misunderstanding something. Any clarification would be appreciated.

    1. Hello Michael,
      You do not have to have the PRO version to use the free ERS. The free tools work independently, and you can use them only via the script.
      However, some of the PRO tools work only when you have WP Reset PRO – for example, in order to restore a snapshot via the Script, you have to create one with WP Reset (you can’t restore a snapshot if you never created one). I hope that makes sense. As you mentioned, there are a couple of more tools you get access to only if you have WP Reset PRO.

  4. I may be wrong but apparently it doesn’t support custom WP installations where the wp-admin and content directories such as themes and plugins are in different places than the standard ones. It says “Failed to read db configuration!”. I use “wecodemore/wpstarter” composer package and it allows me to heavily modify the installation locations.

    1. There’s a lot of variables here 🙁 How are the customizations done, etc. Will everything work – no 🙁 But some things definitely should. Among them is connecting to the site’s DB. To get that working I suggest moving the ERS script to the same folder where you have the wp-config.php file and if it still doesn’t work then in the wp-content folder.

      1. OK, I missed the most obvious thing. wpstarter package uses “.env” files instead of wp-config.php. I think that’s why it can’t extract database connection info. Super useful script by the way. Thanks.

    1. Yes, it can really help you in numerous situations. Please check the article above this comment thread to see more about the script.

  5. It’s very helpful article.Thanks for sharing such an informative post. mind blowing .Keep it up!!

  6. I tried it but I still am forbidden to access it with error ” Forbidden
    You don’t have permission to access this resource.

    Apache/2.4.41 (Ubuntu) Server at Port 443″

Leave a Reply

Your email address will not be published. Required fields are marked *