We use cookies to make your viewing experience better. By accepting you consent, you agree to our Cookie policy

Improve your Craft CMS skills

How To Install Craft CMS

10 min read
How To Install Craft CMS

Installing the flexible, user-friendly Craft CMS to launch a new website sounds daunting to many marketers and business owners. But it doesn't have to be. This step-by-step guide will clearly walk through the entire process from start to finish, ensuring you can easily get Craft CMS running for your site. Follow our proven blueprint for download, setup, configuration and launch, and you'll have your site live sooner than you think.

Download Craft CMS from crafted.com or GitHub. Upload files via FTP to your server. Set proper permissions. Connect to database and configure site settings via the installer. Create admin account. Finalize configuration like email and security post-install. Test extensively before launch. Maintain with backups and updates.

Choosing Between Craft CMS Editions

Craft Solo, Pro and Commerce Features

Craft CMS comes in three distinct pricing editions - Craft Solo, Craft Pro, and Craft Commerce. Each caters to a different set of needs and has its own unique set of features of Craft CMS.

Craft Solo is the free, limited edition of Craft CMS. It's ideal for small, personal websites and simple brochure sites. Solo includes basic features like front-end editing, user management, and localization. However, it lacks some key functionality like native matrix fields that Pro offers. Solo sites are limited to only 500 entries across all sections.

Craft Pro is the paid, self-hosted edition with the full set of Craft's robust features. It's suitable for more complex sites and larger teams. Pro includes native matrix fields, advanced user permissions,Tasks and Rules, integration with services like Stacker. Plus unlimited entries and full access to the plugin store. The Pro license starts at £299 per site.

Craft Commerce adds ecommerce functionality on top of Craft Pro. It transforms Craft into a fully-featured online shop, handling products, orders, shipping and payments. Commerce brings features like customer profiles, discounts, subscriptions and integrations with payment gateways like Stripe and PayPal. Commerce pricing starts at £299 on top of the Pro license cost.

Pricing Differences Between Editions

There are substantial differences between Craft CMS pricing and licenses for Craft's Solo, Pro and Commerce editions.

Craft Solo is completely free but limited in functionality. Solo allows only 1 admin user and limits entries to 500 across all sections. No plugins are available. Support is through the community forums only.

A Craft Pro license starts at £299 for a single-site license. It allows unlimited admin users, entries, and full access to plugins. Support includes email and live chat. Pro licenses are available per site or for unlimited sites starting at £899 annually.

Craft Commerce requires a Pro license plus an additional Commerce license starting at £299 per site. Commerce unlocks ecommerce features and support. Volume discounts are available for multiple sites.

For Teams accounts with multiple team members, the price per user starts at £14 monthly or £119 annually for Pro, and £21 monthly or £179 annually for Pro with Commerce.

Evaluating Business Needs

Choosing the right Craft CMS edition involves carefully evaluating your business needs and project requirements.

For a small brochure site or personal blog, Craft Solo could suffice. But for anything more advanced, Craft Pro is worth the investment for its robust feature set. Pro is ideal for most agencies and enterprises.

For ecommerce requirements, Craft Commerce is a must. The ecommerce feature set and specialized support make Commerce the right fit for online shops.

Budget is a key factor. Solo is free but limited, while Pro and Commerce offer premium features at a cost. For lower budgets, Solo may be the only viable option.

For larger teams or multiple sites, Pro with per project or unlimited licenses makes sense. Solo only allows 1 admin user. The Teams plans also offer per user pricing.

Take time to realistically assess your needs before picking an edition. Factor in budget, team size, features required, and complexity of the project. Making the right choice upfront avoids headaches down the road.

Server Requirements for Running Craft CMS

PHP, MySQL and Web Server Requirements

There are specific PHP, MySQL and web server requirements to properly run Craft CMS. Having an environment that meets or exceeds Craft's recommendations helps ensure optimal performance.

