How to Import Content From Socast

How to Import Content From Socast

How to Import Featured Images and Attach Them to Your Articles in WordPress

So you’ve decided to self-host your content? We get it. And we’re here to make your transition as smooth as possible. One common question we get is:
"How do I import my featured images and attach them to my posts after export?"
Let’s walk through it.

What You’ll Get in Your Export

When you export your site (typically via WordPress WXR/XML), each post includes a meta field like:
  1. <thumbnail_url><![CDATA[https://example.com/uploads/my-image.jpg]]></thumbnail_url>
If you're a developer or have developer access, you can hook into the import process and let WordPress do the heavy lifting.
Here’s the code you (or your dev) can drop into your theme’s functions.php or a custom plugin:
  1. add_action('import_post_meta', function($post_id, $key, $value) {
  2.     if ($key === '_thumbnail_url') {
  3.         $image_url = esc_url_raw($value);
  4.         $image_id = media_sideload_image($image_url, $post_id, null, 'id');

  5.         if (!is_wp_error($image_id)) {
  6.             set_post_thumbnail($post_id, $image_id);
  7.         }
  8.     }
  9. }, 10, 3);

This will:
  • Automatically download the image from the _thumbnail_url
  • Attach it to the post
  • And assign it as the featured image
💡 Make sure allow_url_fopen is enabled on your server, and your import XML includes _thumbnail_url as a meta tag.

Option 2: Use WP All Import (no coding)

Not a developer? No worries — use the awesome WP All Import plugin.

  1. Install WP All Import and upload your WXR file.
  2. During the import setup:
  • Import _thumbnail_url as a Custom Field
  • Go to the Media tab.
  • Enable "Download images hosted elsewhere"
  • Map the _thumbnail_url value to the featured image.
That’s it! The plugin will handle the download and image attachment for you.

Final Notes

  • The official WordPress import tool doesn’t handle remote featured images, so one of the above methods is required.
  • Once set properly, your featured images will show up just like before!

    • Related Articles

    • How can I import historical website content? (Content Import)

      SoCast provides historical content import for 1 file per website during onboarding and prior to website launch. For more information on historical content import contact your Client Success Onboarding Associate or SoCast Support at ...
    • Getting Started

      Welcome to SoCast! This section will provide you with all the information you need to get started and prepare your website for launch. Setting up Your SoCast Account SoCast Client Preparation List How To Optimize Your Website For The Best User ...
    • Importing your Member / Listener Club Database

      As part of setting up your website, SoCast will arrange to import your existing Member / Listener Club Database.  Please coordinate this process with your designated SoCast contact.  As they contain personal information, we ask that all files are ...
    • Setting up Your SoCast Account

      Please follow the instructions below: A SoCast employee will create your personal account. Once created you will be sent an email from SoCast with your login credentials This email will come from: no-reply@socastsrm.com In the email from SoCast you ...
    • SoCast Client Preparation List

      Name Description ACCOUNT SET-UP Account Names Full names of the radio stations, regions or networks Company Administrator Names and Emails of users responsible for administering accounts Network Admin Contact Name and email of first point of contact ...