If you moving your WordPress to another server or hosting or for any other reason you may be want to export all of your WordPress contents including posts, pages, media to an XML file, so later you can import it to your another WordPress. This is very simple while WordPress has built export mechanism.
So how to export?
Login to your WordPress dashboard then follow below screenshot.
Click on ‘Export’ under Tools menu, now choose what you want to export, you can export all WordPress content or just posts or pages or media, select then click on ‘Download Export File’ button. It could take only few seconds or minutes, depends on how much posts or media you have in your installation. You should have then a XML file.
Want to import your XML file back to your WordPress? You can read this article how to import contents from XML file.