Multiple Websites - Same Template

Scenario: 100 customers need a website. I want to create 10 templates. Each customer will choose a template. Data will be served using PHP/MySql.

Things to consider:

Each customer needs their own domain name
No CMS such as WordPress
Not sure how one template can be used on multiple domain names

I need help brainstorming a solution as well as issues that may arise. I want to maintain 10 templates and have the appropriate template applied to each customer. I have the coding skills, I just need help with the logic.

I'm basically building one CMS that will be used by 100 different customers, each customer having their choice of 10 layouts.
LVL 16
Who is Participating?
Ray PaseurConnect With a Mentor Commented:
Each domain name will have access to a data base, right?  You might store the template pointers in the data base, associating them with the URL, which you can find in $_SERVER['HTTP_HOST'].  If you store the templates in the file system in the form of HEREDOC blocks, your PHP script will prepare the variables that go into the HEREDOC, then require() the template file.  The last line of the template file can be echo, and, voila, your page is built and sent by the require() statement.
Jason C. LevineConnect With a Mentor No oneCommented:
rbudjAuthor Commented:
Thank you for the reply. I will be looking into your solution this week and will report back. I do use cPanel for hosting. I hope this will not pose an issue.
rbudjAuthor Commented:
I have not yet had a chance to test your solution, however do to the experts levels and clever comment, I can assume it will work when I'm ready. Thank you for the replies.
Ray PaseurCommented:
Thanks for the points and good luck with your project, ~Ray
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.