Skip to content

Commit ed0a2a6

Browse files
committed
drupal cms guide
1 parent 4c5e4c1 commit ed0a2a6

File tree

3 files changed

+184
-3
lines changed

3 files changed

+184
-3
lines changed

CHANGELOG.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
## {{ UNRELEASED_VERSION }} - [{{ UNRELEASED_DATE }}]({{ UNRELEASED_LINK }})
22

33
* Updated globally installed Drush to `v8.5.0`.
4-
* Added `Drupal CMS` instructions to the Getting Started docs.
5-
4+
* Added docs for setting up [Drupal CMS](https://drupal.org/docs/drupal-cms).
65
* Updated to [@lando/php@1.7.1](https://github.com/lando/php/releases/tag/v1.7.1).
76
* Updated to [@lando/mysql@1.5.0](https://github.com/lando/mysql/releases/tag/v1.5.0).
87

docs/config.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,11 @@ config:
2626
vhosts: SEE BELOW
2727
```
2828
29-
Note that if the above config options are not enough all Lando recipes can be further [extended and overriden](https://docs.lando.dev/landofile/recipes.html#extending-and-overriding-recipes).
29+
Note that if the above config options are not enough, all Lando recipes can be further [extended and overriden](https://docs.lando.dev/landofile/recipes.html#extending-and-overriding-recipes).
30+
31+
::: tip Applying Configuration Changes
32+
After making changes to service configurations, you'll need to run `lando rebuild` for the changes to take effect. This rebuilds your app's services with the new configuration.
33+
:::
3034

3135
## Choosing a Drupal version
3236

docs/guides/drupal-cms.md

+178
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,178 @@
1+
---
2+
title: Installing Drupal CMS with Lando
3+
description: Learn how to install and run Drupal CMS locally using Lando for development
4+
guide: true
5+
6+
authors:
7+
- name: Aaron Feledy (@aaronfeledy)
8+
pic: https://avatars.githubusercontent.com/u/1000487
9+
link: https://x.com/aaronfeledy
10+
updated:
11+
timestamp: 1736983714801
12+
---
13+
14+
# Installing Drupal CMS with Lando
15+
16+
[Drupal CMS](https://drupal.org/drupal-cms) is a new product that puts the power of Drupal into the hands of marketers, designers and content creators. It's built on Drupal 11 and comes with smart defaults and AI-powered features to help you launch your site quickly.
17+
18+
This guide will walk you through setting up Drupal CMS locally for development using Lando.
19+
20+
<details>
21+
<summary>TLDR; Quick Install Commands</summary>
22+
23+
::: code-group
24+
25+
```bash:no-line-numbers [Bash]
26+
# Prompt for app name (or change this line to set it directly)
27+
read -p "Enter your app name [my-drupalcms-app]: " APP_NAME
28+
APP_NAME=${APP_NAME:-my-drupalcms-app} # Default if no input provided
29+
30+
# Create and initialize project
31+
mkdir $APP_NAME \
32+
&& cd $APP_NAME \
33+
&& lando init \
34+
--source cwd \
35+
--recipe drupal11 \
36+
--webroot web \
37+
--name $APP_NAME
38+
39+
# Start environment and install Drupal CMS
40+
lando start
41+
lando composer create-project drupal/cms tmp && cp -r tmp/. . && rm -rf tmp
42+
lando drush site:install --db-url=mysql://drupal11:drupal11@database/drupal11 -y
43+
44+
# Get site URL to login
45+
lando drush user:login --uri="$(lando info -s appserver --path 'urls[1]' | tr -d '\n' | tr -d "'")"
46+
```
47+
48+
```powershell:no-line-numbers [PowerShell]
49+
# Prompt for app name (or change this line to set it directly)
50+
$APP_NAME = Read-Host "Enter your app name [my-drupalcms-app]: "
51+
if ([string]::IsNullOrWhiteSpace($APP_NAME)) { $APP_NAME = "my-drupalcms-app" }
52+
53+
# Create and initialize project
54+
mkdir $APP_NAME; `
55+
cd $APP_NAME; `
56+
lando init `
57+
--source cwd `
58+
--recipe drupal11 `
59+
--webroot web `
60+
--name $APP_NAME
61+
62+
# Start environment and install Drupal CMS
63+
lando start
64+
lando composer create-project drupal/cms tmp; cp -r tmp/* .; rm -rf tmp
65+
lando drush site:install --db-url=mysql://drupal11:drupal11@database/drupal11 -y
66+
67+
# Get the login link
68+
lando drush user:login --uri="$(lando info -s appserver --path 'urls[1]' | tr -d '\n' | tr -d "'")"
69+
```
70+
71+
:::
72+
73+
</details>
74+
75+
## Prerequisites
76+
77+
Before starting, you'll need:
78+
79+
1. [Lando installed on your system](https://docs.lando.dev/getting-started/installation.html)
80+
2. Basic familiarity with command line tools
81+
3. A terminal application
82+
83+
## Installation Steps
84+
85+
1. **Create and enter project directory**
86+
87+
First, we'll create a new directory for our Drupal CMS project files and navigate into it:
88+
89+
```bash:no-line-numbers
90+
mkdir my-drupalcms-app
91+
cd my-drupalcms-app
92+
```
93+
94+
2. **Initialize a new Lando app with Drupal 11 recipe**
95+
96+
Now that we have our project directory, let's set up the Lando configuration. We'll use the `lando init` command to create a `.lando.yml` file that will define our development environment. We'll tell it to use the `drupal11` recipe since that's what Drupal CMS is built on, and specify that our web files will live in a 'web' directory:
97+
98+
```bash:no-line-numbers
99+
lando init \
100+
--source cwd \
101+
--recipe drupal11 \
102+
--webroot web \
103+
--name my-drupalcms-app
104+
```
105+
106+
3. **Start the Lando environment**
107+
108+
With the Lando configuration in place, start the development environment by running the command below. This
109+
will take a few minutes the first time as Lando downloads and configures everything needed to host Drupal CMS locally:
110+
111+
```bash:no-line-numbers
112+
lando start
113+
```
114+
115+
4. **Install Project Files via Composer**
116+
117+
Now that the environment is running, we use Composer to download and install the Drupal CMS project files.
118+
119+
```bash:no-line-numbers
120+
lando composer create-project drupal/cms tmp && cp -r tmp/. . && rm -rf tmp
121+
```
122+
123+
5. **Install Drupal**
124+
125+
With the environment running and the project files in place, we need to configure Drupal to use Lando's database service, create the database, and run Drupal's installation process. Fortunately, Drush makes this easy with its `site:install` command:
126+
127+
```bash:no-line-numbers
128+
lando drush site:install --db-url=mysql://drupal11:drupal11@database/drupal11 -y
129+
```
130+
131+
## Post-Installation
132+
133+
Now that Drupal CMS is installed and running, it's time to login. We'll use the `lando drush user:login` command to generate a one-time login link:
134+
135+
```bash:no-line-numbers
136+
lando drush user:login --uri="$(lando info -s appserver --path 'urls[1]' | tr -d '\n' | tr -d "'")"
137+
```
138+
139+
2. Start exploring the [Drupal CMS interface](https://new.drupal.org/docs/drupal-cms/get-started/get-to-know-drupal-cms/getting-around-drupal-cms) and its features like:
140+
- The Dashboard
141+
- Content management tools
142+
- Built-in SEO tools
143+
- [Smart default recipes](https://new.drupal.org/docs/drupal-cms/get-started/get-to-know-drupal-cms/adding-functionality-with-smart-defaults) for common functionality
144+
- [AI tools](https://new.drupal.org/docs/drupal-cms/get-to-know-drupal-cms/ai-tools-in-drupal-cms) for site administrators and content creators
145+
146+
## Customizing Your Setup
147+
148+
Lando's Drupal plugin offers many configuration options. You can customize:
149+
150+
- PHP version
151+
- Web server (Apache or Nginx)
152+
- Database backend (MySQL, MariaDB, or PostgreSQL)
153+
- Composer version
154+
- And more
155+
156+
For detailed configuration options, see the [Lando Drupal Plugin Configuration Documentation](https://docs.lando.dev/plugins/drupal/config.html).
157+
158+
## Starting and Stopping
159+
160+
- To stop your local environment: `lando stop`
161+
- To start it again: `lando start`
162+
- To rebuild the environment: `lando rebuild`
163+
164+
## Next Steps
165+
166+
Now that you have Drupal CMS running locally, you can:
167+
168+
1. [Get familiar with the Drupal CMS features and interface](https://new.drupal.org/docs/drupal-cms/get-started/get-to-know-drupal-cms)
169+
170+
## Troubleshooting
171+
172+
If you encounter issues during installation:
173+
174+
- Try running `lando rebuild -y` to rebuild your app with the latest configuration
175+
- Check Lando's [troubleshooting guide](https://docs.lando.dev/help/troubleshooting.html)
176+
- Join the [Lando Slack](https://www.launchpass.com/devwithlando) for community support
177+
178+
Remember to check the [Drupal CMS documentation](https://drupal.org/docs/drupal-cms) for detailed information about working with Drupal CMS.

0 commit comments

Comments
 (0)