Blog | Kilburnlad KilburnladBlog

Using MAMP to develop a PHP site

I built a site for my daughter some time ago and recently I've been developing a registration system using Sitelok by Vibralogix, a sophisticated piece of PHP software with a superb manual and incredible after sales support; something I've needed as I've struggled with the certain aspects of the site development. Mainly it must be said to do with the Paypal interface rather than the basic registration system.

MAMP

I use RapidWeaver and with new and existing web pages now being controlled by PHP it has not been possible to preview them before publishing. As most of what I've done so far is on hidden pages, locked with Sitelok, it hasn't impacted too greatly on the live site. But I had reached the stage of modifying live pages for Sitelok, making live publishing a slightly risky way of checking modifications or additions. So I decided to try MAMP, which comes in two versions, MAMP (free) and MAMP Pro. The free version was adequate for my limited requirements.

I had looked into MAMP some time ago, for a different project, but hadn't managed to use it properly. Lack of knowledge, I would add, rather than any failings with the application. But this time I did my research and watched a couple of videos on YouTube. It still took a bit of trial and error to set things up, but having now done so it's working a treat.

MAMP establishes an Apache server (in my case, an alternative being Nginx) and MySQL on your computer, thus enabling you to view PHP controlled content without publishing to a web-based server. By supporting MySQL databases it enabled me to replicate the Sitelok installation. MAMP creates a local folder in which you can replicate your remote server files. In this folder I first created a folder named RapidWeaver and simply copied the RapidWeaver 8 app into it.

In RapidWeaver I created a new local publishing destination for the project, targeting the folder in the MAMP application. Exporting to this folder copied all the RapidWeaver site files and resources, but not warehoused assets, such as images and videos. Then, using FTP, I added files that were not part of the RapidWeaver project, including the Sitelok files. Finally, using cPanel, I exported a copy of the database associated with Sitelok from the web server, and using phpMyadmin in MAMP, imported it into a similarly named new database in MAMP. I just needed to change the user name and password in the local copy of the Sitelok configuration file to the MAMP defaults.

And amazingly, for me at least, I now have a full working copy of the site viewable in a local environment. So I can modify pages and test them without risking disruption to the live site. An added advantage is that republishing to the local file is far quicker than publishing to the web, speeding up the workflow.

Creating a French website

I've offered to create a website for the wife of a friend in France whose an amateur artist. This has brought new challenges, some expected, others less so.

Challenge one was to use a content management system (CMS) to allow my friend to add to and edit prescribed parts of the site. I use RapidWeaver and had already used Armadillo for the blog on this Kilburnlad site, but I would need to use some of Armadillo's other capabilities for the new site.

The next unexpected technical nicety was working with a French (.fr) domain. I first researched the domain with a view to purchasing it for my friend but during the process a warning message advised me that after Brexit it might not be possible to retain ownership without a valid EU address. I therefore asked my friend to purchase the domain name and using his login details was able to direct it to the DNS name servers on my web space.

Read more

Show more posts

This website doesn't make extensive use of cookies but a small number are required for the correct functioning of the site and to collect anonymous analytical data.