Version: 1.0.0
Status: Production Ready β
Compatibility: WordPress 5.8+, PHP 8.0+, Elementor 3.0+
Transform your Lovable projects into fully functional WordPress websites with Elementor compatibility. Features intelligent plugin recommendations, automatic component detection, and seamless asset migration.
- β ZIP Upload & Analysis - Upload complete Lovable projects directly from GitHub
- β Intelligent Component Detection - Automatically detects forms, popups, filters, galleries, animations, and CPTs
- β Smart Plugin Recommendations - AI-powered plugin matching with 6 functionality categories
- β Elementor Pro/Free Detection - Adapts recommendations based on installed Elementor version
- β Priority-Based Sorting - Prioritizes already installed plugins β Elementor Pro features β Best compatibility
- β ZIP Validation - Comprehensive validation (size, structure, security, MIME type)
- β Asset Import - Automatic media library integration for images and files
- β CSS Extraction - Preserves Tailwind colors, fonts, and custom styles
- β Page Creation - Generates WordPress pages with Elementor metadata
- β Plugin Auto-Install - One-click installation and activation from WordPress.org
- π¨ 85-90% Style Preservation - Maintains design fidelity through CSS extraction
- π 20+ Plugin Mappings - Curated recommendations for FREE and PREMIUM solutions
- π― User Preference Memory - Remembers plugin choices for future imports
- π Security First - Nonce verification, capability checks, file sanitization
- π Translation Ready - Full i18n support with
.potfile included - π Import Statistics - Real-time progress tracking (pages created, plugins installed)
- β‘ Hooks & Filters - Extensible architecture with 10+ action hooks
- WordPress 5.8 or higher
- PHP 8.0 or higher
- Elementor (Free or Pro)
- PHP ZipArchive extension
upload_max_filesizeβ₯ 50MB (recommended)
-
Download the plugin:
git clone https://github.com/WEBLOTI/lovable-to-wordpress.git
-
Upload to WordPress:
cp -r lovable-to-wordpress /path/to/wordpress/wp-content/plugins/
-
Activate:
- Go to
Pluginsin WordPress admin - Find "Lovable to WordPress"
- Click "Activate"
- Go to
-
Access:
- Navigate to
Lovable to WordPressin admin menu - Upload your Lovable project ZIP
- Navigate to
Export from Lovable/GitHub:
git clone <your-lovable-repo>
cd <your-lovable-repo>
zip -r lovable-project.zip .Required Structure:
lovable-project.zip
βββ src/
β βββ components/
β βββ pages/
β βββ ...
βββ public/
β βββ assets/
βββ package.json
- Go to Lovable to WordPress in admin menu
- Click "Choose ZIP file or drag here"
- Select your
lovable-project.zip - Click "Analyze Project"
The system will:
- β Validate ZIP structure
- β Extract project information
- β Detect components (forms, popups, etc.)
- β Generate plugin recommendations
Review recommendations for each detected functionality:
Example: Forms Detected
- JetFormBuilder (95%) - FREE β (Recommended - Already Installed)
- Fluent Forms (90%) - FREE
- WPForms Lite (85%) - FREE
- Contact Form 7 (75%) - FREE
- Skip / Manual Setup
Example: Popups Detected (with Elementor Pro)
- Elementor Pro Popup Builder (98%) - PREMIUM β (Only option shown)
Example: Animations Detected (with Elementor Free)
- WPCode (92%) - FREE β (Best free option)
- Elementor Motion Effects (90%) - NATIVE FREE
- Custom CSS/JS Animations (85%) - NATIVE FREE
- β Automatically install selected plugins - Downloads from WordPress.org
- β Import images and assets - Uploads to Media Library
- β Apply Lovable CSS styles - Injects Tailwind and custom CSS
- β Remember my plugin choices - Saves preferences for future imports
Click "Import to WordPress" and wait for completion.
Success Message:
β
Import Completed Successfully!
5 pages created | 3 plugins installed
| Functionality | Detection Patterns | Recommended Solutions | Free Options |
|---|---|---|---|
| Popups/Modals | Dialog, Modal, Popover | Elementor Pro (98%), JetPopup (95%), Popup Maker (90%) | Popup Maker, Popup Anything |
| Forms | react-hook-form, useForm | JetFormBuilder (95%), Fluent Forms (90%), WPForms (85%) | All 4 options |
| Filters/Search | filter, search, Select | JetSmartFilters (95%), Search & Filter (80%) | Search & Filter |
| CPTs | mockListings, data/ | JetEngine (95%), ACF (90%), Meta Box (85%) | ACF, Meta Box, CPTUI |
| Gallery | Gallery, Carousel | JetEngine (95%), JetElements (92%), Elementor (90%) | Elementor native |
| Animations | framer-motion, motion | Elementor Pro (95%), WPCode (92%), Elementor (90%) | WPCode, Custom CSS |
Plugins are sorted by:
- Active Plugins (Highest Priority) - User's existing setup
- Installed Plugins - Already downloaded
- Elementor Pro Features - If Pro is active
- Compatibility Score - Technical best match
Automatically extracts and converts:
- β Tailwind utility classes β WordPress CSS
- β Custom colors & gradients
- β Typography (fonts, sizes, weights)
- β Spacing (margins, paddings)
- β Flexbox/Grid layouts
- β Animations & transitions
Lovable (Tailwind):
<div className="bg-gradient-to-r from-purple-600 to-blue-500 p-8 rounded-lg">
<h1 className="text-4xl font-bold text-white">Hello</h1>
</div>WordPress (Generated CSS):
.lovable-section-1 {
background: linear-gradient(to right, #9333ea, #3b82f6);
padding: 2rem;
border-radius: 0.5rem;
}
.lovable-section-1 h1 {
font-size: 2.25rem;
font-weight: 700;
color: #ffffff;
}// Before import starts
do_action('l2wp_before_import_start', $analysis_result, $plugin_choices);
// After each page is created
do_action('l2wp_page_created_from_lovable', $page_id, $page_data);
// After import completes
do_action('l2wp_after_import_complete', $import_status);
// Before uninstall
do_action('l2wp_before_uninstall');
// After uninstall
do_action('l2wp_after_uninstall');// Modify max ZIP size (default 50MB)
add_filter('l2wp_max_zip_size', function($size) {
return 104857600; // 100MB
});
// Modify required ZIP structure
add_filter('l2wp_required_zip_structure', function($structure) {
$structure[] = 'custom-folder/';
return $structure;
});
// Modify allowed file extensions
add_filter('l2wp_allowed_file_extensions', function($extensions) {
$extensions[] = 'pdf';
return $extensions;
});
// Control uninstall data deletion
add_filter('l2wp_uninstall_delete_data', function($delete) {
return false; // Keep data on uninstall
});// Check if Elementor is active
l2wp_is_elementor_active();
// Check if plugin is active
l2wp_is_plugin_active('jetformbuilder');
// Install and activate plugin
l2wp_install_plugin('jetformbuilder');
// Import assets
l2wp_import_assets($assets_array);
// Replace placeholders in content
l2wp_replace_placeholders($content, $post_id);L2WP_Main (lovable-to-wordpress.php)
βββ L2WP_ZIP_Validator (class-l2wp-zip-validator.php)
βββ L2WP_ZIP_Analyzer (class-l2wp-zip-analyzer.php)
βββ L2WP_Component_Detector (class-l2wp-component-detector.php)
βββ L2WP_Plugin_Recommender (class-l2wp-plugin-recommender.php)
βββ L2WP_CSS_Extractor (class-l2wp-css-extractor.php)
βββ L2WP_Elementor_Builder (class-l2wp-elementor-builder.php)
βββ L2WP_API_Bridge (class-l2wp-api-bridge.php)
βββ L2WP_Export_Engine (class-l2wp-export-engine.php)
βββ L2WP_Elementor_Mapper (class-l2wp-elementor-mapper.php)
βββ L2WP_Asset_Loader (class-l2wp-asset-loader.php)
βββ L2WP_Dynamic_Tags (class-l2wp-dynamic-tags.php)
1. ZIP Upload
β
2. L2WP_ZIP_Validator validates
β
3. L2WP_ZIP_Analyzer extracts structure
β
4. L2WP_Component_Detector scans for patterns
β
5. L2WP_Plugin_Recommender generates options
β
6. User selects plugins
β
7. L2WP_Main::handle_import_submission()
β
8. Install plugins via l2wp_install_plugin()
β
9. Create pages via wp_insert_post()
β
10. Import assets via l2wp_import_assets()
β
11. Extract CSS via L2WP_CSS_Extractor
β
12. Redirect with success message
- β Nonce Verification - All forms protected
- β
Capability Checks -
manage_optionsrequired - β
Input Sanitization -
sanitize_text_field(),esc_html(), etc. - β File Validation - MIME type, extension, size checks
- β ZIP Security Scan - Detects dangerous files (.php, .exe, ../)
- β SQL Injection Prevention - Prepared statements
- β XSS Prevention - Output escaping
- β CSRF Protection - Nonces on all actions
// β
GOOD - Sanitized and escaped
$plugin_slug = sanitize_text_field($_POST['plugin_slug']);
echo esc_html($plugin_slug);
// β BAD - Direct output
echo $_POST['plugin_slug'];- Upload valid Lovable ZIP β Success
- Upload invalid ZIP β Error message shown
- Upload oversized ZIP β "File too large" error
- Upload non-ZIP file β "Must be ZIP" error
- Detect components correctly
- Show correct plugin recommendations
- Prioritize installed plugins
- Install plugins successfully
- Create pages with correct metadata
- Import assets to media library
- Extract and apply CSS
- Show success message with stats
- Reset cache works
- Uninstall cleans up data
Create a test ZIP:
mkdir lovable-test
cd lovable-test
mkdir -p src/components src/pages public/assets
echo '{"name": "test-project"}' > package.json
echo "export default function Home() {}" > src/pages/Home.tsx
zip -r ../lovable-test.zip .- β Complete ZIP validation system
- β Intelligent plugin recommendation engine
- β Elementor Pro/Free detection
- β Priority-based plugin sorting
- β Automatic plugin installation from WordPress.org
- β Asset import to media library
- β CSS extraction and application
- β Page creation with Elementor metadata
- β Import statistics tracking
- β User preference memory
- β Security scans for uploaded ZIPs
- β Error handling and validation messages
- β Translation support (.pot file)
- β Comprehensive uninstall cleanup
- β Developer hooks and filters
- β PHPCS configuration
- β WordPress Coding Standards compliance
- π Refactored all classes to L2WP_ prefix
- π Updated constants to L2WP_ format
- π Improved function naming consistency
- π Enhanced PHPDoc documentation
- β Helper functions fully implemented
- β Template synchronization
- β Message display after import
- β Plugin installation error handling
git clone https://github.com/WEBLOTI/lovable-to-wordpress.git
cd lovable-to-wordpressRun PHPCS:
phpcs --standard=WordPress lovable-to-wordpress.php- Fork the repository
- Create feature branch (
git checkout -b feature/AmazingFeature) - Commit changes (
git commit -m 'Add AmazingFeature') - Push to branch (
git push origin feature/AmazingFeature) - Open Pull Request
GPL v2 or later - https://www.gnu.org/licenses/gpl-2.0.html
WEBLOTI
GitHub: @WEBLOTI
- Elementor team for the excellent page builder
- Crocoblock for JetEngine ecosystem
- WordPress community for coding standards
- Lovable for the amazing design tool
- Issues: GitHub Issues
- Documentation: Wiki
- Email: support@webloti.com
- Unit tests (PHPUnit)
- Integration tests
- GitHub Actions CI/CD
- Advanced Elementor template generation
- Multi-page imports
- Custom field mapping UI
- Gutenberg support
- REST API endpoints
- Import templates library
- Export WordPress back to Lovable
- Cloud storage integration
Made with β€οΈ by WEBLOTI
β Star us on GitHub if this helped you!