Disable wpautop Plugin
A simple plugin to disable the WordPress wpautop function. This is the function that automatically formats your posts.
Installation
Installation is just like any WordPress plugin:
- Download disable-wpautop.zip
- Unzip
- Upload to
/wp-content/pluginson your server - Activate the plugin
You can find full details of installing a plugin on the plugin installation page.
If you find that breaks (<br/>) are being stripped from your posts then look at this WordPress support page.






Comments (page 2 of 3)
Feb 2, 2008 3:27 pm
Great plugin. You saved me a lot of headaches. Thank you.
Jan 15, 2008 5:23 pm
Nothing beats a plugin with a total of two lines of code, I like it. Thanks for keeping it short and simple.
Jan 2, 2008 3:16 am
Once again a lifesaving plugin. Next time, I won't even try to find answers to my issues from Google or Wordpress support forums. I'll come straight at the Urban Giraffe. My issue was that I was pasting bits from old html pages (with linefeeds in-between p tags, which are supposed to be transparent), and the wordpress editor (even the 'code only') managed to make every single line into a paragraph. Solved now. Thank you so much.
Aug 18, 2007 5:00 pm
http://yeago.net/works/problem-issue-with-wordpress-messing-up-html-with-p-and-br-tags
...woops. Must not understand the a tag as well as I thought. =)
Aug 18, 2007 4:59 pm
In the event that you don't want to disable wpautop entirely...
Jul 19, 2007 3:45 am
My website - notsonews.com - is powered by wordpress 2.2.1 and this plugin works like a charm. I have posted a "thank you" message and a "do follow" link towards this page on my about pages. Many Thanks!
Jul 7, 2007 4:10 am
HI Guys,
I am using WP 2.1 and also had the plugin fail. However, I thank John for taking the time to share his findings, and develop a plugin.
I was having the "div" tags stripped out of my pages and replaced with "p"'s. What happens is TinyMCE is programmed to replace tags it does not recognize. Therefore, we just need to bring whatever the 'problem' tag is to TinyMCE's attention, and let it know we want to include it as a valid tag/element.
Here is the solution I found for correcting the "div" issue. You can use these same instructions for including additional tags however.
1. Open the file called tiny_mce.js located in the wp-includes\js\tinymce folder
2. Goto line 130 - look for this: this._def("extended_valid_elements", "");
3. Change it to this: this._def("extended_valid_elements", "div[id|class]");
Note - You can add other tags in here too if they are giving you problems. Just separate the elements with commas, and include any sub elements within the brackets (I have added the id and class sub-elements above so that they will not be stripped out of the div element. If you wanted to add "style" as a sub element, just append a "|" (no quotes) to "class" and end up with: div[id|class|style]). If you wanted to add an additional element, do this: "div[id|class],br,embed[class|id]". There should only be one set of quotes embracing all of your elements.
That's it! Hope it helps. I cannot promise this will work for everyone, but it worked for me. Best of luck!
Jun 28, 2007 8:32 pm
Rob, are you logged in as an admin user? WP can strip certain things out if you are not admin. This plugin may solve your problem (but then it may not be the fault of the auto paragraph function). I've tried entering style tags myself and it works fine, so something is definitely playing with you.
Subscribe to comments is coming soon along with a forum!
Jun 28, 2007 10:41 am
Question for you: I have been editing and re-editing fricken tags over and over because WP keeps clearing out my "style='float:right'". It works once, but if I go to re-edit the page for any reason, it strips out the style tag.
will this plugin stop that behavior? Yes, I know, use css.
ps, I highly recommend you get and install the "subscribe to comments" plugin. lets users subscribe to the comments and get notified when a comment is replied to. Generates more page views as well as happy commenters getting answers to their questions
Apr 27, 2007 12:44 am
Manu, this plugin doesnt change a post at all, just how it is displayed. I don't know what you mean by 'p class para'
Leave a comment