The easiest stage of all, go to CraftCMS’s official site and get download the latest version of CraftCMS. It’s free to download and develop on, but when you come to launching your site you need to choose a licence (very cheap at $199).
MAMP is a great tool, it allows you to run your own ‘server’ from your local machine, and is very beginner friendly, you don’t need to be a developer whizz to get this software right. Download MAMP at the following link…. Follow the instruction guide, and just install a default server.
Awesome, MAMP is installed and Craft Downloaded you’re on a roll! Once MAMP has finished installing the first thing we want to do is click ‘Start Servers’ once this launches you should be presented with a screen saying ‘MAMP has been insalled successfully’ if you’re on this fantastic! If not - MAMP has a great troubleshooting guides to get it up and running for you.
Firstly, we need to create a database for our CraftCMS website, so on the MAMP Installed page, under the tools menu dropdown click ‘PHPMyAdmin’ this should open up a new tab with a scary looking interface! Don’t worry, all we’re doing here is clicking one button! Click the ‘Databases’ tab located at the top, next we want to ‘Create Database’ and we’re going to name this one ‘craft_db’ like the following image.
Now are databases are all set up, we should shut our MAMP servers down. You can do this by clicking ‘Stop Servers’ on the MAMP window. Now - let’s unzip our Craft CMS download, this should leave you with a folder structure like so:
Now, what we need to do is head into our MAMP’s htdocs folder within /Applications/MAMP/htdocs/ once you’re within this path, paste your whole ‘Craft-*version-number* folder within it, this will allow Craft to be able to find your install. (Also - rename your ‘public’ folder to html, this will allow easier uploading to Digital Ocean, but it’s completely your choice!)
Craft needs access to things on our Mac, by default mac is very keen to protect you from the web and all the nasty things that can happen. But hey, we’re developing locally and don’t really need this protection from ourselves! Do the following commands in your terminal:
Now we need to tell Craft where our database is and what name it is, remember we called it (craft_db). So let’s go ahead and open the following file in your favourite code editor:
Change the following settings:
Save that file off, and let’s get cracking!
Craft is a bit silly and this is just a janitor task, what you’ll need to do is open /Craft-*your version name*/html/htaccess in your favourite code editor, and rename it so that it has a ‘.’ infront of it like so “.htaccess”
Head onto MAMP, and click ‘Preferences’, you’ll be presented with another modal window. Within this window click the ‘Web Server’ tab. Change the source file to your htdocs/craft/html folder. After you’ve set it, click ‘Ok’ to save these settings.
It can either work - or fail miserably! Let’s try! Open your MAMP window, and click ‘Start Servers’. Navigate in your browser to the following URL and you should see a beautiful screen such as:
If you receive any errors regarding Plugins or Extensions, it means your mac hasn’t got these installed. If you’re currently getting an error stating “mcrypt extension not found” make sure it’s installed (it’s installed by default with MAMP so you should have it) but if not, please make sure to update your MAMP install to the latest version, there was a bug with the previous versions.
There’s too many errors that you may run into regarding extensions for Craft CMS, but what I would say is if any other extensions you find cause you a headache try searching for the following within Google:
“Installing *extension error name e.g. mcrypt* on terminal”
This should bring up lots of answers either via stack overflow or the actual PHP site. Follow the instructions on those sites and you should be perfect!