Jump to content
TNG Community

Using MAMP to run TNG locally


Philip Roy

Recommended Posts

As promised in another thread, I have started some "How To's" on how to use MAMP on a Mac and run TNG. It looks like MAMP is now available for the PC...which makes the name slightly odd, but any way. I'm yet to try the Windows version.

So far I have done the following 3 how to's...

  • How to install MAMP on a Mac
  • How to install TNG on your Mac using MAMP
  • How to download a copy of your website to your Mac and run it locally using MAMP

I have one more I intend to do...Copying your local TNG website from your Mac to your web hosting provider

I have some fixing up to do on these, but I thought I would make them all available as a zip file you can download, unzip and then just open the first Index.html file...if you want to give feedback.

Any feedback welcome.

 

Link to comment
Share on other sites

Hi Philip

Very good - one note though - some/many Macintosh users might not be able to find the .zip file in their Downloads folder, only the MAMP folder if their Mac is set to automatically open safe files. If that's the case the .zip file is moved to the Trash automatically leaving only the folder behind in Downloads.

Roger

Link to comment
Share on other sites

I've updated the zip file with the following changes...

  • Alt tags added to all images
  • Added information on how to find older versions of MAMP on the MAMP website, but also added a warning about the versions of PHP and MySQL that are included in those versions
  • Added in note that the same process shown for website-to-Mac could be used for going from Mac-to-Mac if you wanted to
  • Added in suggested text about the fact that Mac users may have their files set to download to the Downloads folder and may also have their browser set to automatically open those files
  • Generally typos and grammar fix

Still to come at some point…moving a local Mac install up to a website

Link to comment
Share on other sites

  • 2 weeks later...

Great how-to guide, wish I'd had this a few years ago, it was painful figuring all of this out on my own.

Something I would suggest to add is guidance on how to install updates. Something that has really tripped me up in the past was using the Mac "Finder" to copy files. I kept accidentally overwriting files and folders. The following article gave me the explanation that I needed:

https://www.howtogeek.com/198043/how-to-merge-folders-on-mac-os-x-without-losing-all-your-files-seriously/

Now when I upgrade, I open a Terminal window and transfer files into an existing structure using a command similar to:

ditto -V ~/Downloads/templates ~/Genealogy/tng/templates

 

Link to comment
Share on other sites

Thanks. There’s easier ways to do that also…so I’ll think about the simplest approach and update the material. I’ve also written how to install MAMP on Windows as I was curious to see what it looked like. It’s a bit odd that it’s called MAMP and not WAMP, but that’s a different application.

Link to comment
Share on other sites

Well, I have to correct myself....I could have sworn that there were simple Mac apps to do compares between one folder and the next, but they all cost $...so thank @kradem2 for that Ditto command. I've now added two new sections...

  • How to install MAMP on a PC...I had to go there and have a nosy to see how it installed on Windows
  • How to update TNG running on your Mac...with an example showing the update process with the use of the Ditto command

I hope to get time to do the one I had planned on moving a local install to a web hosting company soon.

 

Link to comment
Share on other sites

Hi all,

I've completed the 6th and final part of the How To's...how to move a TNG site that you have running on your Mac (using MAMP) up to a web hosting company and run it as part of a website.

All and any feedback welcome....

@Ken Roy I have some time on my hands at the moment as I am between contracts. I'm happy to have a go at moving all my work onto the wiki...but I've not used a wiki before. I'm sure it's relatively straight forward...but...

  • I'm hesitant to try and figure out where it this material is all meant to go in the Wiki (a "Using MAMP" section maybe?)
  • I have no idea how to create pages

If you were wiling to do those 2 things..basically set up some empty pages using the titles in the main index page, I'll give the rest a go, if that sounds like a plan?

Cheers, Phil

Link to comment
Share on other sites

Philip,

You could start by updating the MAMP article in the Software  category and Home Computer  category after you have read the New TNG Wiki Users  articles

Edited to add - The articles on WampServer might also provide some idea on organizing the articles.

Edited by Ken Roy
add more information
Link to comment
Share on other sites

4 hours ago, Philip Roy said:

I've completed the 6th and final part of the How To's...how to move a TNG site that you have running on your Mac (using MAMP) up to a web hosting company and run it as part of a website.

Note that some Mac user will need to verify the accuracy of this last article.  Other configuration files might also need to be excluded from the move between environments such as mapconfig.php where you have a different Google Map key for your local computer than your hosting system.

Link to comment
Share on other sites

6 hours ago, Philip Roy said:

I've completed the 6th and final part of the How To's...how to move a TNG site that you have running on your Mac (using MAMP) up to a web hosting company and run it as part of a website.

 All and any feedback welcome....

 

Very impressive Philip

