Skip to content

Commit eaafe9d

Browse files
committed
add update version page and snippets
1 parent 9464090 commit eaafe9d

File tree

7 files changed

+142
-1
lines changed

7 files changed

+142
-1
lines changed

.vscode/settings.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"spellright.language": [
3+
"en"
4+
],
5+
"spellright.documentTypes": [
6+
"markdown",
7+
"latex",
8+
"plaintext"
9+
]
10+
}
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
---
2+
title: Update
3+
displayed_sidebar: devDocsSidebar
4+
description: The following documentation covers how to upgrade your application to the latest version of Strapi.
5+
canonicalUrl: https://docs.strapi.io/developer-docs/latest/update-migration-guides/update-version.html
6+
---
7+
import InstallCommand from '/docs/snippets/install-npm-yarn.md'
8+
import BuildCommand from '/docs/snippets/build-npm-yarn.md'
9+
import DevelopCommand from '/docs/snippets/develop-npm-yarn.md'
10+
11+
# Upgrade Strapi version
12+
13+
Strapi periodically releases code improvements through upgrades. Upgrades contain no breaking changes and are announced in both the terminal and in the administration panel. [Migration guides](/dev-docs/update-migration-guides/migration-guides) are provided whenever a new Strapi version includes breaking changes.
14+
15+
:::caution
16+
[Plugins extension](/dev-docs/plugins/users-permissions) that create custom code or modify existing code will need to be updated and compared to the changes in the repository. Not updating the plugin extensions could break the application.
17+
:::
18+
19+
## Upgrade the dependencies
20+
21+
:::prerequisites
22+
23+
- Stop the server before starting the upgrade.
24+
- Confirm there are no [migrations](/dev-docs/update-migration-guides/migration-guides) between the current and ultimate Strapi versions.
25+
:::
26+
27+
1. Upgrade all of the Strapi packages version numbers in `package.json` to the latest stable Strapi version:
28+
29+
```jsx
30+
// path: package.json
31+
32+
{
33+
// ...
34+
"dependencies": {
35+
"@strapi/strapi": "4.7.0",
36+
"@strapi/plugin-users-permissions": "4.7.0",
37+
"@strapi/plugin-i18n": "4.7.0",
38+
"better-sqlite3": "7.4.6"
39+
// ...
40+
}
41+
}
42+
43+
```
44+
45+
2. Save the edited `package.json` file.
46+
47+
3. <InstallCommand components={props.components} />
48+
49+
## Rebuild the application
50+
51+
Rebuild the administration panel:
52+
53+
<BuildCommand components={props.components} />
54+
55+
## Start the application
56+
57+
Start the application and ensure that everything is working as expected:
58+
59+
<DevelopCommand components={props.components} />
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<Tabs groupId="yarn-npm">
2+
3+
<TabItem value="yarn" label="yarn">
4+
5+
```bash
6+
yarn build
7+
```
8+
9+
</TabItem>
10+
11+
<TabItem value="npm" label="npm">
12+
13+
```bash
14+
npm run build
15+
```
16+
17+
</TabItem>
18+
19+
</Tabs>
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<Tabs groupId="yarn-npm">
2+
3+
<TabItem value="yarn" label="yarn">
4+
5+
```bash
6+
yarn develop
7+
```
8+
9+
</TabItem>
10+
11+
<TabItem value="npm" label="npm">
12+
13+
```bash
14+
npm run develop
15+
```
16+
17+
</TabItem>
18+
19+
</Tabs>
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
Install the upgraded version:
2+
3+
<Tabs groupId="yarn-npm">
4+
5+
<TabItem value="yarn" label="yarn">
6+
7+
```bash
8+
yarn
9+
```
10+
11+
</TabItem>
12+
13+
<TabItem value="npm" label="npm">
14+
15+
```bash
16+
npm install
17+
```
18+
19+
</TabItem>
20+
21+
</Tabs>
22+
23+
:::tip
24+
If the operation doesn't work, try removing your `yarn.lock` or `package-lock.json`. If that doesn't help, remove the `node_modules` folder as well and try again.
25+
:::

docusaurus/docs/status.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ The following list is a sitemap of all the current and upcoming content for the
146146
- [x] [Sentry](dev-docs/plugins/sentry)
147147
- [x] [API Documentation](dev-docs/plugins/documentation)
148148
- [ ] ♻️ Update & Migration
149-
- [ ] Update (→ [docs.strapi.io](https://docs.strapi.io/developer-docs/latest/update-migration-guides/update-version.html))
149+
- [x] Update (→ [docs.strapi.io](https://docs.strapi.io/developer-docs/latest/update-migration-guides/update-version.html))
150150
- [ ] Migration
151151
- [ ] v4 migration guides (→ [docs.strapi.io](https://docs.strapi.io/developer-docs/latest/update-migration-guides/migration-guides.html))
152152
- [ ] v3 to v4 migration guides (→ [docs.strapi.io](#))

docusaurus/sidebars.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,10 +291,19 @@ const sidebars = {
291291

292292

293293

294+
]
295+
},
296+
{
297+
type: 'category',
298+
collapsed: false,
299+
label: 'Update and Migration',
300+
items: [
301+
'dev-docs/update-version'
294302
]
295303
},
296304
],
297305

306+
298307

299308
userDocsSidebar: [
300309
'user-docs/intro',

0 commit comments

Comments
 (0)