Hello guys, i have never made a website using WordPress but, a friend of mine use’s it and was looking for someone to help him as a developer i said yes why not, he has a WordPress site hosted using Hostinger plus he want to make upon user registration they would get a sub domain with their username for example if a user registered with a username x they will have a subdomain like x.maydomain.com where if some one request that subdomain they will get x user data dynamically rendered from the database, i have done some researches but only got a dead end.
For example my
First approach was:
To make a script that get trigger upon user registration and send some request to the Hostinger API to create a subdomain for the user but, i faced a dead end which is Hostinger doesn’t provide an API to work with.
Secodn approach was:
To use a Wildcard subdomain where all subdomains point to a page in my website with it i get the given username from the subdomain and check if it exist or not and show the response to the user with the given username data but, this has it’s drawbacks for example more users in the databse more witing time to get a response.
So the question is it possible to make what i want if yes please walk me and thank you much love <3
[ad_2]
https://www.hostinger.com/tutorials/activate-wordpress-multisite
Oof this is challenging, and Hostgator is probably not the place to do it. You’d be better off on AWS. Also why does it need to be a subdomain and not a directory? My first thoughts are that you’d be better off building something like this in react to be honest