WordPress2Doc is a small program I developed, that enables you to convert your WordPress articles into Word (docx) documents. In addition to the Word format (.docx) the PDF format (.pdf) is available as a target format. For the conversion, the program makes use of the WordPress export XML file and can convert the items inside the export file in one or both of the aforementioned formats.
Tip: The download link for WordPress2Doc is at the end of this article! Who needs no further information, can now confidently scroll to the bottom of the article.
How to convert WordPress articles into pdf and docx files
To convert your WordPress articles into .docx or .pdf format, the relevant articles must be exported from WordPress at first. This can be done at WordPress’ backend. Therefore open the administration page of your blog and navigate to the “Tools-> Export” menu in the WordPress backend.
In the export menu arrived, the “Posts” option must be selected. Then, depending on the desired, more restrictions can be set. By clicking on the “Download Export File” button relevant items are exported into a xml file.
At this point WordPress2Doc comes into play. After the start of WordPress2Doc the downloaded export file must be opened with a click on the tile “Load WordPress export.xml”.
Now the “Choose items” tab opens itself. On this tab you can once again choose if all or just a selection of your articles should be converted. Therefore you can use the “select all” and “deselect all” buttons or check the articles by hand in the article list.
If you are not sure about the content of an article and therefore do not know if you would like to convert it, so you can open a preview with a double click on the item in the article list. The preview is rendered either as HTML or as source code on the right side of the WordPress2Doc interface.
If you have choosen your desired articles, you have to switch to the “Convert” tab. In this tab, the export format can be defined. The selected WordPress items can be converted in the .pdf format or just the .docx format or as well as in both formats at the same time.
Video Tutorial
Download WordPress2Doc
The download of WordPress2Doc is (of course) free! Anyone who wants to use only the program, should decide to click on the top download link. The others, who wants to know how WordPress2Doc works or would like to improve it, should opt for the second link (GitHub) where you’ll get the WordPress2Doc sourcecode.
Download WordPress2Doc (Version 1.2.8.5)
WordPress2Doc source code (GitHub)
I wan’t you!
I need you – help us to do better. Basically there are 3 ways to help:
- You comment on this article and give me your criticism, suggestions for improvement and/or new ideas.
- You help to translate WordPress2Doc. Since now there are only translations into “German” and “English” available. If you speak another language, join us and help translating! A list of phrases to be translated can be found here: WordPress2Doc translation list
- You grab/fork the source code (in the download section of this article) of WordPress2Doc and lay hands on the code itself!
No matter what you choose – your help is always welcome!
No products found.
Thank you for saving my time! Great app!
Awesome tool – you should make it into a plugin!
Stumbled on this post in a search of how to convert a WordPress site to a doc/pdf.
Tried out your program; it works well for the text of the blog. But is there a way to grab the pictures from each post and include those in the doc/pdf?
Thanks…Rick..
Hi Rick,
the tools takes the HTML from the export XML file and converts it into Word- and PDF-documents. If the HTML contains links to image, the tools downloads the images and embeds them or tries to render them live in the document.
If you don’t see pictures this can have two reasons. Either some kind of firewall prevents that the images are shown in the documents or your html doesn’t contain any links to images. (For example if you embedded the images via shortcodes and ids. In this case the tool doesn’t know how to parse these shortcodes and therefore can’t show the images.)
If you like, you can sent me your export XML file ( – doesn’t have to be the full export. One article is enough – ) and I will analyze what’s getting wrong. You can send it to me via e-mail ( webmaster [at] code-bude.net ).
Thank you Raffael – works flawlessly!
I like the fact it is portable as well! (actually thought it was a plugin, but uploading the zip into WP kept giving me errors…. maybe I should read manuals first…).
A few notes:
– no titles are shown in the PDFs/DOCs (only in the file names);
– idem: no dates, no authors (maybe that should be an option only) in the docs;
– perhaps the date in the filename as well? (for grouping/sorting);
– saving the docs, it would be helpful if they were grouped in folders according to month of publication – per year (similar to the Uploads-folder);
– video-links (Youtube) are copied, but not clickable in the docs – perhaps even embedded (so you can watch from within the doc?)
Minor additions (I would think), which would make this tool complete and ‘perfect’!
Hope this helps – thx again!
I tried a handful of fancy WordPress plugins that wouldn’t work, and then I took a chance with your WordPress2Doc and IT WORKED! Very clean conversion to .doc files, and I love how you can export all the WordPress blog entries as one .doc file or as separate .doc files. Thank you!
Thank you so much for the time you put into both creating this and providing an easy to follow tutorial! I can’t afford to pay large amounts of money to have a PDF of my blog, but really wanted one. Is it possible to download comments as well?
Hi! Is there any option to export pages, instead of posts? (or will be in future updates) ?
In time: works like a charm! Great work!
Hi Estevão,
thanks for your kind words. Unfortunately I’m in a big lack of time and really don’t know when I’ll have enough time to add new features. Therefore I released the source code. So feel free to grab it and implement the features you like to have.
You can find the source code on this GitHub page:
https://github.com/codebude/Wordpress2Doc
Greets,
Raffael
Doesn’t work – when I try to import my WordPress XML export file it switches me to an empty ‘Choose Articles’ tab with a message saying ‘Please switch to the Load Export tab and open a WordPress export file before using this tab’ with an arrow pointing back to the first tab. Obviously not recognising my import file. Laptop is running Windows 10, WordPress installation is 4.6.1. Happy to email my xml file for analysis if that helps (Couldn’t paste it here, got an error message ‘comment is too long’) Thanks for your help!
Hey Jim,
just send me the XML file as mail to webmaster [at] code-bude.net
Greetings,
Raffael
Just wrote in to say thank you!! Worked instantly & perfectly.
God bless you!
Thank you so much, this helped me a lot!
This is very nice and helpful topic
For more inforamtion : http://www.labstech.org/open-docx-files-in-2003-msword-2014-05-07/
When I try to open the generated .docx I get the message error “GENERAL I/O ERROR”. The .pff file is correctly exported. I use Openoffice writer or Abiword to open the .docx.
Thanx for your attention
Dante
Good commentary – For my two cents , if people has been needing to merge are interested in merging of , my boss discovered a tool here http://www.altomerge.com.
Hey man that is one fine piece of work right there. The only down side was I had to use my wife’s PC rather than my Mac. Sooooooo slow, but I got it done and when I’m rich and famous from my book, I will give you a shout-out! ;-)
Hi Raffi,
I’m getting an error when I try to load the wordpress xml. It says ” ‘ ‘, hexadecimal value 0x1F, is an invalid character. Line 14205, position 150″
Any help?
Thanks,
Loren
Thanks I appreciate the work.
Wowness. You’re amazing. Thanks so much for this great tool. Very grateful.
Have a great time. Cheers.
Sir, you are a genius. Thank you for this awesome utility!
Sensationell. Danke
Hi Raffi,
I am just sending to say : THANK YOU!
Your software is PERFECT
I cannot believe it is free :-)
you will get a lot of good Karma
you made my day
THANK YOU so much !
THANK YOU THANK YOU !
Worked great for me today, to convert my WordPress blog at http://www.impulsecorp.com to PDF . Thanks!
Can we run this application on MAc???
hi
I wanto to confirm is it a wordpress plugin??. if yes is it competible with wp latest version?? and how to install it??
No, it’s an desktop application. It uses the standard WordPress export.xml-files. And yes, it’s compatible up to the latest version.
Impressive application. It backuped months of my work, and now I can edit it, share it, review it… amazing.
1) Though it seems that Spanish titles are not displayed right. I think it has troubles with the accents. In Spanish the following characters must be respected ( á, é, í, ó, ú, ñ, Á, É, Í, Ó, Ú, Ñ). I don’t know why, but in some titles I can see it, and in other titles the caracter simply dissapear.
Example:
“Todo lo que querías saber sobre el libro de Oseas” -> The accents are there.
“Cmo es que Lehi aprendi egipcio” -> The ó in “Cómo” dissapeared.
2) Also, I can’t see images. It has a placemark, a rectangle, where the image must be, but the image itself dissapeared. It happens since you open the xml file and preview it. It’s previewed without the images.
Hope you would correct this ASAP. Your work is astounding.
Regards.
Brotherly,
JMarichal
http://biblicomentarios.com
Hello JPMarichal,
could you please send me an XML with atleast one article where the spanish characters are working, one where the spanish characters aren’t working and one where the pictures aren’t working.
Please send the XML to: webmaster[at]code-bude.net
Then I’ll see what I can do for you. ;-)
Greetings,
Raffi
Oh and by the way, this is the best tool for this I’ve found, it is incredible how difficult it is to do this!!! This is definitely worth developing further, and I am sure people would not mind paying a few dollars for this, either.
The converter works fine if you have MS Office, but Open Office and other office suites don’t open the docx file (windows 8.1). The pdf’s do open, but don’t have headings in them, sometimes that’s a good thing, sometimes bad. It would be good to have the options of:
a) Choosing between .doc and .docx
b) Choosing whether or not to include the headings
c) Choose to include the post publishing date (and perhaps other meta data to the print out) or not.
I don’t know how much effort all of that would take as I am not a programmer, but there you go.
Thank-you. Perfect tool. Works, simple and really useful. Nice job
Hi Raffi,
great tool, thank you very much.
Simple, easy to understand and very quick. Just what I wanted.
Cheers und nochmals Danke
Christian
I think it’s a great app better then others that I had tried. I have one request is it possible to make corrections to the post in the preview, like remove thinks that I don’t want to include? Other then that I love it. Thanks for your hard work.
I get an error when I want to install the plugin:
Are you shure you want to do this (Weet je zeker dat je dit wilt doen?)
Try again (Opnieuw proberen)
I can only click on Try again and then I get the same result.
Kind regards,
Guy
Sorry, I’m an idiot. I thought WordPress2Doc was a WordPress Plugin. Guess what? It isn’t ;-)
Great tool! תודה :)
Thanks….found this after a google search and it’s fine…
Only thing is like someone else here I just wish the “title” of each of the posts was inserted up top in an for each and every file….that’d be SO cool…
Can I ask is this a “do-able” item in the near future?
Hi Jim,
I added this feature in the new version. Just download version 1.2.0.0 from this blog post and tell me if this is, what you want.
Hi,
Great app, just what i’m looking for. I’m having trouble uploading the wordpress file though. The file generated from WP 2.5 gives the following error when i try to load: “The file you have chosen isn’t well formed”. Do you know what changes i need to make to the XML for it to be valid? I’ve tried searching but can’t find anything anywhere.
Thanks,
Phew! WordPress version 2.5??? That’s really, really outdated. You should update your installation. You missed tons of bugfixes!
But back to topic – if you send me an example XML-output with atleast two articles, I’ll see if I can reqrite the app for 2.5 support.
Just drop me the file with a short comment to: webmaster[at]code-bude.net
Hi Raffi,
Thanks. Yeah, i know, the blog was kind of forgotten about and has been sat their for years.
I’ll send you a file across. Many thanks for your help.
Gavin
unfortunately, it can’t convert blog post title in chinese characters! I have 300+ over posts, half of them with chinese titles. The tool can only export half of it (with english title).
Should be fixed now. (With version 1.2.0.0). Please give me feedback.
Thanks a lot! The software works just great.
The only thing that you might want to susport also is removing shortcodes, but even so its great!
Thank you very much for sharing this most useful application! It’s very useful that the program exports to both DOCX files and PDF files, especially since Open Office cannot natively import the DOCX files (at least on my version). Just a suggestion: further support Open Source files structures – since not everyone can afford Microsoft products. Even Microsoft’s Open XML Converter could not convert the files to a word 97 file structure.
Hello there, nice try with the app. The contents are alright in Greek but I also have a situation with Greek file names, but it doesn’t concern me that. Could you please make these?:
1) All articles in one file (I have more than 500 articles so your app makes more than 500 files).
2) Could you include the post titles inside the file, in the contents? For exaple:
article 1 title
line
line
.
.
.
line
article 2 title
line
line
…
line
I hope you understand what do I mean.
+1
danke
Hi,
This is a really nice app! However I’m having trouble with Greek post titles. The files created have no filename before the .docx.
I guess this doesn’t concern most people, but I thought I’d let you know. There may also be a problem with all other not latin languages.
Thanks for your information. I’ll try to fix it.
Hi,
If you need help with the French translation, let me know. I will install it and report bugs. I’ve been looking for a solution like that for a while now as I get more and more requests to translate WordPress style, and if a customer can export easily, all the better.
Thank you so much for this wonderful article. It worked perfectly and i was able to export all the post into a word document.
Where did your video go??
It’s still there?!
Hi! Thanks so much for putting together this tool.
I just ran it on one of my sites and was a bit surprised by the results. It’s useful, definitely. But I want to share some feedback that may help you further develop this tool:
1. There is no indication anywhere that this outputs individual files for every post. I was under the impression that this would output a single file of each version of the selected output (docx and/or pdf) — so I chose to save to my desktop.
This tool saved over 150 files to my desktop! Oops.
So it would be nice if it was 1. more clear about this and 2. if there was a “save as single file” option.
2. All of the docx files I attempt to open in the open-source LibreOffice Writer program are blank. So there may be an issue there.
3. The PDF files open ok, but I was surprised to note that the only text included in the file(s) are the BODY text. There is no subject/title information in the PDF file (although the PDFs are named the subject/title of the original posts).
So it would be helpful if you included the subject/title text in the file itself, as well.
The posts I used to text were from the ADVICE sections here: http://zerodean.photography/
I hope this feedback helps. Thanks again!
You should make it so that I can copy and paste error messages.
I didn’t expect this to work. :/
Thanks very much for a great utility app. I’ve found it very useful.
Cheers
Hallo Raffi,
do you need the tranlation to portuguese and spanish?
Great tool btw, kudos!
Hi “D”,
thanks for your offer. Yes, I would be really happy, if you would help me with the translations. For easier translation progress you can use the document, linked in the article. ( http://bit.ly/1dBe1xf )
Greets and thanks,
Raffi