MAMP Pro to the cloud

After my my Mac decided to fuck up after installing Sierra, it gave me a chance to reorganise my shit as I forgot to backup my MAMP Pro installation, so I had to rebuild all 20+ web sites and databases from scratch. Not doing this again as it’s a right pain in the ass.

So after playing around a bit, I’ve moved the htdocs folder and the MySQL databases to Dropbox. I could use iCloud but I’m not installing that shit on my Workstation PC at home.

Before we go to Terminal, make sure MAMP and your MySQL management tool (phpmyadmin/Sequel Pro/Workbench) of choice is closed.

Copying the databases

If you want to use another cloud storage solution, here are the default install path for iCloud:
~/Library/Mobile\ Documents/com~apple~CloudDocs/

Google Drive:
~/Google\ Drive/

Microsoft OneDrive:
~/OneDrive/

Just replace the Dropbox path in these examples. So let’s copy the databases folder to Dropbox in a folder called MAMP_db.

cp -r /Library/Application\ Support/appsolute/MAMP\ PRO/db ~/Dropbox/MAMP_db

Rename the default folder to something else

mv /Library/Application\ Support/appsolute/MAMP\ PRO/db /Library/Application\ Support/appsolute/MAMP\ PRO/delete_db

Create a symbolic link to the new folder.

ln -s ~/Dropbox/MAMP_DB /Library/Application\ Support/appsolute/MAMP\ PRO/db

Now start MAMP Pro and wait to see if MySQL loads without errors. I double checked by loading Sequel Pro to see if my databases were there.

If you want to use iCloud instead, use

If that was a success, we can now move the web sites.

Copying the htdocs

Exactly the same commands, just a different folder.

cp -r /Applications/MAMP/htdocs ~/Dropbox/MAMP_htdocs
mv /Applications/MAMP/htdocs /Applications/MAMP/delete_htdocs
ln -s ~/Dropbox/MAMP_htdocs /Applications/MAMP/htdocs

Load MAMP Pro and click localhost and hey presto.

I did this on a fresh installation, and when tried to access localhost I got a Forbidden 403 error. All I did was make a new host and it worked fine.

MacOS media keys stopped working

The Play/Pause media key in iTunes stopped working recently, and while ploughing through pages and pages of answers, I suddenly remembered the last experience of when the Next and Previous media keys stopped working.

That solution involved killing off the Google Music extension in Google Chrome as it hijacked the keys, so it couldn’t have been that screwing up my Play/Pause button.

So just for shits and giggles, I went to chrome://extensions and scrolled down to Keyboard Shortcuts at the bottom, and what do you know, Black Menu for Google was hijacking the Play button.


Click on the dropdown where it says Global to In Chrome and hey presto, I don’t have to click to iTunes to pause music anymore.

FFS