Back to Community

Troubleshooting Common One Click Demo Import Issues: From Failed XML Uploads to Missing Content

29 threads Sep 16, 2025 PluginOne click demo import

Content

One Click Demo Import (OCDI) is a powerful plugin that simplifies setting up a new WordPress site. However, users occasionally run into snags where content doesn't import correctly, or the process fails entirely. Based on common community reports, this guide explains why these issues happen and provides the most effective solutions to get your demo data imported successfully.

1. The "No Import Files Specified" or "0" Response Error

Why it happens: This error often occurs when the browser or a browser extension interferes with the file upload process. In other cases, it can be caused by an extremely large XML file that the server struggles to process.

How to fix it:

  • First, try using a different web browser to perform the import, preferably one with no or few extensions installed.
  • Check your browser's developer console for any JavaScript errors during the upload process.
  • If the problem persists, inspect your XML file. Open it in a browser like Chrome. If it doesn't display properly and shows an error (e.g., "XML declaration allowed only at the start of the document"), your file is malformed. Ensure there are no blank lines or spaces before the <?xml declaration at the very top of the file.

2. Posts, Pages, or Custom Post Types Not Importing

Why it happens: If your XML file works with the standard WordPress Importer tool but not with OCDI, the issue is often related to custom post types. OCDI will skip importing any post type that is not currently registered on the site. This means if your theme or a required plugin that defines a custom post type is not active before you run the import, those items will be ignored. Server timeouts or memory limits on large files can also cause a partial import.

How to fix it:

  • Ensure all required plugins for your theme are installed and activated before starting the demo import.
  • Verify that your custom post types are being registered correctly by your theme.
  • If only a subset of content imports, your server may have hit a resource limit. Try increasing your PHP max_execution_time and memory_limit.

3. Customizer Settings Not Importing or Applying

Why it happens: The most common reason for customizer settings (.dat or .json files) not importing is an incorrect file format. The file might be malformed or not generated by a compatible export tool. Sometimes, settings import into the database but don't immediately reflect on the frontend due to caching.

How to fix it:

  • Double-check the format of your customizer import file. It must be a valid export from the WordPress customizer or a compatible plugin.
  • If settings appear in the customizer but not on the frontend, try simply re-saving the customizer settings after the import is complete. This often refreshes the cache and applies the changes.
  • Some users have found that adding add_action( 'pt-ocdi/enable_wp_customize_save_hooks', '__return_true' ); to their theme's functions.php file can help, though results may vary.

4. Elementor Content Issues (Broken URLs or Metadata)

Why it happens: Elementor stores page layout data as serialized JSON in the _elementor_data postmeta field. During import, URLs within this data may not be updated from the old demo site URL to your new site's URL. Furthermore, some processes may not fully apply the imported Elementor metadata to the frontend content.

How to fix it:

  • After importing, use Elementor's built-in Tools > Replace URL feature to update all links manually.
  • For a code-based solution, you can run a database query to find and replace URLs in the Elementor meta data. The following code snippet can be placed in your theme's functions.php file (use with caution and always backup first):
if ( class_exists( 'ElementorPlugin' ) ) {
    global $wpdb;
    $old_url = 'https://your-old-demo-site.com'; // No trailing slash
    $new_url = get_site_url(); // Gets the current site URL
    $escaped_old = str_replace( '/', '\/', $old_url );
    $escaped_new = str_replace( '/', '\/', $new_url );

    $wpdb->query(
        $wpdb->prepare(
            "UPDATE {$wpdb->postmeta} " .
            'SET meta_value = REPLACE(meta_value, %s, %s) ' .
            "WHERE meta_key = '_elementor_data' AND meta_value LIKE '%[%'",
            $escaped_old,
            $escaped_new
        )
    );
}

5. Media and Authors Not Importing as Expected

Why it happens: OCDI imports all content under the current WordPress user. It does not map authors from the import file to existing users on the site, a feature the standard WordPress importer has. For media, the plugin imports files by downloading them from their original URLs specified in the XML file. If those URLs are not accessible (e.g., from a localhost export), the media will fail to import.

How to fix it:

  • Authors: This is expected behavior. All imported content will be assigned to the user who is running the import.
  • Media: If you are a theme author creating a demo file, ensure all images are hosted on a publicly accessible server. For users importing from a localhost export, you will need to use a different migration tool or manually upload your media library.

General Troubleshooting Tips

  • Always Check the Log: After an import, check the OCDI log in the Media > Imported section of your WordPress admin. It provides valuable clues about what was and wasn't imported.
  • Enable Debugging: Enable WordPress debugging to log any PHP errors that might be occurring during the import process.
  • Contact Your Theme Developer: Many import issues are specific to how a theme bundles its demo data. If you followed this guide and are still stuck, your best next step is to contact the support for your specific theme for further assistance.

Related Support Threads Support