P3(Plugin Performance Profiler)

スポンサーリンク

WordPress のプラグインの負荷を測定できるプラグイン。
おもしろそうなので入れて測定した見た。

測定結果はこんな感じ。

2014-0418.gif

「WPtouch Mobile Plugin」が結構な比重なんだけど外すわけにはいかないなぁ。

おもしろいプラグインなんだけど、導入の際にエラーが複数発生したのでメモ。

  1. Warning: file_put_contents() [function.file-put-contents]: SAFE MODE Restriction in effect. The script whose uid is 11161 is not allowed to access /virtual/antonsan/public_html/wp/wp-content/uploads/profiles owned by uid 1000 in /virtual/antonsan/public_html/wp/wp-content/plugins/p3-profiler/classes/class.p3-profiler-plugin-admin.php on line 558
  2. Warning: file_put_contents(/virtual/antonsan/public_html/wp/wp-content/uploads/profiles/.htaccess) [function.file-put-contents]: failed to open stream: No such file or directory in /virtual/antonsan/public_html/wp/wp-content/plugins/p3-profiler/classes/class.p3-profiler-plugin-admin.php on line 558
  3. Warning: file_put_contents() [function.file-put-contents]: SAFE MODE Restriction in effect. The script whose uid is 11161 is not allowed to access /virtual/antonsan/public_html/wp/wp-content/uploads/profiles owned by uid 1000 in /virtual/antonsan/public_html/wp/wp-content/plugins/p3-profiler/classes/class.p3-profiler-plugin-admin.php on line 561
  4. Warning: file_put_contents(/virtual/antonsan/public_html/wp/wp-content/uploads/profiles/index.php) [function.file-put-contents]: failed to open stream: No such file or directory in /virtual/antonsan/public_html/wp/wp-content/plugins/p3-profiler/classes/class.p3-profiler-plugin-admin.php on line 561

以下の処理をした。

  1. 「wp-content/plugins/p3-profiler/classes」内の「.htaccess」に以下を追加。
    <files class.p3-profiler-plugin-admin.php>
    AddHandler application/x-httpd-phpcgi .php
    </files>
  2. 「wp-content/uploads」内にあった「profiles」ディレクトリーを一度削除して再度作成。
  3. 「wp-content/uploads/profiles/」内に中身が空の「.htaccess」と「index.php」ファイルをアップロード。

1 と 2 を行うことにより、1番目と3番目のの「Warning: 」は消えた。
3 を行うことにより、残りのエラーを回避できた。

めでたしめでたし。

コメント