[学習週] HerokuにWordPressをインストール。プラグインを試す。
昨日に引き続き、下記を参考にWordPressをHerokuに立ち上げるべく作業します:
WordPressのブログをherokuで立ち上げて、何かメリットあるの? http://blog.mah-lab.com/2013/05/01/wordpress-on-heroku/
Herokuへのpushに失敗する。buildpackが原因。。
% git push heroku master Counting objects: 1209, done. Delta compression using up to 4 threads. Compressing objects: 100% (1177/1177), done. Writing objects: 100% (1209/1209), 5.93 MiB | 314 KiB/s, done. Total 1209 (delta 91), reused 0 (delta 0) -----> Fetching custom git buildpack... failed ! Push rejected, error fetching custom buildpack To [email protected]:satoko-wordpress.git ! [remote rejected] master -> master (pre-receive hook declined) error: failed to push some refs to '[email protected]:satoko-wordpress.git'
なんら、pushに失敗するなと思ったら、どうやらアプリ作成の時に、buildbackという、herokuでapp(php)を動かすためのbuildbackを指定してなかったらしい。
Heroku appに後からbuidlpackを指定する
紹介されていたコマンドをよく見ていませんでした:
heroku create [アプリ名] -s cedar -b git://github.com/iphoting/heroku-buildpack-php-tyler.git
-bでbuildpackの指定を行っていたようです。 もうcreateしてしまった後なので、後からbuildbackを指定する方法で指定します:
You can change the buildpack for an existing app using the BUILDPACK_URL config var:
heroku config:set BUILDPACK_URL=https://github.com/some/buildpack.git -a myapp
https://devcenter.heroku.com/articles/third-party-buildpacks#using-a-custom-buildpack
先に挙げたコマンド内で使っているbuildpackを使って、設定しました:
heroku config:set BUILDPACK_URL=https://github.com/iphoting/heroku-buildpack-php-tyler.git -a satoko-wordpress
この後、pushも完了。インストールも済んで、WordPressのサンプルのページも表示されました。
初期インストール時のClearDBのサイズ
素のwordpressを入れたところ、ClearDBの0.53MBでした。 (しまった、スクリーンキャプチ忘れました)
WordPressのサイト構築例を決める
架空のパン屋、旅館、自転車実業団チーム(赤基調)...全然思いつきません。 とりあえず、シンプルで販売系の機能付きができたらいいなと。とりあえず、プラグインのいくつか見てみて、どういうのにしようか考えようと思います。
インストールしたプラグイン:installed wordpress plugin
プラグインのインストールは、[wordpress-root]/wp-content/plugins ディレクトリにプラグインのフォルダをコピーして、pushすればOK。 ショッピングカートプラグインと、画像販売プラグインをインストールしてみました。
WP e-Commerce is a free WordPress Shopping Cart Plugin that lets customers buy your products, services and digital downloads online. http://wordpress.org/plugins/wp-e-commerce/
Image Store (ImStore) is a photo gallery and store plugin for WordPress with Paypal and Google Checkout integration. http://wordpress.org/plugins/image-store/
資料:References
buildpackとslug compiler:
Buildpacks
At the heart of the slug compiler is a collection of scripts called a buildpack. https://devcenter.heroku.com/articles/buildpacks
Slug Compiler https://devcenter.heroku.com/articles/slug-compiler
Slugとは:
金属の小塊、鉛玉、弾丸、散弾 http://eow.alc.co.jp/Slug/UTF-8/?ref=sa
WordPressのプラグイン、不動産プラグインとかレシピプラグインとか、EC機能プラグインだけじゃないんですね:
WordPressでどんなサイトでも作れちゃう気になれる無料プラグイン9個 http://www.webcreatorbox.com/webinfo/wordpress-useful-plugin/
FJÖRDで作ったWordPressベースのサイト:
稲田屋 ー 鳥取県の老舗蔵元が醸す日本酒「稲田姫」に出会える和食居酒屋 http://inataya.co.jp/
神保町・九段下の美容院「Berry」 http://www.berry-style.com/













