background
I have a server that doesn't provide ssh access and zip online extraction, but can install flarum using its one-click installer, so I started thinking about a solution.
Solutions
- Install flarum using the one-click installation program, and download /vendor directory and composer.lock and composer.json from the server
- Run the composer command locally (linux is highly recommended, windows can use linux subsystem, Android can use termux)
- Open composer.json to confirm that the file content has changed (in case composer does nothing)
- Upload composer.lock, composer.json, /vendor/......(new plug-in folder, you can compare the server file to find), /vendor/composer. If there are existing files overwritten
At this time, check the background. If there are more new plug-ins, it indicates success.
advantages
- Perfect problem solving
- Upload minimal files
教程:怎么在本地配置flarum
背景
我有一个服务器,它不提供ssh访问和zip在线解压,但是可以使用其提供的一键安装程序安装flarum,于是我开始思考解决方法。
解决方法
- 使用一键安装程序安装flarum,并从服务器下载/vendor目录和composer.lock、composer.json
- 在本地运行composer命令(强烈建议使用linux系统,windows可使用linux子系统,安卓可使用termux)
- 打开composer.json确认文件内容已更改(防止composer啥也没干)
- 上传composer.lock,composer.json,/vendor/......(新的插件文件夹,可以对比服务器端文件找到),/vendor/composer。如有已有文件覆盖即可
此时查看后台,如果多出新的插件,则代表成功。
优点
- 完美解决问题
- 只上传最少的文件