{"id":3067,"date":"2025-12-12T18:25:35","date_gmt":"2025-12-12T09:25:35","guid":{"rendered":"https:\/\/blog.id774.net\/entry\/?p=3067"},"modified":"2025-12-12T19:21:43","modified_gmt":"2025-12-12T10:21:43","slug":"wordpress-%e6%9b%b4%e6%96%b0%e5%be%8c%e3%81%ae-403-%e3%82%a8%e3%83%a9%e3%83%bc%e3%81%a8-wp-cli-%e3%81%ab%e3%82%88%e3%82%8b%e5%be%a9%e6%97%a7%e6%96%b9%e6%b3%95","status":"publish","type":"post","link":"https:\/\/blog.id774.net\/entry\/2025\/12\/12\/3067\/","title":{"rendered":"WordPress \u66f4\u65b0\u5f8c\u306e 403 \u30a8\u30e9\u30fc\u3068 WP-CLI \u306b\u3088\u308b\u5fa9\u65e7\u65b9\u6cd5"},"content":{"rendered":"<p><a href=\"https:\/\/wordpress.org\/\">WordPress<\/a> 6.9 \u3078\u306e\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u5f8c\u306b 403 Forbidden \u304c\u767a\u751f\u3057\u305f\u3002\u4e8b\u5b9f\u95a2\u4fc2\u3001\u539f\u56e0\u3001\u5bfe\u51e6\u6cd5\u3001\u306a\u3089\u3073\u306b\u518d\u767a\u9632\u6b62\u306e\u305f\u3081\u306e\u77e5\u898b\u3092\u6574\u7406\u3057\u305f\u3002<\/p>\n<hr>\n<h2>\u767a\u751f\u3057\u305f\u73fe\u8c61<\/h2>\n<p>\u7ba1\u7406\u753b\u9762\u3078\u30a2\u30af\u30bb\u30b9\u3059\u308b\u3068\u30ea\u30c0\u30a4\u30ec\u30af\u30c8\u3055\u308c\u3001403 Forbidden \u3068\u306a\u3063\u305f\u3002<\/p>\n<ul>\n<li>\u5168\u30d7\u30e9\u30b0\u30a4\u30f3\u7121\u52b9\u5316\u3001.htaccess \u3068\u30d1\u30fc\u30df\u30c3\u30b7\u30e7\u30f3\u78ba\u8a8d\u6e08\u307f\u3067\u3082\u6539\u5584\u305b\u305a\u3002<\/li>\n<li><a href=\"https:\/\/wp-cli.org\/ja\/\">WP-CLI<\/a> \u306e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u66f4\u65b0\u5b9f\u884c\u3067\u5fa9\u5e30\u3057\u305f\u3002<\/li>\n<\/ul>\n<hr>\n<h2>\u6839\u672c\u539f\u56e0<\/h2>\n<ul>\n<li>\u30b3\u30a2\u66f4\u65b0\u5f8c\u3001WordPress \u672c\u4f53\u304c\u6301\u3064 $wp_db_version \u3068\u3001DB \u5185\u306e wp_options.db_version \u304c\u4e0d\u4e00\u81f4\u306e\u72b6\u614b\u3060\u3063\u305f\u3002<\/li>\n<li>\u3053\u306e\u4e0d\u4e00\u81f4\u306b\u3088\u308a\u7ba1\u7406\u753b\u9762\u30a2\u30af\u30bb\u30b9\u6642\u306b \/\u7ba1\u7406\u753b\u9762\u306e\u30a2\u30c9\u30ec\u30b9\/upgrade.php \u3078\u5f37\u5236\u30ea\u30c0\u30a4\u30ec\u30af\u30c8\u304c\u767a\u751f\u3002<\/li>\n<li>\u74b0\u5883\u5074\u306e\u5236\u9650\u3084\u30eb\u30fc\u30eb\u306b\u3088\u308a upgrade.php \u304c\u30d6\u30ed\u30c3\u30af\u3055\u308c\u3001\u7d50\u679c\u3068\u3057\u3066 403 \u304c\u8868\u9762\u5316\u3057\u305f\u3002<\/li>\n<\/ul>\n<hr>\n<h2>WP-CLI \u306b\u3088\u308b\u5fa9\u65e7\u30b3\u30de\u30f3\u30c9<\/h2>\n<p>CLI \u304b\u3089\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u66f4\u65b0\u3092\u5b9f\u884c\u3059\u308b\u3068\u3001Web \u7d4c\u7531\u3067 upgrade.php \u3092\u8e0f\u307e\u305a\u306b\u6574\u5408\u304c\u53d6\u308c\u308b\u3002<\/p>\n<div class=\"codecolorer-container text geshi\" style=\"overflow:auto;white-space:nowrap;width:1000px;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/><\/div><\/td><td><div class=\"text codecolorer\" style=\"white-space:nowrap\">wp core update-db<\/div><\/td><\/tr><\/tbody><\/table><\/div>\n<hr>\n<h2>\u72b6\u614b\u78ba\u8a8d\u30b3\u30de\u30f3\u30c9<\/h2>\n<p>\u30d5\u30a1\u30a4\u30eb\u5074\u3068 DB \u5074\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u6574\u5408\u3092\u78ba\u8a8d\u3059\u308b\u3002<\/p>\n<div class=\"codecolorer-container text geshi\" style=\"overflow:auto;white-space:nowrap;width:1000px;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/>2<br \/>3<br \/><\/div><\/td><td><div class=\"text codecolorer\" style=\"white-space:nowrap\">wp core version<br \/>\nwp option get db_version<br \/>\ngrep db_version wp-includes\/version.php<\/div><\/td><\/tr><\/tbody><\/table><\/div>\n<hr>\n<h2>\u5b89\u5168\u306a\u30a2\u30c3\u30d7\u30b0\u30ec\u30fc\u30c9\u624b\u9806<\/h2>\n<p>\u30d5\u30a1\u30a4\u30eb\u66f4\u65b0\u3068 DB \u66f4\u65b0\u3092\u5e38\u306b\u30bb\u30c3\u30c8\u3067\u5b9f\u884c\u3059\u308b\u3002<\/p>\n<div class=\"codecolorer-container text geshi\" style=\"overflow:auto;white-space:nowrap;width:1000px;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/>2<br \/>3<br \/>4<br \/>5<br \/><\/div><\/td><td><div class=\"text codecolorer\" style=\"white-space:nowrap\">wp core update<br \/>\nwp core update-db<br \/>\n# \u5fc5\u8981\u306b\u5fdc\u3058\u3066\u30ad\u30e3\u30c3\u30b7\u30e5\u30af\u30ea\u30a2<br \/>\nwp w3-total-cache flush all<br \/>\nwp transient delete --all<\/div><\/td><\/tr><\/tbody><\/table><\/div>\n<hr>\n<h2>WP-CLI \u306e\u4ed5\u7d44\u307f\uff08\u8981\u70b9\uff09<\/h2>\n<ul>\n<li>wp \u5b9f\u884c\u6642\u306b WordPress \u3092 PHP \u304b\u3089\u5185\u90e8\u30ed\u30fc\u30c9\u3057\u3001Web \u3092\u4ecb\u3055\u305a\u306b<a href=\"https:\/\/developer.wordpress.org\/cli\/commands\/\">\u5404 API<\/a> \u3092\u5229\u7528\u3059\u308b\u3002<\/li>\n<li>\u30d7\u30e9\u30b0\u30a4\u30f3\u306f WP_CLI::add_command() \u3067\u72ec\u81ea CLI <a href=\"https:\/\/make.wordpress.org\/cli\/handbook\/\">\u30b3\u30de\u30f3\u30c9\u3092\u767b\u9332<\/a>\u3067\u304d\u308b\u3002<\/li>\n<li>\u305d\u306e\u305f\u3081\u30d7\u30e9\u30b0\u30a4\u30f3\u6a5f\u80fd\uff08\u4f8b\uff1a\u30ad\u30e3\u30c3\u30b7\u30e5\u524a\u9664\uff09\u3082 CLI \u304b\u3089\u5b9f\u884c\u53ef\u80fd\u306b\u306a\u308b\u3002<\/li>\n<\/ul>\n<hr>\n<h2>\u30ad\u30e3\u30c3\u30b7\u30e5\u30af\u30ea\u30a2 TIPS<\/h2>\n<p>\u4ee3\u8868\u7684\u306a\u30af\u30ea\u30a2\u64cd\u4f5c\u3092\u307e\u3068\u3081\u3066\u63b2\u8f09\u3059\u308b\uff08\u5fc5\u8981\u306a\u3082\u306e\u306e\u307f\u5b9f\u884c\uff09\u3002<\/p>\n<div class=\"codecolorer-container text geshi\" style=\"overflow:auto;white-space:nowrap;width:1000px;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/>2<br \/>3<br \/>4<br \/>5<br \/>6<br \/>7<br \/>8<br \/>9<br \/>10<br \/>11<br \/>12<br \/>13<br \/>14<br \/>15<br \/>16<br \/>17<br \/><\/div><\/td><td><div class=\"text codecolorer\" style=\"white-space:nowrap\"># \u30c8\u30e9\u30f3\u30b8\u30a7\u30f3\u30c8\uff08DB \u5185\u4e00\u6642\u30ad\u30e3\u30c3\u30b7\u30e5\uff09<br \/>\nwp transient delete --all<br \/>\n<br \/>\n# \u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u30ad\u30e3\u30c3\u30b7\u30e5\uff08\u30d0\u30c3\u30af\u30a8\u30f3\u30c9\u6709\u52b9\u6642\uff09<br \/>\nwp cache flush<br \/>\n<br \/>\n# W3 Total Cache<br \/>\nwp w3-total-cache flush all<br \/>\n<br \/>\n# WP Super Cache<br \/>\nwp super-cache flush<br \/>\n<br \/>\n# LiteSpeed Cache<br \/>\nwp litespeed-purge all<br \/>\n<br \/>\n# \u65ad\u7247\u5316\u9664\u53bb\u3068\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u518d\u69cb\u7bc9<br \/>\nwp db optimize<\/div><\/td><\/tr><\/tbody><\/table><\/div>\n<hr>\n<h2>403 \u30a8\u30e9\u30fc\u6642\u306e\u8a3a\u65ad\u512a\u5148\u9806\u4f4d<\/h2>\n<ol>\n<li>\u30ea\u30c0\u30a4\u30ec\u30af\u30c8\u5148\u306e URL \u3092\u78ba\u8a8d\uff08\/upgrade.php \u306a\u3089 DB \u672a\u66f4\u65b0\u306e\u30b5\u30a4\u30f3\uff09\u3002<\/li>\n<li>.htaccess \u306b upgrade.php \u3084 install.php \u3092\u62d2\u5426\u3059\u308b\u8a18\u8ff0\u304c\u306a\u3044\u304b\u3002<\/li>\n<li>WAF\u30fb\u30b5\u30fc\u30d0\u30fc\u30ed\u30b0\u3067\u8a72\u5f53\u30ea\u30af\u30a8\u30b9\u30c8\u306e\u30d6\u30ed\u30c3\u30af\u6709\u7121\u3092\u78ba\u8a8d\u3002<\/li>\n<li>DB \u306e db_version \u3068\u30d5\u30a1\u30a4\u30eb\u5074 $wp_db_version \u306e\u4e0d\u6574\u5408\u3092\u78ba\u8a8d\u3002<\/li>\n<li>\u30b3\u30a2\u30d5\u30a1\u30a4\u30eb\u306e\u7834\u640d\u30fb\u4e0d\u6574\u5408\u3092\u7591\u3044\u3001\u516c\u5f0f\u30d1\u30c3\u30b1\u30fc\u30b8\u3067\u518d\u914d\u7f6e\u3092\u691c\u8a0e\u3002<\/li>\n<\/ol>\n<hr>\n<h2>\u5b66\u3073\u3068\u8981\u70b9\u307e\u3068\u3081<\/h2>\n<ol>\n<li>\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u306f\u300c\u30d5\u30a1\u30a4\u30eb\u66f4\u65b0 + DB \u66f4\u65b0\u300d\u306e2\u6bb5\u69cb\u3048\u304c\u6b63\u9053\u3002<\/li>\n<li>\/upgrade.php \u3078\u306e\u30ea\u30c0\u30a4\u30ec\u30af\u30c8\u306f\u7570\u5e38\u3067\u306f\u306a\u304f\u300c\u672a\u66f4\u65b0\u306e\u5146\u5019\u300d\u3002<\/li>\n<li>wp core update-db \u306f upgrade.php \u306e\u5b89\u5168\u306a\u4ee3\u66ff\u7d4c\u8def\u3002<\/li>\n<li>WP-CLI \u306f WordPress \u3092\u5185\u90e8\u30ed\u30fc\u30c9\u3057\u3001\u30d7\u30e9\u30b0\u30a4\u30f3\u306e CLI \u6a5f\u80fd\u3082\u5229\u7528\u53ef\u80fd\u3002<\/li>\n<li>\u30ad\u30e3\u30c3\u30b7\u30e5\u306f\u7a2e\u985e\u3054\u3068\u306b\u30b3\u30de\u30f3\u30c9\u304c\u7570\u306a\u308b\u305f\u3081\u3001\u904b\u7528\u30dd\u30ea\u30b7\u30fc\u3068\u3057\u3066\u6574\u5099\u3059\u308b\u3002<\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>WordPress 6.9 \u3078\u306e\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u5f8c\u306b 403 Forbidden \u304c\u767a\u751f\u3057\u305f\u3002\u4e8b\u5b9f\u95a2\u4fc2\u3001\u539f\u56e0\u3001\u5bfe\u51e6\u6cd5\u3001\u306a\u3089\u3073\u306b\u518d\u767a\u9632\u6b62\u306e\u305f\u3081\u306e\u77e5\u898b\u3092\u6574\u7406\u3057\u305f\u3002 \u767a\u751f\u3057\u305f\u73fe\u8c61 \u7ba1\u7406\u753b\u9762\u3078\u30a2\u30af\u30bb\u30b9\u3059\u308b\u3068\u30ea\u30c0\u30a4\u30ec\u30af\u30c8\u3055\u308c\u3001403  &#8230; <a title=\"WordPress \u66f4\u65b0\u5f8c\u306e 403 \u30a8\u30e9\u30fc\u3068 WP-CLI \u306b\u3088\u308b\u5fa9\u65e7\u65b9\u6cd5\" class=\"read-more\" href=\"https:\/\/blog.id774.net\/entry\/2025\/12\/12\/3067\/\" aria-label=\"WordPress \u66f4\u65b0\u5f8c\u306e 403 \u30a8\u30e9\u30fc\u3068 WP-CLI \u306b\u3088\u308b\u5fa9\u65e7\u65b9\u6cd5 \u306b\u3064\u3044\u3066\u3055\u3089\u306b\u8aad\u3080\">\u7d9a\u304d\u3092\u8aad\u3080<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[14],"tags":[],"class_list":["post-3067","post","type-post","status-publish","format-standard","hentry","category-tech"],"_links":{"self":[{"href":"https:\/\/blog.id774.net\/entry\/wp-json\/wp\/v2\/posts\/3067","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.id774.net\/entry\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.id774.net\/entry\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.id774.net\/entry\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.id774.net\/entry\/wp-json\/wp\/v2\/comments?post=3067"}],"version-history":[{"count":9,"href":"https:\/\/blog.id774.net\/entry\/wp-json\/wp\/v2\/posts\/3067\/revisions"}],"predecessor-version":[{"id":3076,"href":"https:\/\/blog.id774.net\/entry\/wp-json\/wp\/v2\/posts\/3067\/revisions\/3076"}],"wp:attachment":[{"href":"https:\/\/blog.id774.net\/entry\/wp-json\/wp\/v2\/media?parent=3067"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.id774.net\/entry\/wp-json\/wp\/v2\/categories?post=3067"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.id774.net\/entry\/wp-json\/wp\/v2\/tags?post=3067"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}