Skip to content

Commit f165912

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

File tree

4 files changed

+188
-3
lines changed

4 files changed

+188
-3
lines changed

CHANGELOG.md

Lines changed: 1 addition & 2 deletions
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

Lines changed: 5 additions & 1 deletion
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/getting-started.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ mkdir my-drupalcms-app \
5555
--recipe drupal11 \
5656
--webroot web \
5757
--name my-drupalcms-app
58+
--full
5859
5960
# Start the environment
6061
lando start

docs/guides/drupal-cms.md

Lines changed: 181 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,181 @@
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+
--full
39+
40+
# Start environment and install Drupal CMS
41+
lando start
42+
lando composer create-project drupal/cms tmp && cp -r tmp/. . && rm -rf tmp
43+
lando drush site:install --db-url=mysql://drupal11:drupal11@database/drupal11 -y
44+
45+
# Get site URL to login
46+
lando drush uli --uri="$(lando info -s appserver --path 'urls[1]')"
47+
```
48+
49+
```powershell:no-line-numbers [PowerShell]
50+
# Prompt for app name (or change this line to set it directly)
51+
$APP_NAME = Read-Host "Enter your app name [my-drupalcms-app]: "
52+
if ([string]::IsNullOrWhiteSpace($APP_NAME)) { $APP_NAME = "my-drupalcms-app" }
53+
54+
# Create and initialize project
55+
mkdir $APP_NAME; `
56+
cd $APP_NAME; `
57+
lando init `
58+
--source cwd `
59+
--recipe drupal11 `
60+
--webroot web `
61+
--name $APP_NAME
62+
--full
63+
64+
# Start environment and install Drupal CMS
65+
lando start
66+
lando composer create-project drupal/cms tmp; cp -r tmp/* .; rm -rf tmp
67+
lando drush site:install --db-url=mysql://drupal11:drupal11@database/drupal11 -y
68+
69+
# Get site URL to login
70+
lando drush uli --uri="$(lando info -s appserver --path 'urls[1]')"
71+
```
72+
73+
:::
74+
75+
</details>
76+
77+
## Prerequisites
78+
79+
Before starting, you'll need:
80+
81+
1. [Lando installed on your system](https://docs.lando.dev/getting-started/installation.html)
82+
2. Basic familiarity with command line tools
83+
3. A terminal application
84+
85+
## Installation Steps
86+
87+
1. **Create and enter project directory**
88+
89+
First, we'll create a new directory for our Drupal CMS project files and navigate into it:
90+
91+
```bash:no-line-numbers
92+
mkdir my-drupalcms-app
93+
cd my-drupalcms-app
94+
```
95+
96+
2. **Initialize a new Lando app with Drupal 11 recipe**
97+
98+
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:
99+
100+
```bash:no-line-numbers
101+
lando init \
102+
--source cwd \
103+
--recipe drupal11 \
104+
--webroot web \
105+
--name my-drupalcms-app \
106+
--full
107+
```
108+
109+
3. **Start the Lando environment**
110+
111+
With the Lando configuration in place, start the development environment by running the command below. This
112+
will take a few minutes the first time as Lando downloads and configures everything needed to host Drupal CMS locally:
113+
114+
```bash:no-line-numbers
115+
lando start
116+
```
117+
118+
4. **Install Project Files via Composer**
119+
120+
Now that the environment is running, we use Composer to download and install the Drupal CMS project files.
121+
122+
```bash:no-line-numbers
123+
lando composer create-project drupal/cms tmp && cp -r tmp/. . && rm -rf tmp
124+
```
125+
126+
5. **Install Drupal**
127+
128+
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:
129+
130+
```bash:no-line-numbers
131+
lando drush site:install --db-url=mysql://drupal11:drupal11@database/drupal11 -y
132+
```
133+
134+
## Post-Installation
135+
136+
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:
137+
138+
```bash:no-line-numbers
139+
lando drush user:login --uri="$(lando info -s appserver --path 'urls[1]')"
140+
```
141+
142+
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:
143+
- The Dashboard
144+
- Content management tools
145+
- Built-in SEO tools
146+
- [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
147+
- [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
148+
149+
## Customizing Your Setup
150+
151+
Lando's Drupal plugin offers many configuration options. You can customize:
152+
153+
- PHP version
154+
- Web server (Apache or Nginx)
155+
- Database backend (MySQL, MariaDB, or PostgreSQL)
156+
- Composer version
157+
- And more
158+
159+
For detailed configuration options, see the [Lando Drupal Plugin Configuration Documentation](https://docs.lando.dev/plugins/drupal/config.html).
160+
161+
## Starting and Stopping
162+
163+
- To stop your local environment: `lando stop`
164+
- To start it again: `lando start`
165+
- To rebuild the environment: `lando rebuild`
166+
167+
## Next Steps
168+
169+
Now that you have Drupal CMS running locally, you can:
170+
171+
1. [Get familiar with the Drupal CMS features and interface](https://new.drupal.org/docs/drupal-cms/get-started/get-to-know-drupal-cms)
172+
173+
## Troubleshooting
174+
175+
If you encounter issues during installation:
176+
177+
- Try running `lando rebuild -y` to rebuild your app with the latest configuration
178+
- Check Lando's [troubleshooting guide](https://docs.lando.dev/help/troubleshooting.html)
179+
- Join the [Lando Slack](https://www.launchpass.com/devwithlando) for community support
180+
181+
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)