Month: March 2016
I have been running this blog on a self-managed virtual host for a while (~2 years), then, two weeks ago, in order to save some money and lower the effort for the maintenance, I have decided to migrate it to wordpress.com where it is right now.
Theorically speaking wordpress provides various import / export tools (for many different sources), but I have immediately found an issue about the way media resources are restored. Well I have found two issues…
- I can’t say if it depends by a wrong configuration in my previous blob setup or because this is the supposed way to go, I have noticed that the images are linked with absolute URLs into the wordpress posts, and I have found no way to make them dynamic.
- Export “all contents” doesn’t export “all contents” despite that is what the import/export tool advertises on wordpress.
For issue 1 I have made some tests in order to identify the right absolute path to use, then I have applied the good old “search / replace” method in the exported xml file before uploading it to the new blog. It has been enough.
For issue 2 I had to make some more checks and I have found that it is required to explicitely select to export media files from the wordpress tool. Once you have exported them and imported them to the new blog, you will see wordpress.com grabbing all your media attachments from the old blog.
It took a couple of hours to get the point of both issues (and many attempts with their following manual cleanup, unfortunately there is no way to reset wordpress.com blob, or at least I haven’t found a way to do that withour cancelling the existing subscriptions on the blob itself – I have bought the domain mapping to yari.net…).
If you are facing any issue because the posts you have imported from your old wordpress blog to the new one are missing their shiny images, you must consider to proceed like below
- Check the absolute path your old posts use in order to link and load images, you have to look for HTML tags like <img title=”wp-1456610569051″ class=”alignnone size-full” alt=”image” src=”https://yaridotnet.files.wordpress.com/2016/02/wp-1456610569051.jpeg?w=768” originalw=”768″ scale=”2″> – That first path of the URL “https://yaridotnet.files.wordpress.com/” is what you’re going to use in order to fix your export XML file
- Export all your content from your old blog from the Tools / Exports area of wordpress administration dashboart.
- Made on the post of your old blog the same check you have done on point 1 and verify what’s the absolute URL your old blog uses
- Edit that exported XML file and replace the leading part of those URLs, e.g. mines were something like: (Everything up to the date has to be replaced)
- Upload your data again and you will be fine.
- Export from the old blog only the media (even if Tools / Export / All claims to export everything media won’t be loaded by the new blog, you need to proceed with an explicit media export / import)
- Import that second file into the new blog
- Have a look at the access log of your old wordpress blog (if you can) and you will see that after some times wordpress.com will start downlading your old media files to their new and right location.