Craft CMS requires PHP 7.0 or later, ideally PHP 7.2 or 7.3 for best results. PHP 7.4+ is also supported. Required PHP extensions include PDO, cURL, GD, DOM, and others. The memory limit should be set to at least 256MB.

For MySQL, version 5.5 or later is needed. Craft will work on 5.6+ for best performance. InnoDB storage engine is required along with utf8mb4 character set and collation. MySQL or MariaDB can be used.

A compatible web server like Apache or Nginx is required to run Craft. The server must support URL rewriting for Craft's .htaccess file. FastCGI with PHP-FPM offers better performance over mod_php.

Use Craft's Server Check tool from the control panel to validate your server meets requirements. It checks PHP, extensions, memory limit and many other components.

Testing Your Server Environment

It's important to properly test your server environment before launching a Craft CMS site. There are several tools and methods to validate PHP, MySQL and other components are configured optimally.

In addition to Craft's Server Check tool, services like ServerSuit.io offer a free suite of tests to stress test your server stack under load. Checks include PHP benchmarks, MySQL connectivity and versions.

Load impact testing tools like Blitz.io or Loader.io can simulate concurrent users and requests to uncover any bottlenecks under demand. Use them to confirm your server capacity.

Monitor your server logs during testing. Errors related to exhausting memory, slow SQL queries or caching issues may appear under load. Tweak MySQL, Redis or opcode caching accordingly.

For troubleshooting, enable Craft's Dev Mode to spot errors. Check extensions are installed for Imagick if using ImageOptimisation and watch for max execution timeouts.

Optimizing Your Server Stack

For the best Craft CMS performance, optimising your server stack is essential. Components like Nginx, Redis and opcode caching play a key role.

The Nginx web server with FastCGI and PHP-FPM offers faster PHP processing than Apache mod_php. Nginx's caching and compression speed up sites considerably.

Installing Redis and configuring Craft to use it for database caching and sessions improves performance dramatically. Redis reduces database load and improves request times.

Opcode caches like OPcache (for PHP) and APCu speed up PHP execution time significantly by caching precompiled script bytecode in memory. They're crucial for optimising Craft.

Other tuning like using a CDN, tweaking database indexes and MySQL memory allocation also helps maximize performance. Consult your hosting provider for specialized Craft CMS tuning.

Downloading the Craft CMS Core Files

Getting Craft from crafted.com or GitHub

There are two main ways to download the Craft CMS core files - from the official crafted CMS website or from GitHub.

The crafted.com download page offers starter and developer zip files for the latest stable Craft release. This ensures a production-ready build ideal for launching sites.

Alternatively, the Craft GitHub repository contains the full version control history and bleeding edge developer builds. GitHub allows collaborating on and contributing to the open source Craft CMS codebase.

Downloaded GitHub builds may contain experimental features or bugs not yet ready for primetime. Stick with crafted.com downloads for production sites needing stability.

Starter vs Developer Downloads

crafted.com offers both Craft CMS starter downloads and developer downloads. They serve different needs.

The starter zip contains the minimum essential Craft files to bootstrap a new project. It includes the core software and template files required to kickstart development.

The developer zip includes everything from starter plus source code files like un-minified CSS and JavaScript. This aids developers in inspecting and customising Craft's front-end files.

For non-developers, the starter zip offers a leaner download. But developers may prefer starting with the full set of files in the developer zip.

Verifying Download Integrity

It's important to verify the integrity of your Craft CMS download before installation. This ensures the files have not been tampered with or corrupted during transit.

Downloads from crafted.com provide SHA-256 checksums and PGP signatures which can be used to authenticate the zip contents. Check the hashes match to validate integrity.

For GitHub downloads, examine the git commit history and any release notes. Monitor issues to check for reports of problematic or compromised builds.

Craft's integrity is crucial for security. Make sure to only install Craft core files from trusted sources like crafted.com and vetted GitHub releases. Avoid unverified downloads from third parties.

Authenticating downloads enables launching your Craft CMS site on secure foundations right from day one. Don't skip this simple but vital step.

