Skip to main content

WordPress のカスタマイズ taxonomy を記事編集画面に出す

コードで作成したカスタマイズ taxonomy が記事の編集画面に表示されていない場合、以下のオプションを設定すると解消する可能性があります。

'show_in_rest' => true,

コード例

$args = array(
    'hierarchical' => false,
    'labels' => $pickup_tag,
    'show_ui' => true,
    'show_in_rest' => true,
    'query_var' => true,
    'rewrite' => array( 'slug' => 'my_tag' )
);

mysqldumpでAccess denied問題が発生

さくらインターネットのレンタルサーバーなどで、mysqldump を実行する際に以下のエラーが発生します。

Error: 'Access denied; you need (at least one of) the PROCESS privilege(s) for this operation' when trying to dump tablespaces

回避案

通常は必要な権限をGrantすれば解消するのはずですが、レンタルサーバーなどの場合権限を変更できない時もあります。

その場合はデータのみ(テーブル情報)が必要なければ、以下のオプションを追加すると問題を解消できます。

--no-tablespaces

コマンド例

% mysqldump -h <ホスト名> -u <ユーザー名> -p <データベース名> --no-tablespaces > 出力先file.sql

xcrun: error: invalid active developer path エラー

macOS をアップデートした後、git を実行すると以下のエラーが発生します。

% git

xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun

Terminal で以下を実行すると解決する場合があります。

% xcode-select --install

xcode-select: note: install requested for command line developer tools