Title: WP Messes up PHP when using the runPHP plugin
Last modified: August 18, 2016

---

# WP Messes up PHP when using the runPHP plugin

 *  [jpr1011](https://wordpress.org/support/users/jpr1011/)
 * (@jpr1011)
 * [18 years, 11 months ago](https://wordpress.org/support/topic/wp-messes-up-php-when-using-the-runphp-plugin/)
 * Hi, im kind of a WP noob, so this may be fixable with some option that I overlooked
   or something.
 * I’m using a plugin called runPHP, which is supposed to execute PHP code in your
   posts and pages. I have it all installed and activated and working fine with 
   one exception.
 * Whenever I post PHP code, WordPress filters it and replaces special characters
   with HTML codes.
 * For example, if I use “>” as an operator in PHP, WP replaces it with “>” which
   causes some errors in the PHP.
 * The only way I have to insert unfiltered PHP is to directly edit my mySQL DB,
   which is fine for now, but isn’t going to fly if i get more authors.
 * I am fine with modifying it so that it doesn’t filter my posts like that at all,
   I just don’t know how to do it.
 * P.S: Yes, I am using the “code” tab to enter my PHP code.

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Moderator [Jan Dembowski](https://wordpress.org/support/users/jdembowski/)
 * (@jdembowski)
 * Forum Moderator and Brute Squad
 * [18 years, 11 months ago](https://wordpress.org/support/topic/wp-messes-up-php-when-using-the-runphp-plugin/#post-586176)
 * I use the [Exec-PHP](http://bluesome.net/post/2005/08/18/50/) plugin myself but
   have had this problem too.
 * The solution is to go to the My Profile link in your dashboard (top right of 
   the page), turn off the “Use the visual editor when writing” option (make it 
   un-checked) and save your profile.
 * Once that is done then you should be able to embed PHP code.
 * Embedding PHP code into your posts won’t work even using the “Code” tab in the
   editor (as you have found out).
 * I only embedded PHP in pages and not posts. So doing this with a page that I 
   only change once in a blue moon works for me. For posts I turn the visual editor
   back on.
 *  [furrtrap](https://wordpress.org/support/users/furrtrap/)
 * (@furrtrap)
 * [18 years, 10 months ago](https://wordpress.org/support/topic/wp-messes-up-php-when-using-the-runphp-plugin/#post-586349)
 * [@jdembowski](https://wordpress.org/support/users/jdembowski/):
 * Thanks for the link to Exec-PHP, I just tried it with WP 2.2.1 and it works just
   fine in my posts.
 * I’m just using it so I can code all my hyperlinks with get_bloginfo() it makes
   site cloning much easier.
 * Great stuff, my workflow is now much more elegant 🙂

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘WP Messes up PHP when using the runPHP plugin’ is closed to new replies.

## Tags

 * [htmlspecialchars](https://wordpress.org/support/topic-tag/htmlspecialchars/)
 * [php](https://wordpress.org/support/topic-tag/php/)

 * 2 replies
 * 3 participants
 * Last reply from: [furrtrap](https://wordpress.org/support/users/furrtrap/)
 * Last activity: [18 years, 10 months ago](https://wordpress.org/support/topic/wp-messes-up-php-when-using-the-runphp-plugin/#post-586349)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
