LoginSignup
6
7

More than 5 years have passed since last update.

curlでバーチャルホスト名を指定してwp-cronを実行する。

Posted at

WordPressに限ったことではないが、curlでバーチャルドホスト"example1.com"にアクセスする方法を下記に示します。

curl -H 'Host: example1.com' http://127.0.0.1/wp-cron.php?doing_wp_cron > /dev/null 2>&1

また、BASIC認証をかけている場合はこちら。

curl --user username:userpass -H 'Host: example1.com' http://127.0.0.1/wp-cron.php?doing_wp_cron > /dev/null 2>&1
6
7
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
6
7