While your SQL query will probably do the trick, you don’t need to interface directly with the database to accomplish this.
The preferred methods would by using WordPress’ update_option()
function or by running the WP-CLI command:wp option update
.
Via update_option()
To override the admin email change confirmation process, add the following to your functions.php
file and hit “save changes”.
update_option( 'admin_email', '[email protected]' );
Then once you’ve verified that the change worked, you can go back to your functions.php
and remove the snippet.
Via WP-CLI
If you have WP-CLI installed, you can run the following command from your shell/terminal (much faster):
wp option update admin_email [email protected]
If WP-CLI is owned by root, you’ll obviously need to run it with sudo
. Success will give you the following output:
Success: Updated 'admin_email' option.
Related Posts:
- Where is custom template file chosen for a post stored in the DB?
- Two websites one database, administrator not working on second website
- Adding prefix to WordPress database tables breaks admin capabilities?
- WordPress has been updated! Before we send you on your way, we have to update your database to the newest version
- Checking if Database Table exists
- Staging sites, how do you manage synchronising updates in the DB?
- How to get the post publish date outside the loop?
- How To Export/Import WordPress (MySQL) Database Properly Via Command-Line?
- Using transients in conjunction with memcached
- How to define composite keys with dbDelta()
- Has parent field in the table wp_term_taxonomy has term_id or term_taxonomy_id
- Forcing nickname as display_name in custom edit profile template
- Syncing local content with development / staging sites
- Export WP database for import using WP-CLI on Vagrant Box
- Improve or optimize a very slow query
- What is the advantage of separating wp_users and wp_usermeta table?
- Showing content from another wordpress installation database in the page template loop?
- Multiple WP install with same users database
- Dynamic data in `wp_register_script` needed
- “MySQL server has gone away” since update to 3.8
- WordPress page title repeated in SOME pages
- Why is $wpdb->get_results failing on certain tables but not others (which have data)?
- How to correctly add a table to the WordPress MySQL database
- MySQL Syntax Error upon restoring database from backup [closed]
- Help running a MySQL query to update all wp_#_options tables in a Multisite install
- How to verify password outside WordPress?
- Is it safe to convert tables from MyISAM to InnoDB?
- Use one WordPress database with multiple instances of one site
- Who is responsible for data sanitization in WordPress development?
- How do I properly update the WordPress database password?
- wpdb_prepare with multiple or condition
- How to check if a core update, like 4.9.8 → 5.0, involves a database update (migration)?
- $wpdb->insert is not working
- WordPress Install and Database on separate hosting?
- Moving a site from a temporary domain to the live domain [duplicate]
- Error establishing a database connection on Installation
- What is this in my tables
- WordPress and MySQL: how to transfer Meta_key and Meta_Value from one post_id to another
- Output custom content not from the posts table?
- wp search-replace (not executing)
- Reducing Database Query Time
- How can I get my wordpress password from an SQL file?
- Create table from array with prepare
- Migrate database between 2 different wordpress version
- Is there an atomic way to update_option in WordPress (to ensure data integrity)?
- SSO system between 2 WordPress installs on different servers
- Form that sends data to an admin panel and can export it
- All text disappeared (seems to be a database problem) [closed]
- Convert user passwords to MD5?
- is wordpress stores Role Id in WP database?
- Why do database examples sometimes finish with an add_option call?
- Does post_meta data need to be unserialzed?
- How to backup my site and restore my wordpress site
- How and where is wordpress adding mySQL content to database?
- restore a db after bad backup
- How get Data form wordpress database as array not stdclass?
- cannot connect database
- How to delete a particular row in a database table
- Brandoo WordPress Unable to Update to WordPress 4.2.2
- Connecting to wordpress database in my application [closed]
- Custom Post Type not showing anything added by code anymore?
- Is it good practice to import/export a blog to test a redesign?
- Getting “Error Establishing a Database Connection” on localhost in new Mac OSX Lion environment
- change the year on all of my custom post types?
- How do I have a user upload a blog post and then retrieve that to display in a card on the site?
- Delete user with only subscriber role
- WordPress keeps redirecting to localhost
- get value from ‘terms’ table
- custom tables in wordpress Database? (can i just create them with sql?)
- New installation fatal error in 5.9.3 at edit or create entry
- Storing transients giving database error
- How to rename custom table name programatically in wordpress?
- Displaying requested data from a the database in wordpress
- Accidently changed the GUID
- How to edit custom table data in frontend
- pre_get_posts causings DB error when using ( ‘posts_per_page’, -1)?
- generate PDF from member information
- Is it safe to add INDEX to a column in WordPress database?
- Help posting values to DB on submit using $wpdb->query
- Restore Old Database Over Newer WP & Plugin Files
- wpdb query to insert images in to post/page gallery
- Creating a database in my plugin not working
- How to create index (sql) to a meta_key?
- Not sure what to do next to optimize
- Database structure for thousands of posts
- get_user_meta and umeta_id
- $wpdb not working
- Accessing content from third party as native posts in WordPress
- Extracted CSV as Array for Custom Query Loop
- Hang Up Followed By Can’t select database
- One WP Database outside localhost and two connections
- Send data to database after redirect (and popping out of iframe)
- Fetch data from another site, but the same database
- Simple email input store in database
- Every time I update or install a plugin I get “Error Establishing a Database Connection in WordPress”
- $wpdb->insert not working for last select option
- How to create a table [closed]
- Upload wordpress from localhost to 000webhost
- Cant Connect to Database
- WordPress database connection failed, while mysql client is working [closed]