Uploading and Configuring Craft CMS

Using FTP to Transfer Craft Files

Once you've downloaded the Craft CMS files, the next step is transferring them to your web server ready for installation. This is typically done using an FTP client.

Connect to your web server over FTP using credentials provided by your host. Navigate to the document root folder for your domain. This is usually something like /public_html or /www.

Create a new folder just within document root, like /craftcms to keep things organised. Upload the entire contents of the Craft zip here. The main index.php file should now be at /craftcms/index.php.

Double check all files and folders were properly uploaded. Only proceed once you've verified the core Craft system files are now on your server.

Setting Proper Folder Permissions

With Craft CMS uploaded, the correct file and folder permissions need to be set for proper functioning.

Key folders like /craftcms and /craftcms/storage must be writable by the user PHP runs as (often www-data). The most common permission scheme is 755 for folders, 644 for files.

Use a recursive chmod command like chmod -R 755 /craftcms to set permissions on the entire /craftcms folder and contents for installation.

For production, lock down permissions post-install. Make config/ db/ writable only by the owner. Set 400 permissions on .env for security.

Adjusting PHP.ini and Web Server Config

Some tweaks to PHP.ini and your web server config may be needed for optimal Craft CMS performance.

Increase PHP memory_limit to at least 256MB or higher. Adjust max_execution_time to at least 240 seconds to accommodate larger tasks.

Enable extensions like imagick, gd, redis if required. Tweak performance options for opcache, APCu and related caches.

For Nginx, use fastcgi_pass for PHP. Set appropriate try_files rules to direct all traffic to /index.php. Enable gzip compression and caching.

In Apache, use mod_php or php-fpm for better performance over mod_php. Set AllowOverride all for .htaccess and enable relevant modules like rewrite.

Work with your host to ensure your web server config is properly optimised for running Craft CMS.

Walking Through the Craft CMS Installer

Connecting to the Database

The first step when running the Craft CMS installer is connecting it to your MySQL database. This stores all the site data, content and settings.

You'll need your database credentials - the hostname, database name, username and password. Your web host provides these or you can create a new database and user specifically for Craft.

Enter the hostname (usually localhost), DB name, username and password into the installer.

Craft will test the connection and create the necessary tables once a successful connection is made.

For production, use a dedicated DB user with permissions limited to just the Craft database for security. Avoid the root MySQL user.

General Site Configuration

After database setup, the installer moves on to general site configuration settings.

Choose your site name, which can be different than the domain name. Pick the site base URL - typically your production domain.

Select your default site language. English UK and US are included by default. You can add more languages later.

Set your correct timezone. This ensures dates and times match your location. DST auto-adjusts.

Choose an off-line message if you want visitors to see a custom page during maintenance.

Double check these settings as they form core site parameters that can't easily be changed later.

Creating Your Admin Account

The last step is creating your initial Craft admin account.

Choose a username like "admin". Set a strong password and save it securely - this account has full control!

Enter your name and email address. This lets you reset your password if forgotten.

Check the “Account activation” email box to force email validation on first login. This adds an extra security layer.

Click complete once your admin account is saved. You'll be redirected to the control panel to finalise any additional details.

Your Craft CMS installation is now ready to go! You can begin populating content, creating entries and building out your custom site templates.

Configuring Craft CMS After Installation

General Settings and Preferences

Post install, there are several key general configuration and settings to finalize within the Craft control panel.

Double check that site name, primary site language, timezone and other details from the installer are correct. Make any needed tweaks.

For better performance, enable template caching. Set cache duration from 1 minute up to 24 hours for static sites. Use Redis if available.

Under Advanced Settings, adjust things like Require Email Verification, Allowed File Extensions and other preferences.

Set optional vanity URL for the CP login at /admin or similar for convenience. Just be sure to restrict access.

Browse through all site settings and preferences to familiarize yourself with the options. Tweak them to suit your specific needs.

Email Settings and Configuration

