Skip to content

Commit 668e9dd

Browse files
committed
Improve Ubuntu guide with feedback from a recent Github Discussion
1 parent be6d093 commit 668e9dd

File tree

1 file changed

+23
-3
lines changed

1 file changed

+23
-3
lines changed

content/collections/docs/ubuntu.md

+23-3
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,22 @@ Now you can check to make sure Composer is installed and configured correctly by
5252
composer
5353
```
5454

55+
## Install Statamic CLI
56+
57+
Next up, let's install the Statamic CLI. To do this, run the following command in your terminal:
58+
59+
``` shell
60+
composer global require statamic/cli
61+
```
62+
63+
Upon installation, you can now use the `statamic new` command to spin up fresh Statamic sites with a CLI setup wizard 🧙‍♂️ to guide you through a variety of settings and options.
64+
65+
Our CLI is essentially a super fancy wrapper around the `composer create-project` command. You can choose to not install it, but only at your own annoyance.
66+
5567

5668
## Create a new Statamic Application
5769

58-
Now we'll create a new Statamic application using the `composer create-project` command.
70+
Now we'll create a new Statamic application using the `statamic new` command.
5971

6072
First, navigate to the `/var/www` directory:
6173

@@ -66,11 +78,15 @@ cd /var/www
6678
Next, run the following install command:
6779

6880
``` shell
69-
composer create-project --prefer-dist statamic/statamic example.com
81+
statamic new example.com
7082
```
7183

7284
:::tip
73-
Alternatively, you could git clone an **existing project** instead of installing a new empty site.
85+
If you run into a TTY error like `TTY mode requires /dev/tty to be read/writable`, you can simulate TTY by calling `script` and using the `--no-interaction` flag.
86+
87+
```
88+
script -q -c "statamic new --no-interaction example.com"
89+
```
7490
:::
7591

7692
## Set Permissions
@@ -189,3 +205,7 @@ Now visit your IP Address or `https://example.com` (but like the actual domain)
189205
That's pretty much it. Time for you to take it from here.
190206

191207
If this is your production server, you'll probably want to add cache expiry headers and so on, but those rules and what you cache to the browser are all up to you.
208+
209+
There are many other variables at play when building your own server. It's unrealistic to think we've covered them all here, or that this article won't get out of date at times as things change.
210+
211+
If you run into issues not covered here, you may want to read through [this discussion](https://github.com/statamic/cms/discussions/10487) where several folks work through many edge cases happening all at once.

0 commit comments

Comments
 (0)