WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When I import my WXR XML file it appears that wp_insert_post (or another function) is applying filters to strip php tags that I need to keep in my content.

I have searched the various wp-include php files to locate: wp_insert_post, sanitize_post, wp_strip_all_tags

But I have no clue as to what files to edit and what edits to make to keep from stripping the php tags.

Advice and assistance greatly appreciated. Thanks in advance.

share|improve this question
Normally, a feed doesn't hold php tags. Please show all your code and what you're doing exactly (use the edit link). – kaiser Aug 11 '12 at 13:16

Changing WordPress -- installed all the right plugins?
Just wondering are you migrating WordPress? ... Did you have a plugin like Exec-PHP allowing PHP content in posts and pages on one install and that plugin is not active in another install of WordPress?

WordPress by default doesn't allow PHP in posts and pages so this could be your problem.

Check your WordPress database with PHPMyAdmin or any other SQL tool
You should also browse your WordPress database and check if the content is there in one of the posts. It's not likely that the importer stripped out your code.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.