Forcing https with wordpress on dreamhost

In order to be able to force the http to https redirection when using wordpress in dreamhost use the following (taken from https://help.dreamhost.com/hc/en-us/articles/215747758-Force-your-site-to-load-securely-with-an-htaccess-file) :

RewriteEngine On
RewriteCond %%{HTTPS} !=on
RewriteRule ^(.*)$ https://%%{HTTP_HOST}%%{REQUEST_URI} [L,R=301,NE]
Header always set Content-Security-Policy "upgrade-insecure-requests;"

# BEGIN WordPress
.....
# END WordPress

Google Analytics UID

Problem
You want to find out your UID for a specific domain that you have set up with google analytics.

Solution
When you first create the tracking code for your website, it’s quite obvious how to get the UID for that specific website.
If you decide later on to change your site, from drupal to wordrpess for example, it’s not quite clear where to get this UID, to use it with the new tracking plugin in the new site (which still uses the same domain name).
After some searching it turns out that to be able to find it you have to do the following:

  1. Log in to your Google Analytics Account
  2. Click on the ‘Edit’ link under Settings for the domain you want to find the UID
  3. In the new page click on the link ‘Check Status’ after Receiving Data at the top
  4. Your UID should be in the text box with something like _uacct = “UA-xxxxxxx-x”;