Automatic nightly WordPress updates CHECK with WP-CLI plugins

Hello, I’m Takeken.

I’m pretty hardly at a mail check on the morning, but this adds one to WordPress plugins WP-CLI !!

WP-CLI is very nice plugins that It’s checked WordPress Core, WordPress Theme, WordPress plugins , It is a very good WordPress plugins for me who do not use the Auto-Update system.


Well, let see to how to install.


curl -O
chmod +x wp-cli.phar
sudo mv wp-cli.phar /usr/local/bin/wp


All systems go ?

Ok. And so, let’s create a script.




Version=`/usr/local/bin/wp core check-update --path=/pathto/wordpress`
Plugins=`/usr/local/bin/wp plugin status --path=/pathto/wordpress`
Theme=`/usr/local/bin/wp theme status --path=/pathto/wordpress`

echo "$Version $Plugins $Theme" | mail -s "Wordpress Plugins CHECK $HOST_NAME" $MAIL_TO

Are you ready ?

Execute the command:

Such an email comes.. Maybe.

Subjects: WordPress Plugins CHECK ******

Success: WordPress is at the latest version. 4 installed plugins:
  A moji-changer       1.0.0
  I akismet            3.1.3
  I hello              1.6
  I wp-multibyte-patch 2.4

Legend: A = Active, I = Inactive 3 installed themes:
  A twentyfifteen  1.3
  I twentyfourteen 1.5
  I twentythirteen 1.6

Legend: A = Active, I = Inactive


Have you received text?

You can use it if you WordPress Update does at myself want.
If you should need any help, just let it use.

Say now, I remember!

Let’s enroll in cron.

crontab -e


# wordpress plugins check
0 5 * * * /bin/sh /home/takeken/

it’ll result come to you. receive at five o’clock.


Related Posts

投稿者: Takeken

インターネット利用者のITリテラシーを向上したいという設定の2次元キャラです。 サーバー弄りからプログラミングまで手を付けた自称エッセイストなたけけんの物語。


メールアドレスが公開されることはありません。 が付いている欄は必須項目です