There are two ways you can set up a new project in Craft 3, vis-a-vis, via Composer and Manual. Both the methods require extensive technical expertise & understanding of Craft CMS.
With Composer method you have to know your commands and what you’re doing with them but in case of the manual method you just have to perform some simple operations.
Composer Method in Craft CMS
If you have a good understanding of Craft CMS, then you can setup a new Craft project with the some terminal commands.
Though, before installing Craft with composer, do make sure that you’re running Composer version 1.3.0 or above.
Here are the essential steps:
Check the Composer version
Run this command in case your Composer needs updating
When you’ve confirmed that you’re running a compatible version of the Composer, run the following command (substitute with the path where Composer should create the project):
composer create-project craftcms/craft <PATH>
The composer will do all the work and it will display a success message.
Another way is to do it manually.
Manual Method to setup Craft CMS
You will have to download the archive from Craft’s website. Choose the archive format you’re familiar to work with. Extract the archive where you want your Craft project to be saved. Then follow these 5 steps:
Step 1: Setting up permissions
When you’re doing the manual setup, you have to download and extract the Craft archive in the desired place. The extraction will provide you with a Craft directory which has these files in it:
Out of these files, there are some files for which PHP needs access permissions for different users to write on it. The files are:
The permissions are defined on the basis of the relationship between the system user that the PHP is running as and ownership of the folders/files.
- If they are the same user, use 744.
- If they’re in the same group, then use 774.
- If you’re not sure, then use 777.
Step 2: Securing the project with a security key
You have to set up a security key to encrypt the data of your project. Every project in Craft has a unique one. You can also use same security key for multiple environments running Craft.
You can set a unique security key using the terminal or with a password generator. The password generator will help you to create a cryptographically secure key. Now you need to insert the generated key in your .env file.
Open the .env file and insert the security key in between the quotes where it says:
Save the file.
Setting the security key with terminal
Run the following command in your project’s root directory:
Step 3: Creating a database
Craft 3 supports MySQL 5.5+ and PostgreSQL 9.5+. So you can choose your database accordingly. But there are some recommended database settings:
- For MySQL
Default Character Set: utf8
Default Collation: utf8_unicode_ci
- For PostgreSQL
Character Set: UTF8
Step 4: Setting up a web server
With the database done setting up. You need a web server on which you can host your Craft project. Make sure you set the path of it’s document root to-
web/directory(name of the directory)
You will need to update your hosts file if you’re not using any local hosts like MAMP.
You can find your respective host files here
- For macOS/Linux/Unix: /etc/hosts
- For Windows: \Windows\System32\drivers\etc\hosts
Enter http://<HOSTNAME>/index.php?p=admin in the address bar of your browser (substitute <HOSTNAME> with your web server’s host name). Just to check if the setup works.
If there are no errors, Craft’s Setup Wizard will show!
Step 5: Running the setup
You can either run the setup from terminal or from the browser. In the terminal after running the setup command and telling the installer ‘how to connect to the database’, your installation should take care of itself.
Browser setup on the other hand provides an interactive installer to setup your Craft.
Open your terminal to run the command
Answer the questions about how to connect to your database to start the installation. After the installation, you can access your new Craft project.
Open your browser and enter http://<HOSTNAME>/index.php?p=admin (substitute <HOSTNAME> with your web server’s host name) in the address bar of your browser to find Craft’s installer. Follow the instructions and your Craft should be up and running in few minutes.
I. Accept the license agreement
II. Enter the Database information
III. Create an admin account
IV. Enter the preferred system name, URL and language
You’re all set to tweak the website from your Craft control panel.
If you’ve followed every step mentioned in this tutorial then you should be able to fire up your Craft projects right away.
Both the methods require expertise in Craft CMS. You can connect with us here for further assistance and queries.
By Evnisha Malani | Categories:CMS,Galaxy Apps,Others,Web | Tags: craft 3,craft cms,new project in craft cms,setup,Web Development | Comments closed
About Galaxy WeblinksWe specialize in human-centric user experience design services to our clients across the globe. Our innovative ideas, creative designs, industry best practices, and processes help us improve user satisfaction and solve complex design problems. Contact us for a free consultation!
Developers use Text Editors, also known as code editors, for editing programming code. These editors basically contain features like quick navigation, syntax highlighting, automatic indenting,…App Developement Web
Your business is growing and your team is doing their best to meet the tight deadlines and increased workload. You may be exploring the idea…App Developement Web
Voice search is at its peak in popularity among millions of users. According to an OC&C Strategy Consultants market research, Voice Shopping is projected grow…Ecommerce Web
Hello (Inserts your First name), All of us have received emails/ sms notifications, social media ads, that are sharing offers and discounts on the products…Ecommerce Web
The recently released WordPress 5.4 ‘Adderley’ update has got a lot to look forward to! Since this highly popular CMS ditched its classic editor for…CMS Web
Today, websites are more than just a ‘set-it-and-forget-it’ proposition. They are marketing machines that help you get new customers and leads. You might be planning…CMS
Modern technology has two problems: Devices have too many integrated features and everything is smaller. A good implementation of more-than-what’s-necessary features can give some users…App Developement Others Web
What is common between Pinterest, Tinder, Uber, Trivago, and Airbnb? All these companies experienced a surge in their product’s performance, user-engagement, and conversions by going…Mobile PWA Web
Kotlin has emerged as both substitute and supplement to C++ and Java. In 2018, the language had over 96,000 repositories on GitHub and had already…App Developement Galaxy Apps Others Web
When you think of hotspots for tech, don’t zero in on Silicon Valley just yet. According to Expert Market, Boston is one of the top…Galaxy Apps Internet Marketing Others Web
The experience of Disneyland is always an awe-inspiring one. No matter how many miles you have walked, you are always up for another Pirates of…Galaxy Apps Others Product Development Web
Google Play set out many criteria in their app guidelines that you need to follow. These changes may cause some issues as you try to…Galaxy Apps Mobile Others Web
Leading the AR revolution, industrial enterprises are experiencing improved ROI through AR-optimized supply chain. Enterprise sector is using AR across other functions such as product design…AR Galaxy Apps Others Web
Apple in its annual WWDC made some game changing announcements like a new Mac Pro, an exclusive OS for iPad, iOS 13 release, new Apple…Apple Galaxy Apps Others Web
At the time of an unsuccessful product deployment, you might ask yourself. “What went wrong with the product delivery?” The simple answer lies in configuration…Galaxy Apps Others Product Development Web
You might be familiar with Murphy’s law which says ‘Anything that can go wrong, will go wrong’. Software isn’t immune to that. But that’s often…Galaxy Apps Others QA Web
When you look at the respective market share of both the CMSs, WordPress has a clear edge over Craft CMS with 81.9% market share to a…CMS Galaxy Apps Others Web
Angular 6, released earlier in May 2018 didn’t offer much improvements on the performance part. It was mainly focused on making Angular migration-friendly. Google dropped…Frontend Galaxy Apps Others Web
Magento announced that it is pulling the plug on Magento 1 in April 2017 at the ‘Meet Magento’ conference in Prague. The announcement caused a…Ecommerce Galaxy Apps Others Web
Building a WordPress website? The WordPress community provides you with plenty of options. You can either make an easy one using WordPress themes or a…Galaxy Apps Others Web Website Development
Facebook has finally decided to monetize WhatsApp. Earlier this month, on August 1, Facebook rolled its long-in-development WhatsApp Business API for medium to large businesses.…Galaxy Apps Others Web
Craft CMS’s consistency can be seen in its regular updates & latest features. Matrix is one of those early features that helped Craft dominate the…CMS Galaxy Apps Others Web
Before introducing the Debug Tool in Craft 3, Craft CMS made you install a separate web-based application, Web-Console. You could run shell commands on your…CMS Galaxy Apps Others Web
Investors have the money, you have the idea, and the right pitch is the only thing that stands between you and them. But, pitches are…Galaxy Apps Others Product Development Web
“Personal data shall be processed in a manner that ensures appropriate security of the personal data, including protection against unauthorized or unlawful processing and against…Galaxy Apps Others Web
Google recently announced Mobile-First Indexing after a year and half of extensive experimenting and testing. The search engine giant will start migrating sites that follow…App Developement Galaxy Apps Others Web
Social media networks are mode of social interaction. It is a platform of sharing and discussing information among human beings. Social media can include text,…Internet Marketing Social Media Web