Site kit Google Analytics setup giving Error: {“error”:”invalid ‘redirect_uri'”}

One of the more common mistakes people make when moving WordPress from http to https is not letting WordPress know about the change.

The most important parameter used by WordPress, when creating URLs or Links around your site is, “WordPress Address (URL)” and “Site Address (URL)

Both of these can be found within your Dashboard under “Settings | General“. Changing the http:// component of the URL to https:// will likely solve your problem.

WordPress uses these parameters to build, on the fly, appropriate links and URLs for your site. For example, it might record a path in your database as /images/companylogo.jpg but will add https://example.com at the beginning to form a valid address.

Other potential issues

If you have done that and get “Mixed Content” errors from your Web Browser then the likely cause is a dodgy plugin. Plugins recording full URLs including the http:// rather than getting the site URL from WordPress will give “Mixed Content” errors.

In cases like this it is sometimes necessary to export your database as a text file and search for references to http and change them to https. Of course you need to be careful because not all references to http are incorrect. Once you are happy, delete your original database tables and import from your newly saved text file.