Support » Fixing WordPress » Doozy of a problem with enclosures

  • topher1078


    I’m having a doozy of a problem with enclosures. In trying to start a podcast, I realized that WordPress was not creating enclosures for media files. I checked MIME types on the server, turned off permalinks, and nothing – WordPress would not create the enclosure for the audio file, so neither various podcasting plugins nor the RSS feed (with the plugin active or inactive) would recognize it. Even tried a brand new WordPress install, new database and everything, and still nothing.

    HOWEVER (and this is where I’m starting to pull my hair out) when I use WordPress with an internal url on the same server as my public site, everything works PERFECTLY. is my public site, hosted on my server, and is the internal test site (hosted on the same server). works perfectly with enclosures, while does not. I’ve even switched back and forth – my live, public site will not create enclosures under, but the exact same site WILL under A brand new WordPress install WILL create enclosures on, but will NOT create enclosures on

    I have no idea why a URL would effect whether or not WordPress would create an enclosure, and the only thing I can think of is that there’s some weird DNS error.

    If anyone has any ideas I would greatly appreciate it!

Viewing 1 replies (of 1 total)
  • WP actually fetches the HTTP headers of URIs in the content of your post to get MIME and length data. the code is in wp-includes/functions.php the do_enclose() function:

    if ( $headers = wp_get_http_headers( $url) ) { ... enclosure making code ... }

    how WP gets the header depends on your PHP setup (it’s usually via the HTTP extension to PHP)

    So, yes any failure to reach that enclosure-to-be’s URL from the server executing the WP PHP, will fail to make enclosures. whether through a DNS failing or too-many referrals, etc.

Viewing 1 replies (of 1 total)
  • The topic ‘Doozy of a problem with enclosures’ is closed to new replies.