Tutorials
Deploying a Custom Elementor Site in One Cursor Session
Bootstrapping a custom Elementor site traditionally takes hours: scaffold a child theme, register widgets, write page templates, configure menus, install plugins, flush permalinks. With AI Bridge and the wp-elementor-bootstrap skill, an agent can deploy a complete marketing site in one autonomous session — and you review the result in Elementor afterward.
What “one session” actually means
In a recent deploy, a Cursor agent completed the following in under 20 minutes:
- Deployed Hello Elementor child theme with design tokens and BEM CSS
- Created an extras plugin with 15+ custom Elementor widgets
- Built Home, About, Contact, and Blog pages with container-format JSON
- Seeded blog posts, Contact Form 7, and primary navigation
- Fixed Elementor 4.x editor compatibility (containers +
isInnerflags)
Phase 1: Scaffold via write_file
The agent writes files directly to disk:
wp-content/themes/your-project-slug/style.css
wp-content/themes/your-project-slug/functions.php
wp-content/themes/your-project-slug/assets/css/tokens.css
wp-content/plugins/your-project-slug-extras/...
Large files deploy through Node-based scripts when PowerShell JSON encoding corrupts payloads — a lesson learned on Windows hosts.
Phase 2: Activate via run_php
POST /wp-json/ai-bridge/v1/tools/run_php
{ "code": "YPS_Setup::run_import();" }
This activates plugins, switches the theme, creates pages, seeds content, and registers Elementor layouts.
Phase 3: Elementor page JSON
Elementor 4.x expects flexbox container elements, not legacy sections. Programmatic JSON must include:
"elType": "container"at the top level"isInner": falseon every element- Widget settings matching each widget’s control defaults
Pages that render on the frontend but show blank in the editor usually mean missing isInner or scroll-reveal CSS hiding content with opacity: 0.
Phase 4: Verify and iterate
After deploy, verify:
- Frontend URLs return 200 with expected widgets
- Elementor editor loads all containers and widgets
- Navigation, forms, and blog posts are visible
- Hard-refresh or clear LiteSpeed cache on Hostinger
The agent builds; you approve. Git diff the theme and plugin before merging to production.