wordpress - 在 Heroku 上部署 WordPress?

标签 wordpress heroku

我正在尝试在 Heroku 上部署 WordPress,出现错误,并且我遇到了更新和安装插件或主题的问题,应该在本地完成,然后推送到 Heroku。那么媒体(图片和视频)又如何

  remote:  !     WARNING: No 'composer.json' found!
    remote:  !
    remote:  !     Your project only contains an 'index.php', no 'composer.json'.
    remote:  !
    remote:  !     Using 'index.php' to declare app type as PHP is deprecated and
    remote:  !     may lead to unexpected behavior.
    remote:  !
    remote:  !     Please consider updating your codebase to utilize Composer and
    remote:  !     modern dependency management in order to benefit from the latest
    remote:  !     PHP runtimes and improved application performance, as well as
    remote:  !     control over the PHP versions and extensions available.
    remote:  !
    remote:  !     For an introduction to dependency management with Composer and
    remote:  !     how to get the most out of PHP on Heroku, refer to the docs at
    remote:  !     https://getcomposer.org/doc/00-intro.md and
    remote:  !     https://devcenter.heroku.com/articles/getting-started-with-php
    remote:

最佳答案

要部署任何基于 PHP 的应用程序 CMS/FW,您需要在根目录添加 composer.json,因为 Heroku 默认将运行 Composer 安装。

因此,只需在根目录中添加不带任何依赖项的composer.json(与 wp-config 相同的级别)即可完美运行

关于wordpress - 在 Heroku 上部署 WordPress?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55979339/

相关文章:

wordpress - anchor 标记中的onclick和href重定向

arrays - 使用 update_user_meta 保存数组

wordpress - Beaver Builder 插件模板有时没有响应

javascript - Nodejs服务器: Failed to load resource: the server responded with a status of 404 (Not Found)

node.js - 两个独立的 Heroku(Node 后端和 React 前端)之间的通信?

java - 部署到 Heroku 时找不到 Play Framework 2.3.6 (Java) javascript 和样式表

heroku - Sinatra config.ru 加载错误

html - 我的 WordPress 主题是连字符,无法使用 CSS 将其关闭

javascript - WordPress:在javascript中获取页面语言

node.js - Node 中的 Server.listen() 给出 "Error [ERR_SERVER_ALREADY_LISTEN]: Listen method has been called more than once without closing."