create your own

Import HubPages Comments Into WordPress

78
rate or flag this page

By shibashake


WordPress logo from WordPress.org
WordPress logo from WordPress.org

Do you enjoy your HubPages comments?

If you want to move or delete a hub, but would like to keep your hard earned comments, here is a way for you to import your HubPages comments into a WordPress page.

This is also useful for keeping a backup copy of your valuable HubPages comments.


Get HubPages Comments

The easiest way to get your HubPages comments is to write a PHP script to process your HubPages article. This requires that you have access to a web server that can run PHP scripts.

If you do not have access to a web server, or do not want to muck around with PHP code, then you are welcome to use the sample PHP code that I have written to get your HubPages comments.

Note that this sample code works as of the writing of this hub - July 24th 2009. If HubPages administration decides to change the internal format of their hubs, this sample PHP code may no longer operate properly. If you drop me a comment, I will try to make the necessary upgrades, as time permits.

Visit my example HubPages comments to WordPress comments application. [This link will open up the application in a new window]

All you have to do is type in the HubPages URL that you want to retrieve your comments from. Note that the hub has to be published or my script will not be able to access it.

After you enter in your HubPages URL, hit the Submit button.

Screenshot of my example HubPages comments to WordPress comments application.
Screenshot of my example HubPages comments to WordPress comments application.

Save HubPages Comments Results

After pressing the Submit button, you will see some plain text appear on your browser. This is the visual result of the WordPress XML file generated by the application. All you have to do is save that file -

  1. Go to the file menu at the top of your browser.
  2. Select the Save As option in IE or the Save Page As option in Firefox.
  3. Enter in the filename you want to save your HubPages comments into. Make sure that you use a .xml file extension, i.e. filename.xml. For example, HPcomments.xml

This will save a copy of your HubPages comments to your local directory.

Internet Explorer Screenshot

Internet Explorer screenshot of the WordPress XML file generated.
Internet Explorer screenshot of the WordPress XML file generated.

Note that some browsers may try to interpret the results of the XML file and display those results. If that happens, what you will see will be a string of text similar to what is shown below.

Do not be alarmed.

Just follow the same Save Page As procedure outlined above and save the contents into an XML file.

Firefox Screenshot

Firefox screenshot of the WordPress XML file generated. Note that the browser tries to parse the XML content in this case.
Firefox screenshot of the WordPress XML file generated. Note that the browser tries to parse the XML content in this case.

WordPress

WordPress For Dummies WordPress For Dummies
Price: $12.33
List Price: $24.99
WordPress Bible WordPress Bible
Price: $29.81
List Price: $49.99
WordPress 24-Hour Trainer: Watch, Read, and Learn How to Create and Customize WordPress Sites (Book & DVD) WordPress 24-Hour Trainer: Watch, Read, and Learn How to Create and Customize WordPress Sites (Book & DVD)
Price: $23.95
List Price: $44.99
A Step by Step Wordpress Tutorial For Beginners A Step by Step Wordpress Tutorial For Beginners
Price: $17.95
List Price: $19.95

Importing Comments into WordPress

Next, log into your WordPress blog and go into your Dashboard. In the newer WordPress versions there should be a Tools Menu on your left sidebar (see above).Click on Tools then click on the Import option. Doing so will give you a list of different import formats to choose from.

Note - it is best if your hub title is not identical to any of your current WordPress pages. This will ensure that a new WordPress page is created to store all your newly imported HubPages comments. If there are any errors in the import process, you can simply delete the new WordPress page without any ill effects to your existing WordPress data.

To be on the safe side, you want to create a new, empty blog and only import the HubPages comment data into that empty blog in case there are any errors. Once you are happy with the results, you can re-import that information into the blog of your choice.

WordPress Screenshot

WordPress screenshot of the Import interface.
WordPress screenshot of the Import interface.

When you are ready to import your HubPages comments -

  1. Pick the WordPress format. This will redirect you to a screen to load your WordPress import file.
  2. Select the XML file that you just saved locally on your computer.
  3. When you are directed to 'assign an author', pick the author of the new comment page that you are importing (e.g. yourself). Click on Submit.
  4. After a while, WordPress should be done loading all your HubPages comments and you will get a screen showing you a summary of the import operation (below).

In the older WordPress versions, the import menu should be under the Manage tab.

WordPress screenshot of the import summary data.
WordPress screenshot of the import summary data.

Known Limitations

One important thing to note is that you will not be able to retrieve your comment status and comment IP address information with the process outlined here.

The comment status and IP information is only available if you are logged into your HubPages account. Since my server does not have your HubPages account information, it cannot extract that information.

If you want to preserve your comment status and IP address information, then it is best to execute the PHP script from your own server.

That's All Folks

You can now go into your newly created page and examine your imported HubPages comments.

If there are any errors, you can simply delete the new page that you created and drop me a comment to let me know what is not working.


Join HubPages and start making money with Google AdSense.

ShibaShake Blog

  • Your Wedding

    Your wedding is a very special and wondrous event that you will likely only experience once in your life. Therefore, it is only right that you make it everything that you always imagined it to be. If... - 3 months ago

  • The Women of HubPages

    One of the first things you will notice on HubPages land is that there are many talented and wonderful women authors. We will start our journey with them … The Hub Sisterhood is a collection... - 3 months ago

RSS for comments on this Hub

dohn121 profile image

dohn121  says:
7 months ago

Thank you for the advice. Hopefully I won't have to un-publish too many hubs in the future.

Am I dead, yet?  says:
7 months ago

Thanks again, Shiba! This was helpful! Bigtime -hugs-

shibashake profile image

shibashake  says:
7 months ago

@dohn121 - :) Just keep a copy of the HTML file anyway. Always good to have a backup.

@AIDY - Glad I could help. >HUGS BACK

Mardi profile image

Mardi  says:
7 months ago

Thanks shibashake, great information. I find WordPress a bit more challenging than HubPages so this will definitely help out.

shibashake profile image

shibashake  says:
7 months ago

Thanks Mardi. Let me know if you run into any problems :) I'm just starting to learn WordPress as well. It is a fun system.

Submit a Comment
Members and Guests

Sign in or sign up and post using a hubpages account.


optional


  • No HTML is allowed in comments, but URLs will be hyperlinked
  • Comments are not for promoting your hubs or other sites

WordPress in the News

  • WordPress To Posterous Users: Graduate to a Full BlogMashable6 hours ago

    In an effort to remind you that WordPress can be just as flexible and e-mail-friendly as Posterous , the company has released a Posterous importer for users who want to “graduate” from the mini-blogging site to “a full blog with the features, flexibility and reliability of WordPress.com.” The new WordPress.com utility can be found via the Tools section within the Dashboard. All that’s required ...

  • Just another WordPress weblogCameroon-Tribune24 hours ago

    Welcome to WordPress. This is your first post. Edit or delete it, then start blogging!

  • Wordpress for Android - A Blogger's Dream AppLinux Today4 days ago

    2 live 2 blog: "Android devices will now allow users to post articles on their Wordpress blogs through the newly released Wordpress for Android app."

working