blog

GETTING STARTED WITH CRAFTCMS

CraftCMS is a content-first CMS that is loved by developers and content producers alike. Of all the alternatives to WordPress that are out there, CraftCMS is one of the best. Here we look at getting started with this awesome developer-friendly content management system.

1. DOWNLOAD

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).

2. INSTALL MAMP

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. Follow the instruction guide, and just install a default server.

3. SPIN UP YOUR 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 installed successfully’ if you’re on this, fantastic! If not, MAMP has great troubleshooting guides to get it up and running for you.

4. GETTING INTO PHPMYADMIN

Firstly, we need to create a database for our CraftCMS website, so on the MAMP Installedpage, 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’.

5. MOVING INTO HTDOCS

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.

‍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, but it’s completely your choice!)

‍6. SET PERMISSIONS

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:

cd /Applications/MAMP/htdocs/Craft-put-your-version-name
chmod 774 craft/app/
chmod 774 craft/config/
chmod 774 craft/storage/

7. WHERE’S YOUR DATABASE? PLEASE TELL ME!

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:

craft/config/db.php

Change the following settings:

  • Set ‘server’ to the name of your database server. If your database and web server are on the same box, then this will likely be either ‘localhost’ or ‘127.0.0.1’.
  • Set ‘user’ to the name of the MySQL user Craft should use to connect to the database. MAMP usually sets a fresh install username to ‘root’.
  • Set ‘password’ to the password for the MySQL user Craft should use to connect to the database. Usually ‘root’.
  • Set ‘database’ to the name of the database Craft should be connecting to. Remember we called it ‘craft_db’ so put that here!
  • Set ‘tablePrefix’ to the prefix you want each of Craft’s tables to use. Note that this must be five characters or less, and it does not need to end with ‘_’. If Craft won’t be sharing its database with any other apps, you’re also free to leave this one blank.

Save that file, and let’s get cracking!

8. RENAMING YOUR HTACCESS FILE

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

9. TELLING MAMP WHERE TO OPEN!

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.‍

10. IT’S THE MAGIC MOMENT!

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: http://‌localhost:8888/admin

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 stackoverflow or the actual PHP site. Follow the instructions on those sites and you should be perfect!

Related posts

5 Replies to “GETTING STARTED WITH CRAFTCMS
  1. 一款兼具底妝及遮瑕的粉底液,12小時持續自然又完美無瑕的裸妝感.輕盈、保濕、遮瑕、幾乎零毛孔的完美底妝。肌膚感覺舒適輕透,妝效自然且防水防潮濕獨有的完美遮瑕科技打造無瑕妝感, 初次建議選深一號,當底妝在肌膚上完全融合吸收時,12H完美偽妝粉底液會融合你的膚色呈現最佳的偽裸妝。

    https://skinac.com/tag/醫之美

  2. 它讓神經原在常規的緊張鍛煉中進行共振燃燒,由此帶來健身運動所無法達到的效果。Ion Magnum複雜的振動波是基于於二十多年對神經原燃燒信號的研究手工製作的。 設備製造者的臨床研究結果顯示,30分鐘的治療相當於在健身房10個小時的運動,可以燃燒高達5000卡路里的熱量。其他臨床研究顯示肌肉生成的速度以及脂肪(表面脂肪以及深部脂肪)减少的速度相應都比運動的效果更好。對於Ion Magnum沒有進行理療的部位,甚至會有抗衰老防氧化的效果。 有受試者治療一次之後同一個部位减掉了3-4英寸(不像其他减肥治療中宣稱的那樣,一次治療减掉了5英寸,但那是全身20多個部位加起來减掉的尺寸)。同時,它還可以减掉脖子和下巴的脂肪,讓你的雙下巴消失 . 每次治療需要25分鐘。治療前後的效果非常明顯,而且會持續1-2天。要想達到更好的效果,最好接受1-2個小時的治療。

    http://cosmedicbook.com/treatments/info/Ellanse洢蓮絲(依戀詩)-少女針療程

Leave a Reply