Changing Your Admin Email and Editing the Database with Adminer
If you’re using WordPress, you may have noticed in the past few weeks that a plugin called ARI Adminer has shown up on your dashboard. This plugin has been installed by Mennonite.net on all WordPress sites to give users access to their database directly. If you’re a developer or simply need access to your site’s database for any reason, you can access it easily through this plugin. In order to take a closer look at how it works (or how the WordPress database works in general), we’ll walk through a common process that users may need to go through: updating the site’s admin email through the database.
By default, the admin email for your WordPress site is firstname.lastname@example.org. You can view your current admin email by going to Settings > General on the dashboard. This is the email that will receive alerts and information about the site when things happen, so you may want to have this address be your’s. Ordinarily, when changing the admin email, the initial address will receive an email verifying that they are okay with the change, and they must accept it in order for the change to go through. This means that you would have to contact us when you want to change the admin email, and we would have to accept the change. Editing the database, however, means that you can change this email by yourself without waiting.
The first thing you’ll want to do is actually click on the ARI Adminer button on the dashboard. Make sure “WordPress database” is set in the Connection drop-down, and choose if you want to run it in the current window or in a new window. Once you do this, you’ll be faced with a list of tables in your database on the left, and, initially, the same list in the main window. The admin email is stored in the _options table, so find the table that ends with _options and select it (every site has a unique prefix, usually consisting of two letters, at the beginning of each table to identify them).
Now, you’ll see a more detailed view of the _options table. To view the data that’s in the table itself, click “Select data” at the top. This will show you each item in the table, and allow you to edit each one. Find the admin_email item, and select the edit button to the left of it. Change the option_value box to whatever email you want to change it to, and hit save. That’s it! You’ve edited the admin_email value directly in the database. Most likely, you won’t need to do any database editing unless you’re a developer or already know what you’re doing. However, this guide provides a quick overview of the Adminer plugin and an example for why you might need to edit the database.