Properly configuring email is essential for things like password resets, user notifications and contact forms.

Under Email Settings, adjust the sender name, address and reply-to address as needed. Match your domain.

For SMTP, use Craft’s built-in Mailer if possible. If not, setup SMTP credentials for services like Gmail, Mailgun etc.

Verify your domain’s DKIM and SPF records to maximize deliverability and avoid spam filters.

Setup email templates for common messages like new user notifications. Customize the styling and content.

Test email sending using the Utilities tool. Check spam folders and inspect headers to validate it’s all working.

Securing Your Craft CMS Site

Take time to properly secure your Craft CMS install from day one - don't leave the door wide open!

Set restrictive folder and file permissions on config/, storage/ and .env. Set 0755 for folders, 0644 for files.

Use security-related login plugins like MFA, Loginizer and Shield to add layers of protection.

Disable front-end site access to Craft admin pages with Apache/Nginx rules. Never expose /admin publicly.

Require strong passwords with a minimum length, mixed case, numbers and symbols. Force resets every 6 months.

Always keep Craft and plugins updated to patch any newly discovered vulnerabilities as soon as possible.

Leverage Crafter to generate and manage secure, complex passwords for all environments and users.

Following security best practices helps ensure your Craft CMS site and data remains protected.

Managing Users in Craft CMS

User Accounts and Groups in Craft

Craft CMS allows creating multiple user accounts for your team. Accounts can be organized into user groups for easier management of permissions.

Individual user accounts represent team members who need access to the control panel and administrative functions.

User groups act as containers for related accounts. For example, create an "Editors" group for content editors who share common permissions.

User accounts can belong to multiple groups. Assign each account to appropriate groups matching their roles and access needs.

User Roles and Permissions

Craft has predefined user roles like Editor and Administrator that come with pre-baked permission sets.

Or you can create accounts with custom roles and assign granular user permissions on a per-user or per-group basis.

Common permissions include controlling access to sections, categories, asset volumes, plugins, utilities, settings and more.

Set permissions narrowly, following the principle of least privilege. Give users only the access truly needed for their role - nothing more.

The User Management Control Panel

The Users section of the Craft control panel enables managing all aspects of users and permissions.

Here you can create new user accounts, edit existing ones, manage user groups, and assign user permissions.

The Users index overview shows every account at a glance along with group membership and role info.

Drill into any user or group to modify details, reset passwords, invalidate sessions, and configure permissions settings.

Use the Users section to fully control and administrate your team’s access to Craft CMS capabilities according to your business needs.

Local Development Workflows for Craft CMS

Benefits of Local Development

Developing Craft CMS sites locally offers many benefits over directly editing live production sites.

Local dev allows using version control systems like Git to safely build, track changes, and collaborate. Make and test enhancements without impacting live visitors.

Local sites run on your own computer so you can work faster with no server lag. Tweak templates, entries, plugins without waiting for updates to deploy.

Fully and rigorously test all changes locally before going live. Shake out bugs, CSS quirks, content flaws before launch.

Better segregation between development and production environments following best practices.

Overall, local dev enables more efficient, bug-free development with less risk.

Tools like MAMP/XAMPP, Docker, Vagrant

There are great tools for setting up local dev environments for Craft CMS like MAMP, XAMPP, Docker and Vagrant.

MAMP and XAMPP bundle Apache, PHP and MySQL making installing Craft CMS locally on macOS or Windows simple.

Docker provides pre-built containers to quickly spin up disposable, isolated Craft environments using Docker Compose.

Vagrant configures virtual machines for development with automation tools like Puppet or Chef installing Craft and dependencies.

All these tools simplify replicating a full LAMP or LEMP stack on your computer tailored for developing Craft sites.

Pushing to Live Production Servers

Once a site is complete locally, you're ready to go live. Use backups, testing and version control for a smooth launch.

Tag the final git commit and push it to trigger any CI/CD scripts that deploy to staging for further testing.

