Help us understand the problem. What is going on with this article?

Wordpress(PHP) on POW

More than 3 years have passed since last update.

普段は、RailsやSinatraでRackサーバーのPowを使っていて、Wordpress(PHP)をいじるときに、Apacheとか余計なものを立ちあげたくない(port 80をpowが専有してしまう)
他にメリットとしては、

  • シンボリックリンク貼るだけでなので、複数プロジェクトを手軽に切り替えできる
  • xip.io連携で同一LAN内の端末からアクセスが簡単になる

1. gemインストール

gem install rack-legacy

2. config.ru 作成

プロジェクト配下にファイル作成
※ rack-rewrite使わずに、Rack::Legacy::Indexで対応できるようになりました。

config.ru
require 'rack/showexceptions'
require 'rack-legacy'

use Rack::ShowExceptions
use Rack::Legacy::Index
use Rack::Legacy::Php
use Rack::Legacy::Cgi
run Rack::File.new Dir.getwd

3. MySQL

MySQLを入れて、Wordpress用のDB作成(割愛)

  • brewで入れる
brew install mysql

4. シンボリックリンク

ln -s ~/Code/my-wordpress-site ~/.pow/my-wordpress-site

powderを入れてあれば、

powder link

5. アクセス

http://my-wordpress-site.dev

もしくは、

powder open

Reference

Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away