• Resolved zozothemes

    (@zozothemes)


    When cloning a WordPress site programmatically (multisite or single-site), Elementor pages and the Elementor Kit are copied correctly at the database level, but Elementor shows:

    “Your site doesn’t have a default kit. Please create one.”

    This happens even though:

    • elementor_active_kit option exists and points to a valid elementor_library post
    • The kit post is published
    • _elementor_data exists on the kit
    • _elementor_edit_mode = builder
    • _elementor_template_type = kit

    Frontend may partially render, but the Elementor editor shows a black screen until the kit is manually recreated.Steps to Reproduce

    1. Programmatically clone a site:
      • Copy posts/pages
      • Copy Elementor meta (_elementor_data, _elementor_version, etc.)
      • Copy Elementor Kit (elementor_library post)
    2. Set elementor_active_kit to the new kit ID
    3. Attempt to edit a page with Elementor

    Expected Result

    Elementor should recognize the existing kit and load the editor normally.Actual Result

    Elementor shows “Default Kit Missing” and requires manual recreation, even though the kit exists and is valid.Key Finding

    Elementor does not recognize a copied Kit unless it is explicitly registered via the Kits Manager.

    Calling only:

    $document = \Elementor\Plugin::$instance->documents->get( $kit_id ); $document->save();

    is not sufficient.

    The issue is resolved only when the kit is explicitly activated using:

    \Elementor\Plugin::$instance->kits_manager->set_active_kit( $kit_id );

    This requirement is not documented and is easy to miss for importers, demo provisioners, and migration tools.Suggested Improvement

    Either:

    • Automatically register a valid kit when elementor_active_kit points to an existing kit post
      OR
    • Document that kits_manager->set_active_kit() is required for programmatic setups.
Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support Milos

    (@miloss84)

    Hi there,

    Thanks for reaching out and for the detailed explanation.

    I’ve taken a look at your query, since it involves Elementor’s internal code behavior when cloning/migrating a WordPress site programmatically (including how the default Kit is created/assigned). The best place to get accurate guidance is directly from our developers.

    I recommend submitting this as a report/question on our GitHub repository, including the steps you’re taking to clone the site, and any relevant details/logs:

    You can post it here: https://github.com/elementor/elementor/issues

    This will allow our dev team (and community contributors) to review the behavior and advise the proper approach.

    Kind regards

    Plugin Support Enrique

    (@eenrique)

    While your cloning script successfully moves the Elementor data, it bypasses the “Activation” sequence required by the Elementor Kits Manager.

    In Elementor, a Kit is not just a database entry; it is a system-wide configuration that must be “registered.” Moving forward, your scripts must explicitly trigger the set_active_kit method to ensure the editor recognizes the styles and settings immediately upon cloning.

    A note for your webmaster or web hosting provider:
    —–
    Hosting Provider Note
    Attention: System Administrator / DevOps When running programmatic migrations, ensure the PHP process has sufficient memory_limit (256M+) to handle Elementor’s CSS regeneration.

    After database search-and-replace, the following command/script must be executed to register the Kit: \Elementor\Plugin::$instance->kits_manager->set_active_kit( $new_kit_id ); This ensures wp-content/uploads/elementor/css/global.css is correctly generated for the new environment.
    —–

    Thread Starter zozothemes

    (@zozothemes)

    Thank you both for the clarification regarding the Kits Manager activation requirement.

    I implemented the suggested solution and explicitly triggered:

    \Elementor\Plugin::$instance->kits_manager->set_active_kit( $new_kit_id );

    after cloning and setting the elementor_active_kit option. However, I am still experiencing issues where:

    • Elementor continues to show “Your site doesn’t have a default kit.”
    • The editor loads with a black screen in some cases.
    • The kit post exists, is published, contains _elementor_data, _elementor_template_type = kit, and _elementor_edit_mode = builder.
    • The elementor_active_kit option correctly points to the new kit ID.
    • CSS files under wp-content/uploads/elementor/css/ are not consistently regenerated.

    Additional Notes:

    • Elementor is active before the cloning routine runs.
    • elementor/init and elementor/documents/register_post_type are triggered on the new blog before kit cloning.
    • Memory limit is set above 256M.
    • No fatal PHP errors are logged.
    • This is occurring in a multisite environment during programmatic blog provisioning.

    At the database level everything appears structurally correct, but Elementor does not consistently recognize the cloned kit as fully registered.

    Could you please clarify:

    1. Is there any additional internal hook or initialization sequence that must run after set_active_kit()?
    2. Should \Elementor\Plugin::$instance->documents->get( $kit_id )->save() be executed before or after set_active_kit()?
    3. Is there a required CSS regeneration call (for example via the CSS files manager) that must be explicitly triggered?
    4. In a multisite context, does the Kits Manager rely on any transient, cache layer, or internal state that needs manual clearing?
    Plugin Support Milos

    (@miloss84)

    Hi there,

    Thanks for reaching out to us again.

    As we recommend to you in the previsu message, this is best handled directly by our development team to ensure you receive precise and technically accurate guidance.

    Please go ahead and submit this as a detailed report on our GitHub repository. Make sure to include the exact steps you’re following to clone the site, along with any relevant logs or additional details that could help with reproduction.

    You can post it here: https://github.com/elementor/elementor/issues

    This will allow our developers and community contributors to properly review the case and guide you toward the correct approach.

    Kind regards,

Viewing 4 replies - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.