While setting up different SharePoint 2016 farms I’ve been running several times in the same problem. The creation of a users MySite was stucking on «We’re almost ready». The reason for this is a feature that hasn’t been provisioned. This following solution works for me and is quite easy.

Create a backup copy before editing this file:
C:\Program Files\Common Files\microsoft shared\Web Server Extensions\16\TEMPLATE\SiteTemplates\SPSPERS\XML\onet.xml

Search in the onet.xml for the following lines:

<Configuration ID="10" Name="FullPersonalSiteS0WithMUIAndDocumentWebParserDisabled" CustomMasterUrl="_catalogs/masterpage/mysite15.master" MasterUrl="_catalogs/masterpage/mysite15.master">
<SiteFeatures>
<Feature ID="0EE1129F-A2F3-41A9-9E9C-C7EE619A8C33" /> <!– Storage deployment scenario feature –>
<Feature ID="FA8379C9-791A-4FB0-812E-D0CFCAC809C8" /> <!– Social data store feature –>
</SiteFeatures>

and replace the code with this (adds a line):

<Configuration ID="10" Name="FullPersonalSiteS0WithMUIAndDocumentWebParserDisabled" CustomMasterUrl="_catalogs/masterpage/mysite15.master" MasterUrl="_catalogs/masterpage/mysite15.master">
<SiteFeatures>
<Feature ID="0EE1129F-A2F3-41A9-9E9C-C7EE619A8C33" /> <!– Storage deployment scenario feature –>
<Feature ID="FA8379C9-791A-4FB0-812E-D0CFCAC809C8" /> <!– Social data store feature –>
<Feature ID="b2741073-a92b-4836-b1d8-d5e9d73679bb" />
</SiteFeatures>

This has to be done on all SharePoint servers.

Then run this PowerShell cmdlet once. Replace <MySiteContentDB> with the name of your MySite Content Database. This will update your Site Master.

$ContentDB = <MySiteContentDB>
$master = Get-SPSiteMaster -ContentDatabase $ContentDB
Remove-SPSiteMaster -SiteId $master.Id -ContentDatabase $ContentDB
New-SPSiteMaster -Template "SPSPERS#10" -ContentDatabase $ContentDB</code>

Now go the the Central Administration and delete the Site Collections (Personal MySite of the users) which are hanging on «We’re almost ready». In addition navigate in the User Profile Service Application to People > Manage User Profiles. Search for the user and click on «Edit My Profile». Empty the «Personal Site» field. Open the users MySite to start the provisioning process again. Just refresh the site if you get a 404 error on the first attempt.