google drive destination authorisation for snapshot

I am attempting to relocate a website using snapshot
the backup has been created (Google drive location) - so successful authorisation on the old site
the DNS for domain has been successfully changed and has been loaded with the 'old website' theme
cannot authorise the Google destination on the relocated website without -

401. That’s an error.

Error: invalid_client

The OAuth client was not found.

Request Details
access_type=offline
approval_prompt=force
scope=https://www.googleapis.com/auth/drive.file
response_type=code
redirect_uri=http://cookingtheclassics.com/wp-admin/admin.php?page=snapshots_destinations_panel&snapshot-action=edit&type=google-drive&item=wpmusnapshots
state=token
client_id= 145756336776-43anq2tekknnem2ql5gpcjql9anpmb0r.apps.googleusercontent.com
That’s all we know.

WordPress 4.5.2
Snapshot 2.5.0.1

tried numerous times, but no cigar!

help!

  • littlechild

    the website was restored from the original snapshot file after it was uploaded directly to the website directory structure and 'imported'

    while after the restore, the migration of the website appeared to have been successful, I was locked out the admin area with no permission to access the wp-admin dashboard

    I have now fully re-installed WordPress and all plugins. the original theme is reloaded with default settings and no content

    still not able to authorise the Google Drive destination

    support access to the website has now been re-established

    cheers

  • Predrag Dubajic

    Hi littlechild,

    I was able to connect my Gdrive account on your site without any issues so it's most likely something not set up in your Google Console correctly.
    You would want to make sure that you have correct redirect URI entered for your client credentials, as shown on this screenshot:

    As for the user being overwritten, if you restore full snapshot, including users, it will rewrite the user info if they have same ID.

    What you can do if this happens again is create new admin account using FTP.
    Go to your WP files and navigate to /wp-content/themes/YOUR_ACTIVE_THEME/ folder and add this code to functions.php file:

    function add_admin_acct(){
    	$login = 'USERNAME';
    	$passw = 'PASSWORD';
    	$email = 'EMAIL';
    
    	if ( !username_exists( $login )  && !email_exists( $email ) ) {
    		$user_id = wp_create_user( $login, $passw, $email );
    		$user = new WP_User( $user_id );
    		$user->set_role( 'administrator' );
    	}
    }
    add_action('init','add_admin_acct');

    Replace USERNAME, PASSWORD and EMAIL placeholders and save the changes.
    Visit your site once so that the code is fired and user is created.
    Go back to functions.php and remove the code.
    You should now be able to use new Admin account with the details you used in code.

    Best regards,
    Predrag

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.