One comment about that last article - it's assuming the the move of a site from your Mac to the internet is a new thing so you create a new folder and a new database - but I suspect most people would be more interested in the situation once they have their local site running, on how to synchronise their local site to a remote site - i.e. copy up only the files that have changed, and copy up a new version of the database to replace what is online. (Or vice versa to bring an updated version of the site from online back to their local computer).

The former part of that can be done by FTP and the latter either with phpMyAdmin or the TNG Backup and Restore Utilities.

Roger

Link to comment
Share on other sites

11 hours ago, Ken Roy said:

Philip,

You could start by updating the MAMP article in the Software  category and Home Computer  category after you have read the New TNG Wiki Users  articles

Edited to add - The articles on WampServer might also provide some idea on organizing the articles.

OK...I'll jump in and see how I get on.

Link to comment
Share on other sites

10 hours ago, Ken Roy said:

Note that some Mac user will need to verify the accuracy of this last article.  Other configuration files might also need to be excluded from the move between environments such as mapconfig.php where you have a different Google Map key for your local computer than your hosting system.

Thanks Ken, I had forgotten about the Map config. I have Google Maps running both on my local TNG install and up on the web with one API.

What I think I will do is add a new page about bug fixing and living with two installs...and cover this.

I'll point to the localhost part of this...

https://tng.lythgoes.net/wiki/index.php/Google_Maps_-_Getting_Started

...but have also taken some screenshots on the Google console, because you can use the same API for web and localhost (you just add localhost as a second domain) so there's no changing of the map config file settings needed.

Link to comment
Share on other sites

8 hours ago, theKiwi said:

Very impressive Philip

One comment about that last article - it's assuming the the move of a site from your Mac to the internet is a new thing so you create a new folder and a new database - but I suspect most people would be more interested in the situation once they have their local site running, on how to synchronise their local site to a remote site - i.e. copy up only the files that have changed, and copy up a new version of the database to replace what is online. (Or vice versa to bring an updated version of the site from online back to their local computer).

The former part of that can be done by FTP and the latter either with phpMyAdmin or the TNG Backup and Restore Utilities.

Roger

Thanks for the feedback Roger. I was aware that there was more scope to push these tutorials out to cover things like synching between Mac and website on a regular basis...but decided they weren't specifically 'Mac' issues.

For me, I FTP files and then do a completely new GED import as all my info is actually stored in Reunion....but I don't want to start getting into Reunion stuff.

What I think I will do is add a new page about bug fixing and living with two installs...and cover the things you mention, but I don't intend to do a 'how to' on them.

Link to comment
Share on other sites

Hi all,

I've managed to get through moving everything to the wiki quite quickly (helped by a website that I found that converts HTML markup to wiki markup)...so I'm almost all done...

https://tng.lythgoes.net/wiki/index.php/MAMP

There's only one page (the new "Trouble-shooting web hosting, and how to keep a local and web hosted version of your site in sync") that I will try and write in the next couple of days and then I am all finished. Any changes you think should be made can be applied to the wiki pages themselves..so help yourself.

Ken..one thing I noticed after I had generated all the pages, is that all the WAMP pages begin with the word "WAMP". My titles aren't consistent like that...but there's no way that I am going to try and figure out how to both rename pages and correct links across the wiki...so they can stay 'as is' unless someone else wants a bit more consistency.

Link to comment
Share on other sites

Philip,

Thanks for posting your MAMP articles to the TNG Wiki.

7 hours ago, Philip Roy said:

Ken..one thing I noticed after I had generated all the pages, is that all the WAMP pages begin with the word "WAMP". My titles aren't consistent like that...but there's no way that I am going to try and figure out how to both rename pages and correct links across the wiki...so they can stay 'as is' unless someone else wants a bit more consistency.

I would recommend that you use a shorter page title for

https://tng.lythgoes.net/wiki/index.php/Copying_your_local_TNG_website_from_your_Mac_or_PC_to_your_web_hosting_provider_for_the_first_time

https://tng.lythgoes.net/wiki/index.php/Trouble-shooting_web_hosting,_and_how_to_keep_a_local_and_web_hosted_version_of_your_site_in_sync

It takes 2 lines on the laptop to display the page title.   you should be able to use the More pull down on the TNG Wiki and then the Move to rename pages.  If you do not have the Move option in the your TNG Wiki username, please let me know and I will update your TNG Wiki username

If you need help, let me know.

Link to comment
Share on other sites

Philip,

I don't know if you are aware of the Troubleshooting  category on the TNG Wiki.  Looking at your proposed article, I am thinking that

https://tng.lythgoes.net/wiki/index.php/Trouble-shooting_web_hosting,_and_how_to_keep_a_local_and_web_hosted_version_of_your_site_in_sync

should be 2 different articles.

  • How to keep a local and web hosted site in sync
  • Troubleshooting MAMP issues

Does that make sense?

