To avoid confusions we have decided to give the same behaviour to the `npm run start` and `strapi start` commands. To do so we had to introduce a new `strapi develop` command to run your project in `watch` mode.
One of our main objectives for the `beta` is to make it easier and quicker to upgrade to more recent versions of Strapi. This is why starting from now, plugins will be located in the `node_modules` folder.
If you installed a plugin but never modified any file inside `./plugins/pluginName/**/*`, you can remove the `./plugins/pluginName` folder.
### Migrating customized plugin
If you have made some modifications in one of your plugins you will have to do some manual migrations.
The main principle is to keep only the files you modify and move them to the `./extensions/pluginName` folder.
Read the following instructions for more details.
#### Config
When customizing configurations you only need to move the modified files.
Strapi merges the plugin's configurations with the ones in `./extensions/pluginName/config`. Hence you should also only add the fields that you modified in your custom configurations files.
**Before**
`./plugins/graphql/config/settings.json`
```json
{
"endpoint": "/graphql", // default
"tracing": false, // default
"shadowCRUD": true, // default
"playgroundAlways": false, // default
"depthLimit": 2,
"amountLimit": 25
}
```
**After**
`./extensions/graphql/config/settings.json`
```json
{
"depthLimit": 2,
"amountLimit": 25
}
```
#### Routes
If you modified `./plugins/pluginName/config/routes.json` you will have to copy the file to `./extentions/pluginName/config/routes.json` and only keep the routes you customized or added.
All the unchanged routes must be removed from this file.
**Before**
`./plugins/users-permissions/config/routes.json`
```json
{
"routes": [
{
"method": "GET",
"path": "/",
"handler": "UsersPermissions.customIndex",
"config": {
"policies": []
}
},
{
"method": "GET",
"path": "/init",
"handler": "UsersPermissions.init",
"config": {
"policies": [],
"description": "Check if the first admin user has already been registered",
To migrate controllers and services you must move your customized controllers and services to the `./extensions/pluginName/**/*`, delete all the non customized ones and keep only the methods you modified in your customized files·
For example if you have a `customIndex` action in the `User` controller you only have to create the `./extensions/users-permissions/controllers/User.js` file and keep your `customIndex` action in it. You can delete the rest of the files and methods.
If you have modified (or cre ated relations) with a plugin's model you will have to move your Model file to `./extensions/pluginName/models/Model.settings.json`
Read more about [controllers](https://strapi.io/documentation/3.0.0-beta.x/guides/controllers.html) or [services](https://strapi.io/documentation/3.0.0-beta.x/guides/services.html)
For custom `controllers` and `services` (the ones without a model) you can leave them untouched.
### Migrating routes
In the file `./api/apiName/config/routes.json` we renamed the `destroy` action to `delete` you will have to update your `routes` and `controller` accordingly.
Customizing the admin is as simple as creating a file in the `./admin` folder of your app. You need to make sure the file you want to customize is at the same location in your `./admin` folder as it is in the `strapi-admin` package. For a reference you can look at the [source code](https://github.com/strapi/strapi/tree/master/packages/strapi-admin/admin).
For the beta there are quite a lot of changes made to the admin. If you did customize things you will have to verifiy if the file still exists in the [source code](https://github.com/strapi/strapi/tree/master/packages/strapi-admin/admin) or find its new location.
The beta introduces a new `Administrator` model that has been created with the purpose of letting people access the Strapi's administration panel (in the short term this model is not editable). In this way, it replaces the previous `User` model from the `users-permissions` plugin.
With this new model, you now have a clear distinction between the people that are allowed to access the administration panel, and the users of the application you are building with Strapi.
More practically, it means that you will have a new strapi_administrator collection that will be created automatically in your database.
On startup, this table will be empty so, when migrating from alpha to beta, you can either create this new administrator user with the registeration page OR manually migrate your previous users with `administrator` role.
### Cleaning up the `users-permissions.users` collection
If you only used the `administrator` role to give access to the admin panel to certain users, and never used this role for your application business logic; you can delete the role.
If you haven't created any relation with the `User` model in your `Content Types` and don't use those users in your application business logic; you can remove every user you have migrated to the `strapi_administrator` collection.
Finally, if you have chosen to migrate your previous admin users in the new `strapi_administrator` collection and your `User` model has at least one relation with another model you may need to keep both collections in sync
**Example**: Some of your application users can edit their profile and access the admin panel. If theyy change their email you need to make sure their `administrator` entity also changes email.
::: warning
We really recommend separating you users from your administrators to avoid this situation which is not a good practice.
To run your migrated project you will now need to run `strapi develop` or `npm run develop` to run the project in watch mode (e.g auto reloading on content-type creation).
To run strapi without watch mode then run `strapi start` or `npm run start`
Finally if you want to run your project in different envrionments use `NODE_ENV=env npm run start`
If you are deploying your Strapi project with the Admin panel together, you will have to make sure the `build` script runs before running the project. (e.g `npm run build`)
Depending on your deployment environment you might have to run the `build` script with `NODE_ENV=production npm run build` if the envrionment doesn't include it by default.
Previously you could run your project by running `node server.js`. As we remove the `server.js` file you will have to either run `npm run start` or create a `server.js` file (read more [here](#migrating-server.js))
#### PM2
if you are using pm2 to run your application in production you can update your script like so
**Before**
```bash
NODE_ENV=production pm2 start server.js
```
**After**
```bash
NODE_ENV=production pm2 start npm -- start
```
If you are using an `ecosystem.config.js` you can do the following