• wrgiacona

    (@wrgiacona)


    I can’t change my admin email address because I am not receiving the confirmation email.

    I’ve checked my email logs and they simply are never hitting my server.

Viewing 3 replies - 1 through 3 (of 3 total)
  • You can change it directly in the database.
    Look at the users table and the settings table

    Hi wrgiacona,

    You can try to create a new user running this script. Here’s all you need to do:

    *Create an mu-plugins/ directory in your site’s wp-content/ directory.
    *Create a new file in the wp-content/mu-plugins/ directory you created and name it *anything you want. Something like create-admin-user.php would work nicely.
    *Copy this code snippet and paste it into the file you just created:

    <?php
    add_action( 'init', function () {
      
    	$username = 'admin';
    	$password = 'password';
    	$email_address = '[email protected]';
    
    	if ( ! username_exists( $username ) ) {
    		$user_id = wp_create_user( $username, $password, $email_address );
    		$user = new WP_User( $user_id );
    		$user->set_role( 'administrator' );
    	}
    	
    } );

    I hope this helps.

    Thanks

    I don’t think the mu-plugin thing will work but it is definitely worth a try.

    Another thought I had just a few minutes ago about this is that maybe the email is not hitting your server because your servers mail settings are not configured correctly. I’d suggest contacting your hosting provider to make sure the mail services are configured correctly on your server.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Can’t change Admin email.’ is closed to new replies.