プログラミング

WordPressブログ・サイトの新規作成時のwpコマンド

僕がWordPressサイトを新規作成するときにとりあえず実行してるLinux Bashコマンドライン上でのwpコマンドを利用したスクリプトを紹介します。

wordpressのインストールをして、adminパネルへログインが完了したら、sshからwpコマンドで一気に普段遣いのプラグイン、デフォルトのテーマ、既存のhello worldページの削除、などを行うようにしています。これだけで普通に手動でやるよりは小一時間浮きますので活用するとよいかと思います。

wp plugin install ps-auto-sitemap
wp plugin install pubsubhubbub
wp plugin install table-of-contents-plus
wp plugin install wordpress-importer
wp plugin install all-in-one-seo-pack
wp plugin install google-sitemap-generator
wp plugin install child-theme-configurator
wp plugin install jetpack
wp plugin install q2w3-fixed-widget
wp plugin install post-expirator
wp plugin install post-type-switcher
wp plugin install admin-post-navigation
wp plugin install black-studio-tinymce-widget
wp plugin install easy-google-fonts
wp plugin install contact-form-7
wp plugin activate --all

wp widget deactivate meta-2
wp widget deactivate search-2
wp widget deactivate recent-posts-2
wp widget deactivate recent-comments-2
wp widget deactivate archives-2
wp widget deactivate categories-2

wp post delete $(wp post list --post_type='post' --format=ids) && wp post delete $(wp post list --post_type='page' --format=ids)
wp post create --post_type=page --post_title="sitemap" --post_content='<!-- SITEMAP CONTENT REPLACE POINT -->'

wp theme install oceanwp
wp theme activate oceanwp

コメントを残す

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