Note to everyone, if you are not seeing a left sidebar when accessing the TNG wiki, then your browser is running in mobile mode

Link to comment
Share on other sites

15 hours ago, Philip Roy said:

My titles aren't consistent like that...but there's no way that I am going to try and figure out how to both rename pages and correct links across the wiki...so they can stay 'as is' unless someone else wants a bit more consistency.

Philip,

If you Move (rename) your pages and leave a redirect then the old title sends the user to the renamed page. 

Link to comment
Share on other sites

23 hours ago, Philip Roy said:

.but have also taken some screenshots on the Google console, because you can use the same API for web and localhost (you just add localhost as a second domain) so there's no changing of the map config file settings needed.

Philip,

You may want to update the existing Google Maps pages to show how to do this.  I have not been to the Google Maps Platform since the 2 different keys I obtained when they first started to require an API key still work.

Link to comment
Share on other sites

9 hours ago, Ken Roy said:

Philip,

Thanks for posting your MAMP articles to the TNG Wiki.

I would recommend that you use a shorter page title for

https://tng.lythgoes.net/wiki/index.php/Copying_your_local_TNG_website_from_your_Mac_or_PC_to_your_web_hosting_provider_for_the_first_time

https://tng.lythgoes.net/wiki/index.php/Trouble-shooting_web_hosting,_and_how_to_keep_a_local_and_web_hosted_version_of_your_site_in_sync

It takes 2 lines on the laptop to display the page title.   you should be able to use the More pull down on the TNG Wiki and then the Move to rename pages.  If you do not have the Move option in the your TNG Wiki username, please let me know and I will update your TNG Wiki username

If you need help, let me know.

As mentioned, I'm going to leave as is...I don't want to attempt playing around with titles or moving...whatever that is.

I'm sticking by the guidelines that state...

Quote

Article contributors should always avoid being "thin-skinned" about edits made by other users

If someone else wants to make those changes, then have at it ;-)

Link to comment
Share on other sites

56 minutes ago, Ken Roy said:

Philip,

I don't know if you are aware of the Troubleshooting  category on the TNG Wiki.  Looking at your proposed article, I am thinking that

https://tng.lythgoes.net/wiki/index.php/Trouble-shooting_web_hosting,_and_how_to_keep_a_local_and_web_hosted_version_of_your_site_in_sync

should be 2 different articles.

  • How to keep a local and web hosted site in sync
  • Troubleshooting MAMP issues

Does that make sense?

Note to everyone, if you are not seeing a left sidebar when accessing the TNG wiki, then your browser is running in mobile mode

It makes perfect sense....but I won't be writing an article on how to keep the two in sync...I'm just going to be (basically) adding the text about using phpMyAdmin and FTP'ing that Roger mentioned. As I already said, that's not necessarily a Mac-only thing. That page is going to be some trouble shooting and those comments...if someone wants to take that text and create an actual "how to" on keeping a local/website in sync...great.

I don't actually do that for my TNG install, so I don't want to start writing tutorials about things I don't know or do (my sites are updated by a complete GED re-import after I export from Reunion).

Someone is welcome to take the content and change it once I've done my bit.

Link to comment
Share on other sites

53 minutes ago, Ken Roy said:

Philip,

You may want to update the existing Google Maps pages to show how to do this.  I have not been to the Google Maps Platform since the 2 different keys I obtained when they first started to require an API key still work.

I'll try and get time to do that. It makes more sense to put it on the Google Maps page.

Link to comment
Share on other sites

OK, I think I am finished. Here's what I did today...

  • Updated this page - https://tng.lythgoes.net/wiki/index.php/Google_Maps_-_Getting_Started to feature details on how to add the localhost to an existing API key so that you can use the same key on your website and locally
  • I did NOT write an article or provide any information on how to keep a local site synced with a web-based version, because of this - https://tng.lythgoes.net/wiki/index.php/Database_-_Backup. To me, that outline approaches that people can take...for anyone that wants to know...and since I don't use those approaches, I was starting down a path of writing things I didn't know anything about. Better to have one source in the wiki than for me to start writing gibberish
  • Renamed the final page of my tutorial to Trouble-shooting MAMP-to-web-hosting

@Ken Roy sorry..I knew I'd stuff that bit up. I tried a redirect, but it kept redirecting the main MAMP page. I then altered just the link, which I thought was the correct thing to do...and then tried editing the text...but that appears to have generated a new page, which I then made use of.

That's a lovely way of saying I stuffed up and now this page exists that needs to be deleted as it is no longer needed...if it can...sorry.

https://tng.lythgoes.net/wiki/index.php/Trouble-shooting_web_hosting,_and_how_to_keep_a_local_and_web_hosted_version_of_your_site_in_sync

Of course the good news...that means one of the longer titled articles no longer exists :-)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...