Problems, need help? Have a tip or advice? Post it here.
5 posts Page 1 of 1
Hi!

I've just about finished a site, using CouchCMS and MAMP to develop it locally. it has been a great experience.

Can anyone help me with some ideas on how to add more sites while still beeing able to access the current one (Note: i'm using the free version of MAMP), since i'm going to maintain these locally and make changes to them in the future

Thank you!
I use MAMP too :) Pairs nicely with Couch.

Go to MAMP > Preferences > Web Server and make sure the Document Root is what you want it to be. Then simply store your Couch projects in separate folders there.

After that you can access the sites in your file explorer. If your Document Root is Documents/Web/Sites/
- Documents/Web/Sites/my-site
- Documents/Web/Sites/my-other-site

Or view the sites in a browser
- localhost:8888/my-site
- localhost:8888/my-other-site

You can also create sub-directories within your Document Root to organize further
- localhost:8888/Clients/my-client-site
- localhost:8888/Personal/my-personal-project
Never knew that i could change the Document Root!! Awesome!

Thank you for your help!
Adding to @mwlarkin1's tips -
Here is one thing I find myself doing regularly on my, quite similar, local setup while adding a new site -

To avoid having to create a separate database for the new site (and then entering the full info into its config file),
I simply copy the config file from a site co-existing on the same setup and then just change the following setting
Code: Select all
    // 7b.
    // Needed only if multiple instances of this CMS are to be installed in the same database
    // (please use only alphanumeric characters or underscore (NO hyphen))
    define( 'K_DB_TABLES_PREFIX', '' )

For example, make it as follows -
Code: Select all
    define( 'K_DB_TABLES_PREFIX', 'acme_' )

With this setting, Couch uses the same database but creates a fresh set of tables using the prefix (which makes them different from the existing tables of other sites).

Hope this helps.
Good tip! I will definately use this. Thank you!
5 posts Page 1 of 1
cron