Skip to content

docs: move composer install instructions to setup/install.md (#75) #236

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 1 addition & 26 deletions architecture/using-composer.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,32 +13,7 @@ Composer is the de-facto standard for package management in the PHP ecosystem, a

## Installing Winter via Composer

Installing Winter via Composer is easy. You can use the `create-project` command through Composer to quickly set up a new Winter installation.

```bash
composer create-project wintercms/winter <your installation directory> [version]

# Example:
# composer create-project wintercms/winter mywinter
# or
# composer create-project wintercms/winter ./ "dev-develop"
```

### Configuring Winter

If you have used `create-project` to create your Winter project it will automatically run the following commands for you:

- [`winter:install`](../console/setup-maintenance#install-winter-via-command-line) (the CLI installation wizard)
- [`winter:env`](../console/setup-maintenance#configure-winter-through-an-environment-file) (populates the `.env` file from the configuration files)
- [`winter:mirror public --relative`](../console/setup-maintenance#mirror-public-files) (sets up the project to use a public folder, recommended for security)

You can either go through this wizard to configure your project or you can cancel with (`Ctrl+C`) and manually reviewing and make changes to the configuration files located in `config/*.php`. If you take the manual approach, note that you will also need to run `php artisan migrate` to migrate the database yourself after configuring the project.

> **NOTE:** When running commands on your Winter project, make sure that you are located in the project root directory first (following the previous example you can run `cd mywinter`).

### Completing installation

Once the above commands have been run, refer to the [Post Installation steps](../setup/installation#post-installation-steps) on the Installation page to complete the process.
For full Composer installation instructions, please refer to the [Installation via Composer](../setup/installation.md#installation-via-composer) section of the Installation guide.

## Installing a plugin or theme using Composer

Expand Down
12 changes: 10 additions & 2 deletions setup/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ description: "Documentation on the different ways to install Winter CMS for your

There are three ways you can install Winter:

1. Using the [Composer package manager](../architecture/using-composer#installing-winter-via-composer) (if you are comfortable using the command line)
1. Using the [Composer package manager](#installation-via-composer) (if you are comfortable using the command line)
2. The [Web-based installer](#web-based-installation) (most similar to the WordPress web installer)
3. Using the [Softaculous installler](https://www.softaculous.com/apps/cms/WinterCMS) (if your hosting provider supports it).

Expand Down Expand Up @@ -42,7 +42,7 @@ When using the SQL Server database engine, you will need to install the [group c

The [Web Installer](https://github.com/wintercms/web-installer) is the recommended way to install Winter for **non-technical users**. It is simpler than the command-line installation and doesn't require any special skills.

> **NOTE:** If you are a developer, we recommend that you [install via Composer instead](../architecture/using-composer#installing-winter-via-composer)
> **NOTE:** If you are a developer, we recommend that you [install via Composer instead](#installation-via-composer)

1. Prepare an empty directory on the web server that will host your Winter CMS installation. It can be a main domain, sub-domain or subfolder.
2. [Download the "install.zip" file](https://github.com/wintercms/web-installer/releases/latest/download/install.zip) from the latest release of the Winter CMS Web Installer into this folder.
Expand All @@ -51,6 +51,14 @@ The [Web Installer](https://github.com/wintercms/web-installer) is the recommend
5. In your web browser, navigate to the URL pointing to that folder, and include `/install.html` at the end of the URL.
6. Follow the instructions given in the installer.

## Installation via Composer

For users familiar with command-line tools, Composer offers an efficient way to install Winter CMS:

```bash
composer create-project wintercms/winter my-project
```

![Winter CMS Installer](https://raw.githubusercontent.com/wintercms/docs/develop/images/web-installer.jpg)

### Troubleshooting a web-based installation
Expand Down