Forum Moderators: coopster
I have a local site, its programmed in PHP and MySQL, someone wants to start a site similiar to it. So I'm creating another website, similiar structure with same back-end functions, that just has a different url, and a different layout "theme."
I want all sites to use the same database, and same code, if you have any ideas on how to create mutiple sites, using the same code, but have different themes, and different urls?
Right now, I have to copy and paste all of the PHP files to each domain name, and on each domain name there is a separate file that holds all the variables that each domain name will use, IE: $city_name="New York";, and theses are the variables used in the code.
It seems like there is a better way, any suggestions or feedback on this would be greatly appreciated!
Thanks for your time,
Wesley
if your site doesn't follow this structure then trying to rewrite the application and control all colour scheme from your CSS file and divide pages composition in different files like right navigation, left navigation, header, footer etc etc so that you need to change the things only in one file and changes will be implemented throughout the website.
for the backend I would suggest you to use OOP, and make classes and config files where you can change GLOBAL info e.g site name, site URL, database connection info, so that for every new domain you just need to change these global things in a single file.
by the way if you are duplicating the very same contents for different domain on the same server then do not try to interlink your websites.. I dont know the reason myself, I read it somewhere that it will hurt your site ranks.. however any SEO expert can tell us if it is true or not