{"id":7732,"date":"2026-08-19T10:20:54","date_gmt":"2026-08-19T01:20:54","guid":{"rendered":"https:\/\/dandelions.co.jp\/blog\/?p=7732"},"modified":"2026-08-19T10:20:54","modified_gmt":"2026-08-19T01:20:54","slug":"i-set-up-wordpress-7-0-locally-and-tried-out-ai-client","status":"publish","type":"post","link":"https:\/\/dandelions.co.jp\/blog\/blog\/2026\/08\/19\/i-set-up-wordpress-7-0-locally-and-tried-out-ai-client\/","title":{"rendered":"I Set Up WordPress 7.0 Locally and Tried Out AI Client"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Recently, I had the chance to work with WordPress for the first time in a while.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">So, for this post, I decided to set up WordPress 7.0 in a local environment and try out AI Client for myself.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What Is the \u201cAI Client\u201d in WordPress 7.0?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">AI Client is a system designed to make it easier to use AI services from within WordPress and plugins.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Until now, when using AI from a plugin, it was necessary to implement API connection processes and other tasks for each AI service used.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">By using the AI Client, you can access a common framework for working with AI from within WordPress.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In this article, we&#8217;ll try using this system in practice.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Setting Up WordPress 7.0 Locally<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">This time, we&#8217;ll test it in a local environment.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">We&#8217;ll be using \u201cLocal.\u201d<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Since it makes it easy to set up a WordPress testing environment, it\u2019s useful for experiments like this one.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">First, launch Local and create a new WordPress site.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For this post, I\u2019ve named the site \u201cwp-ai-test.\u201d<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"645\" height=\"440\" src=\"http:\/\/dandelions.co.jp\/blog\/wp\/wp-content\/uploads\/2026\/08\/local-wordpress-environment-settings.png\" alt=\"\" class=\"wp-image-7641\" style=\"width:645px;height:auto\" srcset=\"https:\/\/dandelions.co.jp\/blog\/wp\/wp-content\/uploads\/2026\/08\/local-wordpress-environment-settings.png 645w, https:\/\/dandelions.co.jp\/blog\/wp\/wp-content\/uploads\/2026\/08\/local-wordpress-environment-settings-300x205.png 300w\" sizes=\"auto, (max-width: 645px) 100vw, 645px\" \/><figcaption class=\"wp-element-caption\">For this test, we are using WordPress 7.0.3.<\/figcaption><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Trying Out the AI Client<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Creating a Plugin<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">When you press the button, it asks the AI a specific question and displays the answer.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I&#8217;m going to create a small plugin called\u2026<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Open the <code>wp-ai-test<\/code> folder you created in Local.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Inside the \u201capp\/public\/wp-content\/plugins\u201d directory in WordPress,<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Create a folder named \u201cwp-ai-client-test.\u201d<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Inside that directory, create a file named \u201cwp-ai-client-test.php.\u201d<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"655\" height=\"381\" src=\"http:\/\/dandelions.co.jp\/blog\/wp\/wp-content\/uploads\/2026\/08\/vscode-create-php-file.png\" alt=\"\" class=\"wp-image-7647\" srcset=\"https:\/\/dandelions.co.jp\/blog\/wp\/wp-content\/uploads\/2026\/08\/vscode-create-php-file.png 655w, https:\/\/dandelions.co.jp\/blog\/wp\/wp-content\/uploads\/2026\/08\/vscode-create-php-file-300x175.png 300w\" sizes=\"auto, (max-width: 655px) 100vw, 655px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Initial plugin code<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">First, let\u2019s get WordPress to recognize it.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"655\" height=\"381\" src=\"http:\/\/dandelions.co.jp\/blog\/wp\/wp-content\/uploads\/2026\/08\/first-plugin-code.png\" alt=\"\" class=\"wp-image-7650\" srcset=\"https:\/\/dandelions.co.jp\/blog\/wp\/wp-content\/uploads\/2026\/08\/first-plugin-code.png 655w, https:\/\/dandelions.co.jp\/blog\/wp\/wp-content\/uploads\/2026\/08\/first-plugin-code-300x175.png 300w\" sizes=\"auto, (max-width: 655px) 100vw, 655px\" \/><figcaption class=\"wp-element-caption\">I will enter the information as described above and save it.<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In the WordPress admin panel, go to \u201cPlugins\u201d \u2192 \u201cInstalled Plugins.\u201d<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u201cWordPress AI Client Test\u201d will appear in the list of plugins.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"735\" height=\"455\" src=\"http:\/\/dandelions.co.jp\/blog\/wp\/wp-content\/uploads\/2026\/08\/installed-plugins.png\" alt=\"\" class=\"wp-image-7653\" srcset=\"https:\/\/dandelions.co.jp\/blog\/wp\/wp-content\/uploads\/2026\/08\/installed-plugins.png 735w, https:\/\/dandelions.co.jp\/blog\/wp\/wp-content\/uploads\/2026\/08\/installed-plugins-300x186.png 300w\" sizes=\"auto, (max-width: 735px) 100vw, 735px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Add \u201cAI Client Test\u201d to the Admin Panel<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Next, we&#8217;ll create a dedicated page in the admin panel.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Add the code to the file from earlier.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"655\" height=\"381\" src=\"http:\/\/dandelions.co.jp\/blog\/wp\/wp-content\/uploads\/2026\/08\/added-plugin-code-1.png\" alt=\"\" class=\"wp-image-7660\" srcset=\"https:\/\/dandelions.co.jp\/blog\/wp\/wp-content\/uploads\/2026\/08\/added-plugin-code-1.png 655w, https:\/\/dandelions.co.jp\/blog\/wp\/wp-content\/uploads\/2026\/08\/added-plugin-code-1-300x175.png 300w\" sizes=\"auto, (max-width: 655px) 100vw, 655px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><br>Once you save and refresh the admin screen, \u201cAI Client Test\u201d will appear in the left-hand menu.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"735\" height=\"455\" src=\"http:\/\/dandelions.co.jp\/blog\/wp\/wp-content\/uploads\/2026\/08\/plugin-enabled-1.png\" alt=\"\" class=\"wp-image-7667\" srcset=\"https:\/\/dandelions.co.jp\/blog\/wp\/wp-content\/uploads\/2026\/08\/plugin-enabled-1.png 735w, https:\/\/dandelions.co.jp\/blog\/wp\/wp-content\/uploads\/2026\/08\/plugin-enabled-1-300x186.png 300w\" sizes=\"auto, (max-width: 735px) 100vw, 735px\" \/><figcaption class=\"wp-element-caption\">Make sure to \u201cactivate\u201d the plugin.<\/figcaption><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Add a \u201cAsk AI\u201d feature<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">In this session, we&#8217;ll set it up so that when the \u201cAsk AI\u201d button is clicked, a fixed question is sent to OpenAI.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"735\" height=\"455\" src=\"http:\/\/dandelions.co.jp\/blog\/wp\/wp-content\/uploads\/2026\/08\/ask-the-ai-question.png\" alt=\"\" class=\"wp-image-7668\" srcset=\"https:\/\/dandelions.co.jp\/blog\/wp\/wp-content\/uploads\/2026\/08\/ask-the-ai-question.png 735w, https:\/\/dandelions.co.jp\/blog\/wp\/wp-content\/uploads\/2026\/08\/ask-the-ai-question-300x186.png 300w\" sizes=\"auto, (max-width: 735px) 100vw, 735px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Add the processing to the <code>ai_client_test_page()<\/code> function.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">We&#8217;ll also make a few changes to the form.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"697\" height=\"469\" src=\"http:\/\/dandelions.co.jp\/blog\/wp\/wp-content\/uploads\/2026\/08\/added-plugin-code2.png\" alt=\"\" class=\"wp-image-7671\" srcset=\"https:\/\/dandelions.co.jp\/blog\/wp\/wp-content\/uploads\/2026\/08\/added-plugin-code2.png 697w, https:\/\/dandelions.co.jp\/blog\/wp\/wp-content\/uploads\/2026\/08\/added-plugin-code2-300x202.png 300w\" sizes=\"auto, (max-width: 697px) 100vw, 697px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Save and Run<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">When I clicked the \u201cAsk AI\u201d button, the answer to my question was displayed.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"735\" height=\"455\" src=\"http:\/\/dandelions.co.jp\/blog\/wp\/wp-content\/uploads\/2026\/08\/wordpress-ai-client-response.png\" alt=\"\" class=\"wp-image-7673\" srcset=\"https:\/\/dandelions.co.jp\/blog\/wp\/wp-content\/uploads\/2026\/08\/wordpress-ai-client-response.png 735w, https:\/\/dandelions.co.jp\/blog\/wp\/wp-content\/uploads\/2026\/08\/wordpress-ai-client-response-300x186.png 300w\" sizes=\"auto, (max-width: 735px) 100vw, 735px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Summary<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Given the name \u201cAI Client,\u201d I had imagined the implementation would be a bit more complex, but I was able to call the AI with some simple code.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">AI Client is not a feature that provides AI itself, but rather a platform for using AI within WordPress. To actually create useful features, you\u2019ll need to integrate it using plugins or similar methods.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Since WordPress allows you to add features through plugins, I felt that combining it with AI Client could lead to the implementation of various AI features in the future.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Going forward, I\u2019d like to try out features that are useful for actual WordPress management, such as article summaries and title generation.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Stay tuned for the next Engineer Blog post.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Recently, I had the chance to work with WordPress for the first time in a while. So, for this post, I decided  &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/dandelions.co.jp\/blog\/blog\/2026\/08\/19\/i-set-up-wordpress-7-0-locally-and-tried-out-ai-client\/\" class=\"more-link\"><span class=\"screen-reader-text\">&#8220;I Set Up WordPress 7.0 Locally and Tried Out AI Client&#8221; \u306e<\/span>\u7d9a\u304d\u3092\u8aad\u3080<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":"","jetpack_publicize_message":"","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true},"categories":[8],"tags":[9],"class_list":["post-7732","post","type-post","status-publish","format-standard","hentry","category-8","tag-9"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/dandelions.co.jp\/blog\/wp-json\/wp\/v2\/posts\/7732","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dandelions.co.jp\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dandelions.co.jp\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dandelions.co.jp\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/dandelions.co.jp\/blog\/wp-json\/wp\/v2\/comments?post=7732"}],"version-history":[{"count":2,"href":"https:\/\/dandelions.co.jp\/blog\/wp-json\/wp\/v2\/posts\/7732\/revisions"}],"predecessor-version":[{"id":7734,"href":"https:\/\/dandelions.co.jp\/blog\/wp-json\/wp\/v2\/posts\/7732\/revisions\/7734"}],"wp:attachment":[{"href":"https:\/\/dandelions.co.jp\/blog\/wp-json\/wp\/v2\/media?parent=7732"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dandelions.co.jp\/blog\/wp-json\/wp\/v2\/categories?post=7732"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dandelions.co.jp\/blog\/wp-json\/wp\/v2\/tags?post=7732"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}