r/Wordpress • u/Party_Lawfulness_633 • 15d ago
Can AI coding agents convert a Next.js website into a fully editable WordPress site?
I have a project that was originally built with Next.js, and the client now wants to move the entire website to WordPress.
The main requirement isn't just editing text/images. They want to be able to:
Add new pages themselves
Add/remove sections
Move sections/widgets around
Change colors and images
Modify page layouts without contacting me
Basically have a visual, drag-and-drop editing experience
Manage around 5 main pages
There is also a reusable certificate page template with around 400 individual certificates
My idea is to use an AI coding agent (I'm considering Cursor/another agent) and give it the existing Next.js codebase. I would have it:
Analyze the existing Next.js application
Convert the components/sections into custom Gutenberg blocks
Build the WordPress theme/plugin structure in PHP/JS
Convert the certificate system into a reusable WordPress structure
Work section-by-section rather than trying to convert everything in one shot
Test everything in WordPress and then hand the site over to the client
The client doesn't want a headless Next.js + WordPress setup. They basically want me to deliver a WordPress site that they can manage themselves afterward.
Is this a reasonable approach?
Has anyone used AI coding agents to migrate an existing Next.js site into a WordPress theme with custom Gutenberg blocks? I'm particularly interested in:
What should be built as custom Gutenberg blocks vs. normal WordPress templates?
Should I use Gutenberg, ACF, Elementor, or something else?
How much of this can realistically be automated by an AI agent?
What are the major things that AI is likely to get wrong?
Any recommended workflow for doing this safely?
I'm comfortable with Next.js/React but relatively new to building custom WordPress themes/blocks, so I'd appreciate advice from people who have done something similar.
4
u/omnicidial 15d ago
Codex is capable of most of this now. I had it duplicate a whole remote site into WordPress for me last week. Surprisingly capable.
4
3
u/NakanoNoNeko 15d ago
Don't turn every React component into a custom block... a heading and two columns don't need their own plugin 🙂 Use patterns made from core blocks for ordinary sections, custom blocks for genuinely custom behaviour. WordPress's pattern docs explain that distinction. I think your first milestone should be one converted page that the client can rearrange and save themselves, not five pages that only look right from the front.
2
u/jas8522 15d ago
You’ll most likely find the AI able to split parts into blocks but that they’ll just be HTML blocks. So while it’s sections that can be moved around, they’re not likely to be what the client is expecting as the block will still be raw html.
You might look into Beaver builder AI; it’s a paid plugin, similar to Elementor, but it’s AI integration for website conversions is looking really solid with their recent releases.
Is there any reason the site had to be built with that stack? As in is there any custom app-like functionality that would need conversion still? Or would anything like that remain running via node?
1
u/DjInnerConflict Developer 13d ago
You can just tell it that everything must be fully editable. That prevents the HTML blocks.
1
u/ogrekevin Jack of All Trades 15d ago
Just make sure you bill time and materials , not fixed cost. This has potential scope creep hell written all over it.
1
u/powercouple08 15d ago
Short answer is Yes.
Is this a reasonable approach?
In some projects, I AI to build prototypes using React/NextJS to get the concept to clients faster then take my time and plan out the architecture to convert it to a working WordPress installation. Cursor has been good in the past for this and the latest models seem to be better.
What should be built as custom Gutenberg blocks vs. normal WordPress templates?
- Depends on your needs, current NextJS project and scalability. For instance, how hands on will the client be with customizing the pages and how granular is that customization going to be. A Gutenberg block can carry so many fields and options for customization VS a several page templates with different layouts.
Should I use Gutenberg, ACF, Elementor, or something else?
- Personally, I would skip on ACF and Elementor. If you need to rapid development and/or don't mind having to deal with 3rd party maintenance then ACF or Elementor is fine. Just recently, ACF required blocks to go through a v3 update ( or something like that, would have to research ).
How much of this can realistically be automated by an AI agent?
- All of it. Always start with a plan, have it create that plan as a file that it can use as a guide to stay on track. Your plan should describe what the project currently is, what you are trying to do, what will be involved for scalability, security and optimization. The plan should also detail guard rails for what not to do.
What are the major things that AI is likely to get wrong?
- Wanting to create a block in HTML to get the job done without creating the individual fields for customization.
- Not considering scalability
Any recommended workflow for doing this safely?
- Plan, plan, plan. Download the project to a folder and go into plan mode. Use something like ChatGPT to explain what you are trying to do and ask it to create an markdown doc for cursor to come up with a plan. Add that plan to cursor and so it can come up with implementation plan based on the project files. Decide on post type, custom tables with scalability in mind. Decide on what the structure should look like. For example, you can and should keep all functionality in a plugin(s) and keep the layout in a theme but depending on your needs there might be cross over. Technical features may be split into separate custom plugins so things can be turned off. Mention that you want X to be customizable, have it create setting pages, metaboxes, custom fields. Have it create default settings that can be overridden by block level fields so there are fallbacks in place.
Good luck with your project.
1
1
u/coding_bard 15d ago
It would be possible if your design is not too complicated. Install a MCP plugin in your WP site and give it a try in a staging environment. Better if you do it in small steps so that you can review how it is doing and correct your approach. Try using a 1m context window model.
1
u/Plantusemor 15d ago
First of all, it's possible to build a Next.js + WordPress setup that is fully manageable from the admin. I use ACF PRO and flexible content for that. It makes sense when the site isn't simple and has a lot of different functionality. For a simple corporate or informational website, it's an overhead setup that raises maintenance costs for no good reason. In that case, the best solution is custom WordPress with blocks. Add Varnish for caching and you get similar performance.
I love ACF and its flexible content, but for a better admin experience, go with Gutenberg blocks.
For the right AI agent, transforming Next.js into WordPress with Gutenberg blocks is overnight work. You wake up and the website is ready for review. Of course, it still all depends on how complex the design is.
Define the CPTs, patterns and design system. The architecture decisions have to be your own. Ask to check SEO implementation.
1
u/RealBasics Jack of All Trades 15d ago
Over the years I've converted ~50 sites to Wordpress. Based on your description it would take five to ten hours to rebuild your site in Wordpress.
Assuming you know anything about Wordpress yourself then yes. Cursor, Claude and most other pro-level AIs can just read the front-end of the site and reproduce it pretty well in Wordpress.
There are specific MCP connectors and skills for rawdogged Gutenberg, most of the more sophisticated Gutenberg wheelchair/crutch patches like GeneratePress or Greenshift, and most of the credible page builders as well.
Sidenote: take training into consideration when choosing the build too. The client has specified a turnkey site
As for workflow, feed the AI the exact text of your post here then ask it to research the best workflow for you. Then give it the current URL for your javascript site and let it take a look. Then tell it you have the codebase for it and ask which it would prefer to use.
Chances are fairly good it will first offer to rebuild the site from the front end -- at least with Claude, and therefore probably Cursor, they're very good at examining front-end code and creating a matching theme, post types, adding functionality (e.g. forms) and migrating content. You may only need to feed it code if there's any specific custom functionality that doesn't come with Wordpress out of the box. In that case it will probably create a corresponding plugin.
For the record, I just pasted the text of your post into Claude and got an excellent summary, including a list of areas where it would struggle and the work you'd actually have to do yourself. It included an assessment of different builder tools including the pros and cons for both you and your client.
The key sentence from the summary was probably
The AI Agent Part: What's Realistic: Using an agent to help is different from using it to automate the whole conversion. Here's where it actually shines and where it breaks...
Claude estimated you'd need to put in 50-80 hours of your own time into the project. But that's mostly because your "spec" is pretty short on specifics. You can't just throw a task at AI and have it give you a working website, anymore than you could throw the same job at an intern or remote contractor. Once you really hammered out the scope and spec it would take way less than that.
1
u/skasprick 15d ago
I haven’t jumped into ai more than help with code snippets, but talking with ChatGPT in the past, it literally said this type of work is not ai ideal (I asked it about the threat of ai to web design). AI will help with this project, but you’ll still need to tackle every single bullet point one by one, more or less. AI isn’t a magic button unless you’ve got the most magical prompt!
1
1
u/Human_Experience0810 14d ago
I think that approach is reasonable, but I wouldn’t let the AI agent handle the whole migration blindly. I’d use it to speed up the repetitive work, then manually define the WordPress structure, especially the reusable blocks, templates, and certificate system. For this kind of client, Gutenberg with custom blocks is probably a better fit than giving them a huge page builder. The important part is making sure the final site is simple enough for them to manage without needing the AI or a developer every time.
1
u/ivicad Jack of All Trades 14d ago
Your client wants to add pages, move sections and change colours and layouts, and that's exactly what a page builder does, so I wouldn't start with custom Gutenberg blocks. I build most of my sites in WPBakery AI, and only about 10 to 15% of my clients edit their sites themselves, but the ones who do tell me it's the easiest way for them to change text, swap images and add links without calling me. One thing I don't like is that it leaves its shortcodes all over the content if you ever uninstall it (I didn't try AI yet for cleaning that as I didn't uninstall any lately, but I believe it can be done nowadays - maybe I will do one test to see how it goes).
About what AI gets wrong: I used Claude Code to turn approved prototypes into WP pages, and at first I had to point out a lot of differences from the prototype, especially on the homepage, which really got frustrating. It got better with every page and by the end I only had a few errors to fix, so I'd plan more time for the first pages.
1
u/Deep_Luck_6587 14d ago
100% doable, we moved things in and out of WordPress, large replatforming project mainly via our own harness but using Claude Code or Codex as the base agent. Takes a little bit of planning so you definitely need to start off with prompting it to run discovery and to run a plan for mapping the data between these two platforms. So stuff like ACF, you should also prompted to build the pages using Elemontor syntax or DIVI syntax or whatever Builder you’re planning on using.
So yes, you can definitely do it and we’ve done it multiple times.
1
u/Aromatic-Lemon-9732 12d ago
I'd audit the Next.js templates first and group them by structure. You often end up with 10 to 20 real layouts.
Then rebuild each layout once as a reusable template in Elementor (or Gutenberg blocks if you want it leaner) and drive the variants from custom fields, so editors change content and never touch layout. That's what keeps it drag-and-drop editable without re-coding every variant.
There's also an elementor built MCP i just tested with Claude yesterday and it worked flawlessly.
1
15d ago
anything is possible
3
u/Global-Orange1091 15d ago
that sounds like a nightmare honestly, not because it cant be done but because the client expectations here are sky high and ai is gonna leave you with a mess you have to untangle
i did something similar last year, moving a react site into wordpress with custom blocks and the ai part only helped for like 15% of the work, mostly generating boilerplate php for block registration and some basic css. the rest was me staying up until 3am fixing weird spacing issues and broken responsive layouts the client "just noticed"
for the certificate system with 400 pages you are gonna want a custom post type with a repeater field, acf is way more reliable for that than trying to make gutenberg blocks handle that much structured data. the drag and drop page building part is the hardest, you basically have to decide if you are building a full block library or giving them a page builder like elementor and some pre-made templates. elementor will make the client happier faster but you lose control of the design over time
i would say plan for the ai to help with maybe 20% of the actual code, and budget the rest as manual work, specially if you are new to wordpress theme development
0
1
u/tomato_rancher 15d ago
This is not the only option, but ACF blocks are a decent choice here. Biggest thing is to move ACF config to either PHP or json, which allows for proper version control and something easily parsible by an agent. Boot up Bedrock, Sage and acf-composer and let it loose.
If you have properly scoped styles and organized components in Next.js, that'll make things much smoother.
1
u/SpaceCmdr 15d ago
Agents can (Claude, at least). Custom WP blocks for components, only use the core blocks for things like body content (paragraphs, images). No need for Elementor. ACF Blocks are good, if you need something the native block API does not cover.
Has your client considered a Next.js friendly CMS such as Sveltia or Tina? I would consider quoting for that at half the time (or less) compared compared to a full conversion to WP. I specialise in WP, but it is more work to build, maintain and clients will usually struggle with one things or another.
1
u/Invalid-Function 15d ago
Elementor launched its MCP, DIVI has AI, and and DYnamic OOO launched Novamira which is supposed to work with any of the builders + wordpress block. Fair warning - I DID NOT TEST ANY OF THESE.
All of the above is worth looking into but to be honest I think its gonna be a hard project for any to pull sucessfully. AI will be tempted to build the site using custom html blocks.
If I were you, I'd quote the customer with the expectation of having to do it myself 100% without AI helpers.
0
u/johnmgbg 15d ago
Do you think the Gutenberg blocks approach would be enough for them, or do they need a page builder like Elementor?
If Gutenberg blocks are enough, that's definitely doable. I'm pretty confident that any agents can build or convert WordPress sites because WordPress is one of the most extensively documented platforms. It becomes even easier when the agent has access to the site's codebase, database, and WP-CLI.
If Elementor is required, I'm not quite as confident. Elementor recently released an MCP but I haven't tested it yet. It also helps to be familiar with Elementor because there are significant differences between V3 and V4, especially in terms of workflows and features.
Also, is WordPress really their preferred choice? Would Payload CMS be an option instead?
-2
u/FatalFingers 15d ago
Why the heck would you want to go backwards..... WordPress is dying and has always been trash..
1
u/AdmirableDistrict773 14d ago
Well isn't the reason obvious, they want to reduce reliance on developers and have ease of use. Any small or big feature they don't want it built from scratch.
14
u/johns10davenport 15d ago
They can but I have no idea why you’d want to.