Coding a Plugin w/ WordPress Studio AI Assistant
Howto & Style
Introduction
In today’s video, I want to discuss the recent announcement from WordPress.com regarding their new Studio Assistant feature within the Studio app. I previously covered this app on the channel, highlighting its potential to spin up WordPress sites locally on your Mac or PC. This app allows you to work with WordPress seamlessly without needing to host a website externally. Additionally, it provides a direct connection to WordPress.com for launching these sites or hosting temporary sites for clients or collaborators.
The Studio app is intuitive and operates smoothly for browser-based website management. Now, with the introduction of the AI-powered Studio Assistant, things are becoming even more interesting. Here are some key features of the Studio Assistant highlighted in their announcement:
- The ability to communicate with the assistant in any language, and it will respond in kind.
- One-click access to open site files, eliminating the need to search manually.
- The assistant utilizes contextual knowledge about your specific site, including installed themes and plugins.
While I only recently learned about this feature, I wanted to test it out myself. For instance, I asked the assistant, "Can you update this website to the latest nightly build of WordPress?" The response instructed me to install the WordPress Beta Tester plugin. This functionality is particularly appealing to experienced users who want a quick way to pull the latest build for testing.
However, when I asked it to install plugins for me, it responded, "No, I can't install plugins for you." This response revealed a limitation in its current capabilities. To test its ability further, I asked the assistant to install the Yoast plugin, and again, it provided a step-by-step guide rather than executing the installation itself. Despite the potential shown in their demo videos where similar requests result in successful installations, my experience suggests that those capabilities might still be in development.
One area where the Studio Assistant truly shines is with WP CLI commands. For example, when I asked for a list of users on my site, it effectively used the WP CLI command to return the data. This feature is particularly beneficial for users who regularly utilize WP CLI for site management, allowing them to easily copy commands for deeper exploration.
Moreover, I became curious about how well the AI could help with custom development tasks. I prompted it to "code me a Gutenberg block" with specific structural requirements. Despite a minor spelling error, the assistant produced working code that allowed me to create a plugin for a three-column layout, including images, headers, and buttons.
After running the necessary commands, I successfully created my plugin called "My Three Column Block." It functioned seamlessly within the WordPress interface, allowing me to preview and modify it as needed. The experience of creating a custom block was surprisingly straightforward, and I found the AI assistant to be quite effective for this task.
However, I noted that several tasks, such as managing plugin installations through the assistant, still need refinement. The future of WordPress development looks promising, and the integration of AI tools like this can significantly ease the learning curve for those unfamiliar with coding.
As this feature evolves, I envision a future where operations like plugin creation, testing, and deployment are conducted entirely within the Studio app. For now, users can take advantage of 200 free prompts each month on a free WordPress.com account to experiment with the Studio Assistant.
If you’re interested in exploring this tool further or have tried Studio with the new AI assistant, feel free to share your experiences. Your thoughts would be appreciated!
Keywords
WordPress, Studio Assistant, AI tools, Gutenberg block, WP CLI, plugin, development, WordPress.com, plugin installation
FAQ
What is the Studio Assistant in WordPress?
The Studio Assistant is an AI feature within the WordPress Studio app that helps users manage their sites, create plugins, and perform various tasks more intuitively.
Can the Studio Assistant install plugins automatically?
Currently, the Studio Assistant provides instructions on how to install plugins rather than executing the installation itself. This feature is expected to improve in future updates.
How does the Studio Assistant interact with WP CLI?
The Assistant can run WP CLI commands through user prompts, offering results directly through the interface and simplifying site management for users familiar with command line tools.
Is there a limit on how many prompts I can use with the Assistant?
Yes, users can run 200 free prompts per month with a free WordPress.com account. This allows for a variety of testing and exploration with the AI assistant.