Backup the live database and files in case a rollback is needed. Take the site down for maintenance.

Use rsync, SFTP, deploy scripts or similar to push the site to production. Don't forget asset volumes and database.

Configure environment-specific config like database credentials. Check error logs and test thoroughly.

Bring the site live once you've validated everything is working properly in the live environment!

Careful launches empower iterating quickly while protecting production site integrity.

Launching a New Craft CMS Website

Importance of Testing Before Launch

Thoroughly testing a new Craft CMS site before public launch is crucial to uncover any lingering issues.

Conduct functionality testing across all templates, entries and workflows. Beat on forms, navigation, searches and API integrations.

Do cross-browser testing across desktop and mobile to catch styling quirks. Use tools like BrowserStack for broad device coverage.

Check every site page and link works as expected. Fix any 404s or errors. Enable Craft debug toolbar to identify problems.

Have external testers poke around the site to mimic real-world use and find corners you may have overlooked.

Don't skimp on testing timeframes. It's better to delay launch than have a buggy or broken site!

Steps for Launching and Going Live

Careful planning and execution ensures a smooth site launch. Follow this blueprint:

Prep hosting infrastructure for the traffic spike at launch. Scale up servers and CDNs as needed.

Point domain DNS to new hosting servers. Setup SSL certificates. Enable caching and compressions.

Create 301 redirects from old URLs to new Craft site pages. Retain SEO equity.

Backup everything! Database, codebase, asset volumes and config files.

Disable admin control panel access except for IP whitelist. Never expose /admin publicly.

Announce launch internally and externally. Monitor metrics and bugs closely after launch.

Soft Launch vs Big Bang Launch

For lower risk, first do a soft launch to a limited test group before a wider rollout.

Soft launch allows real-world testing and catching issues only apparent at scale. Slowly ramp up traffic.

But sometimes a single big bang launch is preferred for marketing impact and buzz. More risk, but higher visibility.

Weigh pros and cons of each approach for your specific site and audience. There is no one right answer.

Either way, setting up proper monitoring and being ready to quickly address problems is essential.

Maintaining and Backing Up Craft CMS

Database Backups and Version Control

Regular database backups and version control for code changes are vital for properly maintaining Craft CMS sites.

Use Craft's native utilities or plugins like BackMeUp to backup the database on a schedule. Store backups off-server for redundancy.

For files, use Git to track code changes. Commit frequently, and push commits off-server to GitHub/Bitbucket.

Follow the standard branch workflow with dev, staging and production environments. Merge thoroughly tested code.

Version control enables safely rolling back bad deployments and restoring lost files if needed. Never make direct live edits.

Updating and Managing Plugins

Staying up to date with Craft CMS and plugin updates is key for new features, security and compatibility.

Use the Updates utility in the Craft control panel to easily update Craft core and inspect available plugin updates.

Test updates on dev environments first before updating production. Watch for breaking changes in release notes.

Disable and remove abandoned or unnecessary plugins to optimize performance. Limit plugins to only essentials.

Critically evaluate new plugins to vet code quality and security before installing. Favor reputable vendors.

Monitoring and Scalability

Proper monitoring and planning for scalability ensures a smooth experience as site traffic grows.

Use New Relic or other APMs to monitor site performance. Identify bottlenecks like slow-running queries or inadequate caching.

Setup monitoring services like Scout and Watchtower to get notified of Craft updates, security issues and backups.

Scale up infrastructure by adding servers, optimizing databases and enabling CDNs to handle more visitors.

Tune Craft and server config for optimal performance under load. Follow hosting provider guidance for large Craft installs.

Well-maintained sites provide reliability while supporting continued expansion down the road.

Shape April 2022 HR 202
Andy Golpys
- Author

Andy has scaled multiple businesses and is a big believer in Craft CMS as a tool that benefits both Designer, Developer and Client. 

Show us some love
Email Us
We usually reply within 72 hours
Agency Directory
Submit your agency
Affiliate Partners
Let's chat