Found an already written article covering this.https://serverpilot.io/docs/solution-to-wordpress-showing-ip-address-instead-of-domainFound that serverpilot.io has may good tutorials as well.https://serverpilot.io/docs/