在Heroku上部署WordPress?

时间:2019-05-04 04:02:52

标签: 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:

3 个答案:

答案 0 :(得分:2)

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

因此只需在根目录(与wp-config处于同一级别)上添加没有任何依赖关系的composer.json即可正常运行

答案 1 :(得分:0)

github repository包含Wordpress的composer.json。

答案 2 :(得分:0)

Heroku上有一个用于WordPress的特殊存储库。

https://github.com/php4dev/heroku-wordpress