Skip to content

Commit

Permalink
chore: improve 2.0 install/update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
SychO9 committed Dec 6, 2024
1 parent 211abed commit f7285d3
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 9 deletions.
2 changes: 1 addition & 1 deletion docs/extend/database.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Database

Flarum supports a variety of database systems, including MySQL, PostgreSQL, and SQLite. Most extensions will not have to worry about the specifics of the database system, as [Laravel's query builder](https://laravel.com/docs/11.x/queries) handles the differences between them. However, you can still run into instances where you need to write certain database operations differently depending on the database system. This section aims to document some of the common pitfalls and solutions.
Flarum supports a variety of database systems, including MySQL, MariaDB, PostgreSQL, and SQLite. Most extensions will not have to worry about the specifics of the database system, as [Laravel's query builder](https://laravel.com/docs/11.x/queries) handles the differences between them. However, you can still run into instances where you need to write certain database operations differently depending on the database system. This section aims to document some of the common pitfalls and solutions.

:::warning

Expand Down
8 changes: 7 additions & 1 deletion docs/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ Feel free to give Flarum a spin on one of our [demonstration forums](https://dis

:::

:::warning

Flarum 2.0 is currently in beta. It is not ready for production use.

:::

## Server Requirements

Before you install Flarum, it's important to check that your server meets the requirements. To run Flarum, you will need:
Expand Down Expand Up @@ -41,7 +47,7 @@ If you don't have SSH access to your server, or you prefer not to use the comman
Flarum uses [Composer](https://getcomposer.org) to manage its dependencies and extensions. If you're not familiar with it, read [our guide](composer.md) for information on what it is and how to set it up. Afterwards, run this command in an empty location that you want Flarum to be installed in:

```bash
composer create-project flarum/flarum .
composer create-project flarum/flarum:^2.0.0-beta .
```

While this command is running, you can configure your web server. You will need to make sure your webroot is set to `/path/to/your/forum/public`, and set up [URL Rewriting](#url-rewriting) as per the instructions below.
Expand Down
34 changes: 27 additions & 7 deletions docs/update.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,24 @@
# Updating

:::warning

Flarum 2.0 is currently in beta. It is not ready for production use. Please wait for the stable release before updating your forum.

:::

## From the Admin Dashboard

:::info

If you have the extension manager extension installed you can simply run the update from its interface and skip this page entirely.
If you have the [extension manager](./extensions#extension-manager) extension installed you can simply run the update from its interface and skip the general steps. You should still read the ["Major Version Update Guide"](#major-version-update-guides) if you are updating from v1 to v2.

:::

---

To update Flarum, you'll need to use [Composer](https://getcomposer.org). If you're not familiar with it (although you should be, because you need it to install Flarum), read [our guide](composer.md) for information on what it is and how to set it up.

If updating across major versions (e.g. <=0.1.0 to 1.x.x, 1.x.x to 2.x.x, ...), make sure to read the appropriate "major version update guide" before running the general upgrade steps.
If updating across major versions (e.g. <=0.1.0 to 1.x.x, 1.x.x to 2.x.x, ...), make sure to read the appropriate ["Major Version Update Guide"](#major-version-update-guides) before running the general upgrade steps.

## General Steps

Expand Down Expand Up @@ -40,11 +46,25 @@ php flarum cache:clear

### Updating from v1 (^1.0.0) to v2 (^2.0.0)

1. Do steps 1-5 above.
2. Change the version strings of all bundled extensions (`flarum/tags`, `flarum/mentions`, `flarum/likes`, etc) in `composer.json` from `^1.0` (or `^1.8`, ...etc) to `*`.
3. Change `flarum/core`'s version string in `composer.json` from `^1.0` (or `^1.8`, ...etc) to `^2.0`.
4. Preferably set the `"minimum-stability": "beta",` line in your `composer.json` to `stable` unless you are still using a beta third party extension.
5. Do steps 6 and 7 above.
1. If you are using a MariaDB database, you should change the driver in `config.php` from `mysql` to `mariadb`:
```php
<?php return array (
'debug' => true,
'offline' => false,
'database' =>
array (
// remove-next-line
'driver' => 'mysql',
// insert-next-line
'driver' => 'mariadb',
'host' => 'localhost',
'port' => 3306,
```
2. Do steps 1-5 above.
3. Change the version strings of all bundled extensions (`flarum/tags`, `flarum/mentions`, `flarum/likes`, etc) in `composer.json` from `^1.0` (or `^1.8`, ...etc) to `*`.
4. Change `flarum/core`'s version string in `composer.json` from `^1.0` (or `^1.8`, ...etc) to `^2.0`.
5. Preferably set the `"minimum-stability": "beta",` line in your `composer.json` to `stable` unless you are still using a beta third party extension.
6. Do steps 6 and 7 above.

## Troubleshooting Issues

Expand Down

0 comments on commit f7285d3

Please sign in to comment.