I want to paste into Wordpress posts large amounts of text stored in MS-Word files.

When I directly copy-paste from MS-Word, the page usually breaks because of various MS-Word control characters.

So I prefer to save my text as .txt and then copy pure text and paste it in Wordpress.

However, I then lose all formatting, like bold and italics.

Any ideas?

4 Answers 4


Maybe you can take a look at the XML-RPC function and using Microsoft Live Writer. I think this will keep all your formats in tact.

Further is gives you a nice interface to work with in a desktop environment. All you have to do is enable this function in the backend, options -> write.

Download and install Microsoft Live Writer and you are ready to go.



Another option is the paste from Word button on the toolbar. The option is under the kitchen sink view. Here is more info: http://blogsolace.com/how-to-use-the-paste-from-word-feature-in-wordpress/


Under Linux at least, the Word-paste button loses a lot of useful formatting, such as titles or tables, and even bold and italics.

A work-around that I am using is by HTML export, and copy-pasting the HTML code into the HTML input box of Wordpress. For this, you need the HTML export to be clean enough, this is now mostly the case with OpenOffice-produced HTML.

To do this:

  • Open document in OpenOffice writer
  • List item
  • Save as HTML
  • Open HTML in notepad or other text editing tool
  • Select the relevant section and copy it
  • Open the post in Wordpress, click "HTML" to have the source code version
  • Paste at the correct place within your post (using your usual paste method, eg. CTRL-V).

Another option would be to use the_content filter along with some sort of parser, such as PHPDOMDocument, to remove the unneccessary tags.


function parse_my_content($html) {
    $phpdom = new \DOMDocument;
    // do some parser magic ....
    $result = $phpdom->saveHTML();
    return $result;


add_filter('the_content', 'parse_my_content', 11, 1);

// if you do not want to save it to database, fires on each adding/editing the post
add_filter('wp_insert_post', function($post_arr) {
    $post_arr->content = parse_my_content($post_arr);
    return $post_arr;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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