In order to migrate your website hosted with wordpress.com you will need to export the .xml file which contains your pages, posts, comments and file attachments.
NOTE 1: Your website theme will not be imported. You will need to install one anew.
You can do that in your Dashboard > Appearance > Themes > Add New. Almost all free wordpress.com themes can be found in this list, so you can have your old one back.
NOTE 2: Premium themes that are licensed for WordPress.com use only cannot be transferred to self-hosted WordPress.org sites. Some of them though can be transferred to a self-hosted site at no charge as part of a Guided Transfer. You will need to create a post in the premium theme forums if you’d like to know whether your theme qualifies.
NOTE 3: Your website header will not be imported either. You can reinstate it in Dashboard > Appearance > Customize > Header Image.
You can either upload the file anew or select it in Media Library.
To export the .xml file, do the following:
1. Log into your wordpress.com dashboard.
2. Go to Tools > Export > Free: Start Export > Download Export File:
NOTE: In some cases when 'All Content' is selected, it may miss some of the posts. In this case you can choose 'Posts' and select the needed period of time.
3. The file will be downloaded to your computer.
4. Now go to your WordPress website dashboard hosted with us (yourdomain.com/wp-admin). If you have not installed WordPress yet, follow this guide.
5. Go to Tools > Import, select WordPress:
6. Click on Install Now to proceed:
7. Once done, click on Activate Plugin & Run Importer:
8. Choose the file you exported and click on Upload file and import:
9. From the drop-down menu select the user you want to assign posts to.
NOTE: If you want to import the pictures, music, documents you uploaded to your blog, check the box Download and import file attachments.
Click on Submit:
10. Once done, get back to your home page and see your posts and comments imported.
11. Update the site name, remove the default post, adjust the menu bar, widgets and enjoy your website as before!
That's it!