We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AMIMOTO AMIを使ってEC2+RDS+Wordpress+S3の構成をAWSで作成いたしました。
再構築する際にauthorやwp-content/pluginsなどのフォルダを除外したいです。
どうすれば再構築時に一部のディレクトリ、ファイルを除外できますでしょうか?
The text was updated successfully, but these errors were encountered:
こちらですが、ご利用のPHPのバージョンはなんでしょうか? 上記コードは無名関数を使用しておりますので、PHPの5.3.0以降で使用可能となりますので、PHP 5.2.x を利用されている場合は使用できません。
Sorry, something went wrong.
PHPのバージョンは7.0.30です。
No branches or pull requests
AMIMOTO AMIを使ってEC2+RDS+Wordpress+S3の構成をAWSで作成いたしました。
再構築する際にauthorやwp-content/pluginsなどのフォルダを除外したいです。
いろいろ調べ、以下を/wp-content/plugins/staticpress/plugin.phpの末尾に
記述すれば除外できるというサイトを見つけたのですが、
実際に記述して再構築を行うとエラーになり、再構築自体が実行されませんでした。
add_action('StaticPress::file_put', 'static_rm', 1);
function static_rm($file_dest, $url){
if(strstr($file_dest, '/author/')
or strstr($file_dest, '/wp-content/plugins/')
or strstr($file_dest, '/wp-json/')){
unlink($file_dest);
}
}
どうすれば再構築時に一部のディレクトリ、ファイルを除外できますでしょうか?
The text was updated successfully, but these errors were encountered: