Troubleshooting Common One Click Demo Import Issues: From Failed XML Uploads to Missing Content
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
<?xmldeclaration 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_timeandmemory_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'sfunctions.phpfile 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.phpfile (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
-
Import Fails If Audio Files Exist In Mediahttps://wordpress.org/support/topic/import-fails-if-audio-files-exist-in-media/
-
Author not imported when importing mediahttps://wordpress.org/support/topic/author-not-imported-when-importing-media/
-
Posts and Pages does not get importedhttps://wordpress.org/support/topic/posts-and-pages-does-not-get-imported/
-
Not importing all the pageshttps://wordpress.org/support/topic/not-importing-all-the-pages/
-
Elementor Content URLs don’t get updatedhttps://wordpress.org/support/topic/elementor-content-urls-dont-get-updated/
-
Divi Theme Compatible?https://wordpress.org/support/topic/divi-theme-compatible/
-
Elementor metadata not being applied to contenthttps://wordpress.org/support/topic/elementor-metadata-not-being-applied-to-content/
-
Block theme import and settingshttps://wordpress.org/support/topic/block-theme-import-and-settings/
-
Demo Import import nothinghttps://wordpress.org/support/topic/demo-import-import-nothing/
-
Posts and custom post type not importinghttps://wordpress.org/support/topic/posts-and-custom-post-type-not-importing/
-
Critical Error Uncaught ValueError: XMLReader::open()https://wordpress.org/support/topic/critical-error-uncaught-valueerror-xmlreaderopen/
-
Return 0 on XML importhttps://wordpress.org/support/topic/return-0-on-xml-import/
-
Everything imported are emptyhttps://wordpress.org/support/topic/everything-imported-are-empty/
-
customizer data not importedhttps://wordpress.org/support/topic/customizer-data-not-imported/
-
Only Post and Page from XML file not importinghttps://wordpress.org/support/topic/only-post-and-page-from-xml-file-not-importing/
-
Not import xml contenthttps://wordpress.org/support/topic/not-import-xml-content/
-
Import to Localhost on XAMPPhttps://wordpress.org/support/topic/import-to-localhost-on-xampp/
-
How can I use a standard plugin WordPress Importer?https://wordpress.org/support/topic/how-can-i-use-a-standard-plugin-wordpress-importer/
-
Customizer file = not defined!https://wordpress.org/support/topic/customizer-file-not-defined/
-
import problemshttps://wordpress.org/support/topic/import-problems-15/
-
number of authors with author meta import through XML file using.https://wordpress.org/support/topic/number-of-authors-with-author-meta-import-through-xml-file-using/
-
How do locally exported attachments work with OCDI?https://wordpress.org/support/topic/how-do-locally-exported-attachments-work-with-ocdi/
-
No Import Files Specified Errorhttps://wordpress.org/support/topic/no-import-files-specified-error/
-
backslashes are removedhttps://wordpress.org/support/topic/backslashes-are-removed/
-
customizer settings are not importedhttps://wordpress.org/support/topic/customizer-settings-are-not-imported/
-
How To Exporthttps://wordpress.org/support/topic/how-to-export-9/
-
Can I export the custom table and then import the custom table?https://wordpress.org/support/topic/can-i-export-the-custom-table-and-then-import-the-custom-table/
-
Customizer import doesn’t show up on frontendhttps://wordpress.org/support/topic/customizer-import-doesnt-show-up-on-frontend/
-
Partial Importing Issueshttps://wordpress.org/support/topic/partial-importing-issues/