tag:crieit.net,2005:https://crieit.net/tags/wp-cli/feed 「wp-cli」の記事 - Crieit Crieitでタグ「wp-cli」に投稿された最近の記事 2021-10-23T14:21:14+09:00 https://crieit.net/tags/wp-cli/feed tag:crieit.net,2005:PublicArticle/17719 2021-10-23T14:21:14+09:00 2021-10-23T14:21:14+09:00 https://crieit.net/posts/wp-cli-yikes-error2-20211023 WP CLI で Error: YIKES! It looks like you're running this as root. エラー <p>WP CLI で Error: YIKES! It looks like you're running this as root. ... というエラーが発生したのでメモ。</p> <pre><code class="bash"># wp help Error: YIKES! It looks like you're running this as root. You probably meant to run this as the user that your WordPress installation exists under. If you REALLY mean to run this as root, we won't stop you, but just bear in mind that any code on this site will then have full control of your server, making it quite DANGEROUS. If you'd like to continue as root, please run this again, adding this flag: --allow-root If you'd like to run it as the user that this site is under, you can run the following to become the respective user: sudo -u USER -i -- wp <command> </code></pre> <p>原因としては root で実行しようとしているけど大丈夫?他のユーザで <code>sudo</code> で実行してね?ということのようです。</p> <p>今回は Docker 環境の中で特に気にするものもないので安直に <code>--allow-root</code> で落ち着きました。</p> <h3 id="参考"><a href="#%E5%8F%82%E8%80%83">参考</a></h3> <ul> <li><a target="_blank" rel="nofollow noopener" href="https://b.0218.jp/20150729230610.html">[WordPress] WP-CLI でエラーが出た時の対処方法</a></li> <li><a target="_blank" rel="nofollow noopener" href="http://memories.zal.jp/WP/wordpress/archives/478">WP-CLI自身をアップデートするコマンド wp cli update | サイト構築日記(WordPress編)</a></li> </ul> arm-band