WordPress: Youtube Embeds Not Working in Posts After Import

    wordpress-logo-teal
    Let’s say you are importing a WordPress website from another website (e.g. posts, pages, etc.) and notice that Youtube embeds didn’t move over. What do you do?

    Answer: WordPress automatically filters anything that looks “funny,” which includes inline frames. What you do is (from http://wordpress.org/support/topic/youtube-embeds-not-working-after-import):

    You can find in /wp-includes called kses.php. In kses.php, you’ll want to scroll down to line 1309 and comment out the three lines under //Post filtering so that they look like this:

    // Post filtering
    #add_filter(‘content_save_pre’, ‘wp_filter_post_kses’);
    #add_filter(‘excerpt_save_pre’, ‘wp_filter_post_kses’);
    #add_filter(‘content_filtered_save_pre’, ‘wp_filter_post_kses’);

    This will prevent the filter from removing all your youtube videos, slideshare embed, scribd documents, etc. Once you’ve altered the filter and saved it, you’re ready to create your new blogs, hit the Tools menu, and import your XML from your exports above. After the process completes, you should have a working blog with all of your previous content in place exactly as before.

      What you’ll need to do (sorry) is restart from scratch – remove all tables in database, delete wp-config file and start over, with the modified kses file.

      Comments

      comments

      Recent Posts