PHPアクセラレータのAPCをインストール

Facebooktwittermail

こんなのあるんですね。

WordPressを2.5倍速くするPHPアクセラレータ「APC」
http://www.atmarkit.co.jp/ait/articles/1601/25/news004.html

WordPressのパフォーマンスを上げる為、APCを導入しました
http://www.checksite.jp/pecl-apc-php/

早々に当サイトにもインストールしてみました。

  1. php-pearインストール
  2. 足りないと思われるphp-pearをインストールしました。

  3. apcインストール
  4. すべてデフォルトでインストールしました。

  5. phpにapcの組み込み
  6. 別途/etc/php.d/apc.iniを作成します。
    実行時設定
    http://php.net/manual/ja/apc.configuration.php

  7. apacheの再読み込み
  8. 確認

apcの動作状況の確認をWebでできるようです。

これでhttp://server_ip/apc.phpにアクセスすると状況の確認ができます。
Image20160213103534

ログインはデフォルトでapc/passwordですので常時設置する場合は変更して下さい。

ところがWordPressのダッシュボードに警告が表示されました。
Image20160213104548

NOTICE: ZenCache + PHP APC Extension

As of December 1st, 2015 ZenCache will no longer run with the outdated PHP APC extension. It appears that you’re currently running PHP v5.4.x with APC enabled. You will need to follow one of the actions below to run the next version of ZenCache.
Options Available (Action Required):

Please add ini_set(‘apc.cache_by_default’, false); to the top of your /wp-config.php file. That will get rid of this message and allow ZenCache to run without issue.
Or, contact your web hosting provider and ask about upgrading to PHP v5.5+; which includes the new OPcache extension for PHP. The new OPcache extension replaces APC in modern versions of PHP.

To learn more about this upcoming change, please see the announcement: PHP APC Extension No Longer Supported

Dismiss this notice.

ZenCache + PHP APC Extensionの組合せはダメみたいですね。
PHP 5.5+にするかini_set(‘apc.cache_by_default’, false);をwp-config.phpに追記すればいいようですが、取り敢えずZenCacheを止めました。

警告は消えましたがどれぐらい改善されるのでしょうか?

Leave a Reply