How Do You Organize Files and Databases for Multiple Domains on Shared Hosting?

Emily Routledge

Active member
Registered
Joined
Aug 13, 2016
Messages
80
Points
8
I’m hosting several unrelated websites on a single shared hosting account and want to avoid mix-ups between files and databases. What folder structure, naming conventions, or organizational practices have you used to keep each domain’s code and database clearly separated and easy to manage?


Any tips or examples would be greatly appreciated!
 

Philippe Gaucher

Well-known member
Collaborate
Registered
Joined
Jul 27, 2016
Messages
190
Points
18
Yeah, I’ve dealt with this too, when you’ve got multiple websites sharing one hosting account, things can get messy fast if you don’t stay organized. What’s worked well for me is setting up one main folder for each domain (like domain1.com, domain2.com, etc.) right inside public_html or whatever your main directory is. Inside each of those, I keep the usual wp-content, index.php, and all the files for just that site. For databases, I always name them clearly like db_domain1, db_domain2 and do the same with database users. It really helps when you need to troubleshoot or migrate later. Also, I keep a small text file or spreadsheet noting which domain uses which database, just in case. Keeps things clean and saves a lot of headaches down the line.
 
Recommended Threads
Replies
2
Views
2,667
Replies
7
Views
4,060
Replies
1
Views
2,272
Replies
2
Views
2,360

Sponsors

Tag Cloud

You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an alternative browser.

Top