Importing and Exporting Catalogs

CataBlog supports both importing and exporting database data for backup and automated catalog creation. These features rely on specifically formatted XML and CSV files.

To export your catalog you simply go to the CataBlog Options Panel and switch to the export tab. There you may click either the Save XML BackUp File or Save CSV BackUp File button to save a backup of your catalog data in the appropriate format. When you need to make lots of edits you may use these files as templates and then re-import the modified version, replacing your current data. Please note that your server will need to support the PHP function fputcsv() for CSV exports.

Importing a catalog can be a little more difficult, but it's still easy enough. First go to the CataBlog Options Panel and switch to the import tab. Once there you must select a XML or CSV file to upload. Make sure your file has the appropriate file extension (.xml or .csv) and that it matches the format displayed below. Once you have selected your upload file, you may choose to wipe the database and remove all data before running the import option by checking the Replace All Data checkbox. If you do not check replace all data then your imported catalog items will be appended to your current catalog. Please note that your server will need to support the SimpleXML PHP extension if you want to import data using XML format.

XML Format

<?xml version="1.0" encoding="UTF-8" ?>
<catablog_items date="2011-02-01" time="20:02:25">
    <title><![CDATA[Theo's Birthday]]></title>
    <description><![CDATA[blow out the "candles" buddy]]></description>
    <title><![CDATA[Theo's Baby Eyes]]></title>
    <description><![CDATA[isn't theo super "cute"]]></description>
    <title><![CDATA[Thumb Up]]></title>

CSV Format

10,theosbirthday-1296495847.jpg,,"Theo's Birthday","/a/relative/link","blow out the ""candles"" buddy","theo","",""
5,babyeyes-1296495877.jpg,,"Theo's Baby Eyes","","Isn't theo super cute","cute|theo",8.43,"product-code"
3,thumbsup-1296497019.jpg,a-subimage-1296495877.jpg,"Thumb Up","","","",500,"SKU#45561$3"

59 Responses to Importing and Exporting Catalogs

  1. Zach,
    I’m working on importing 580 records. I’ve imported the 580 images and rescanned the image folder. Then I tried importing the csv document, the first three records of which looks like this:
    1,7510-33.gif,,7510 33,,,BuggyBarn|Creamery
    2,7510-44.gif,,7510 44,,,BuggyBarn|Creamery
    3,7511-33.gif,,7511 33,,,BuggyBarn|Creamery
    (I also tried with 2 commas appended to each entry)
    Every time I get the following error message:
    Error: Item had no primary image name and could not be made.
    I also tried with fewer records. I’ve made sure that the image names in the csv file and the actual image names are the same.
    I’m stumped.

    WordPress 3.1.2
    mySQL 5
    Yeah, I’m still working on this.

    • Zach says:

      Hi Karelle,

      Since the CSV format changes a little from version to version when features changes, I would recommend exporting a new CSV file from CataBlog after you rescan your original images folder. Here are the steps:

      1. Upload all images and rescan the image folder, thus creating a catalog of 580 records.
      2. Export a CSV format file from CataBlog Options > Export
      3. Modify the Exported CSV file in an editor such as Excel, make sure not to change the image column. Copy and pasting or even just modifying your original CSV to match the exported one’s format also works here.
      4. Import the modified CSV file while also making sure to check the replace all data checkbox.

      That should do it. If you are going to be working with that large of a catalog I would recommend that you have a fairly decent web server (not cheap hosting) without database query limits or a million other users on the same server. Good luck and hope that clears up your issue.

  2. Francesco says:

    hi zach thanks a lot for this coool plugin!!!

    i’m trying to import a csv file but i’m new to this and i’ve this warning:

    ” Warning: array_combine() [function.array-combine]: Both parameters should have an equal number of elements in /phi/wp-content/plugins/catablog/lib/CataBlog.class.php on line 2307 ”
    and then in the result it says:
    “Error: Item had no primary image name and could not be made.”
    i would like to know what’s my stupid (i hope) error!
    thanks man

    • Francesco says:

      hi zach i’ve solved ! it was due to some character but i’ve solved now! thankssss

      • Zach says:

        Awesome, love it when that happens. If you have time could you please describe in detail exactly what characters you removed/changed to fix the problem. Cheers!

        • Francesco says:

          hi zach ,
          i used the word “character” but i meant some text i’ve wrongly copied with useless commas.
          i’m now playing with all the features and it’s very very cool man!!
          2 little questions if you have time:
          – can i fill the PRICE with words or does it accept only numbers?
          – is possible to modify the lenght of TITLE ? i’ve some long title but they’re cut during importing

          thanks again mate!

          • Zach says:

            Glad to hear you are enjoying CataBlog, let me answer your questions to the best of my ability.

            1: price must be a number, if you want to use words I would suggest using another field such as product code or putting the price directly into the item description. Just like PayPal or other shopping cart products, price must be a positive number.

            2: The title of the products should be limited to 255 characters. I can’t remember off the top of my head if this limitation is part of WordPress or just CataBlog. Perhaps you can put part of your title into the description, this field accepts HTML tags too, so you can format your description however you want.

  3. Theologos says:

    I get the same error and can’t fix it

    Error: Item had no primary image name and could not be made.

    My CSV looks like this:

    noimage.jpg,,"ΑΕΡΟΘΑΛΑΜΟΣ 400-8 KINGS",,,1,,,523-02-400,
    noimage.jpg,,"ΑΕΡΟΘΑΛΑΜΟΣ 300-10 KINGS",,,2,,,523-02-404,

  4. JoeMD says:

    Hey Zach,

    I’m wondering if the import function can be used to add data to Catablog from a different (eg Microsoft Exel) spreadsheet? I tried to do this using both XML and CSV files however I couldn’t get it to work.

    Am I doing something wrong or is this simply not an option?

  5. DMC says:

    Hi, I’m trying to import a .csv file but keep getting this error:

    The website encountered an error while retrieving It may be down for maintenance or configured incorrectly.

    The csv file is formatted correctly, but this is happening every time.
    Any help much appreciated.


  6. lydia says:

    unable to import a simple test file of only 3-4 records. what am i missing?

    it looked like i needed up upload the images first via Add New, and then run the Rescan of the original images folder. and then i followed your advice to discover the current CSV format of the day by exporting, and adjusted my CSV accordingly. but still when i try to upload the actual item data via CSV, i get the same “Error: Item had no primary image name and could not be made.” also tried making sure that the images had the same IDs (“order”) as their corresponding lines of the import file.

    my problem must be something simple? i had really hoped your elegant little plug-in would be the perfect solution for this project.


    • Zach says:

      What are you using as a CSV editor? Are you sure it is correctly formatting your CSV, you should have a column labeled image, preferably as the first column in your CSV file.

      CataBlog does not check if the file really exists, so you problem lies strictly with the CSV file itself. I cannot help much more without an example of the actual CSV file.

      • lydia says:

        hi zach,
        thanks so much for your response.

        the CSV is coming from a perl script, since i’m reading in the fields from another db export and writing them out in the order that CataBlog wants. …but your question does identify my problem, which was that somewhere along the way i stopped outputting a first row with column headers. so my test import now works.

        i notice, though, that my CSV file’s “order” field gets replaced by a default ordering on import — is there any way to hold onto the original db IDs as “order”, or should i just trust that the product-code is the only identifier i’ll really need anyway?


        • Zach says:

          I believe if you change your Perl script to order your CSV file into your desired order and then reimport the data into CataBlog you will have your order.

          Just a guess, but try it out.

          • lydia says:

            it retains the order, but not any numbers i attempt to specify as belonging in the ‘order’ field. but we have decided those IDs are not important for our purposes after all. thanks. 🙂

          • Zach says:

            I believe the latest version, CataBlog 1.4.1, should now use the order value from the CSV file. Also, the new version exports the catalog item’s id into the CSV file. This allows CataBlog to update catalog items upon the next import instead of appending or overwriting the existing catalog items.

  7. Opal says:

    I am currently using jigoshop plugin for a new wordpress site. But Jigoshop does not have import/export feature so that will be a pain to enter all items in the site one by one. I am curious with your plugin. Can we import all items into shop? Thank you.

    • Zach says:

      I don’t know anything about jigoshop so I can’t compare CataBlog to it, but I can say that CataBlog has an import / export feature. Simply create a few items and then export your catalog in either XML or CSV format to see how to format your import file. Good luck

  8. RAYMOND says:

    hi zach great plugin i,m using exel to creat my csv files which i,m importing into the catblog options but i can,t seem to get the price to display some help would b appreciated


    • Zach says:

      Hi Ray,

      I might try this, as Excel has so many options when it comes to CSV and this has always worked for me. Simply create a few catalog items in CataBlog with all fields filled out and then export a CSV file from the CataBlog Options. Open this newly exported file and modify it to match your needs, including price etc. Make sure price does not include any symbols or characters, just a decimal number. Now save your file, confirm that you might loss excel specific formatting, and upload your new CSV file to CataBlog.

      Good luck and let me know how it goes.

  9. Phillio says:

    This is a great plug in. I would ideally like to be able to include images in an import process. Perhaps whereby in the import file an http path is specified as the source of the image, and the plugin grabs the image from there. Any possibility of this, or any idea of the best kind of work around?

    • Zach says:

      You may upload your images on to your server at /wordpress/wp-content/uploads/catablog/originals/ and then make sure that the name of the image file is in your CSV or XML file for importing. I will most likely not be adding a feature to pull images from other websites, if you want to do that write a script on your computer to do it and then upload the images your script downloaded to your server and use CataBlog that way. Good luck.

  10. Arun says:

    It a great plugin. I am import list of 990 products, which do get imported. However when I scan the images, it hangs at showing “Processing Thumbnail Images…” and doesnt move forward. What could be possibly wrong? When I imported a test set of 2 images, it did work.

    • Zach says:

      Arun, are you sure you uploaded the 990 image files with matching names from your CSV to your web server. Those images should be copied into your /wp-content/uploads/catablog/originals/ folder.

  11. Clay says:

    I installed Catablog on my “Our Books” page and it worked nicely to display about ten books. Since I needed to duplicate the page on another blog, I exported the content to an XML file and imported it back into my wife’s “My Books” page, then manually uploaded the same book cover images. After some trial and error, it’s all there, but there’s a problem.

    Problem: The book cover images on the page display only a portion of the cover in a square frame, unlike the page which displays the full cover in a proportional frame. How can I get the cover images on the page to display the full cover in a proportional frame?

    Is this a function of the theme (I use StudioPress Genesis themes)? If so, I’m guessing I’ll need to know HTML or CSS to fix this problem (which I don’t…yet). Just point me in the right direction and I’ll figure it out from there. Thanks.

    • Zach says:

      Did you check the thumbnail tab in the CataBlog Options Admin Panel are the same in both installations? Also, after verifying they are the same, you should regenerate thumbnails in the systems tab of CataBlog Options Admin Panel.

      • Clay says:

        Thanks, Zach. “Keep Aspect Ratio” was unchecked, and all was put right when images were regenerated. Worked like a charm. Appreciate the assistance. Pressing on.

  12. Ruben says:

    Great plug in, Has helped me a lot so far.
    Is it possible to add multiple categories through the csv import? and also is there a way to upload a csv with new information that edits the already excisting items? Emptying the database everytime is not optimal

    • Zach says:

      To add to the database instead of overwriting it you should do this:

      1. Export your current database in CSV format
      2. Add your new rows to the bottom of the CSV file, making sure the id column is left empty in your new items.
      3. Import your edited CSV file making sure “Erase All Data” is not checked.

      • Ruben says:

        I knew of this way of adding but if I want to bulk change links or categories in already existing items. Is this possible with editting the old excel or should I add them as new items/edit them in catablog itself?

        • Zach says:

          If the row in the CVS file contains an id that matches a CataBlog item in your database then it should modify the exiting item instead of adding a new one.

          • Willem says:

            In my experience this (updating of existing items) is not working !

            I have exported my catablog library in order to update all items:
            – modifying catalog names
            – adjusting RRP prices
            – etc

            (I used Excel-VBA and the XML format – works great)
            (DON’T try using CSV if your items contain dots or other punctuation marks)

            The idea was to import all items with the modified information.
            Leaving my galleries intact.

            Unfortunately I could not achieve it – all items had new information (supplied by me) but also a new item-id (supplied by the import process)

            I presume this “replace option” caused the old items-id’s to be deleted.
            That in turn caused the old galleries to become empty
            (although the item-count still showed the old number of items
            in the gallery but with “edit” nothing showed up.
            After adding the ‘old’ items again and using the ‘save’ button
            the count was ok)

            Imported the (whole) library you have 2 options:

            1) Checking the “replace-all-data” option:
            all items are added to the library with a new item-id
            the old item-id is used to delete that old item-id

            2) Leaving the “replace-all-data” unchecked:
            All Items are added to the library leaving you with a copy of the original.
            Now only the new items have modified information and the galleries
            have to be adjusted: remove old items and add new items

            Last but not least:
            1 – pls add a ‘preview’ button to this comment-section
            2 – this entry-box can be enlarged but becomes hidden behind
            the column-width


  13. Ruben says:

    Nevermind found out how to seperate the categories. Second question remains

  14. raoul says:

    Hi there,

    is there a limit for how many entries I can upload. It says import is finished successfully but it only imports around 1200 of 8000 products. Anyway thanks for this great & free plugin.


    • raoul says:

      It’s not that bad I just need to do multiple uploads… just can’t find the reason

      • raoul says:

        Okay I have imported all items now but with so many entries the regenerate images function does not work anymore… it just returns an empty page. Any idea on how to solve this?

        • Zach says:

          Intereseting, I wonder if your database is timing out. I believe regenerate needs to fetch the id or image file title of each catalog item before it starts processing. So your database may be to slow to fetch 8000 names within its configured timeout, depends on your server / hosting solution.

    • Zach says:

      The upper limit is based on your database and web hosting provider. Basically the upper limit is the same as the number of WordPress posts you might have on a site…hundreds are pretty easy to support, thousands might require a VPN or dedicated server solution. On my local computer I have topped 10k catalog items.

      • Manuel says:

        Hello Zach, how are you? Sorry that I am replying through here but I know that you don’t want people submitting private e-mails to you. So I thought I would comment here and I hope you don’t mind.

        Your plugin is doing very well and it is a great plugin and as you know I am doing my best to help you with any questions people might make or request they might make. I was wondering if you could release a version that said it was compatible with WordPress 3.5. It would look great for the plugin.

        Thank you kindly for this great plugin.

        Kind regards

        • Zach says:

          Manuel, that is a very good idea. Right now I’m also playing with the idea of releasing a new feature for CataBlog. We will see, I am also super busy with other stuff.

          Look for a “3.5 Compatible” release sometime this week 🙂

          • Manuel says:

            Hi Zach, that is great news. I am sure everyone will be very happy with your new release. As always I will keep on supporting your blog and plugin forum with any questions and queries people might have.

            Looking forward to the release.

            Thank you kindly

  15. Jahaziel says:

    Hey Zach, when i do an export and import, does the import replace the template settings? i mean, i have created another domain with wordpress and i also installed catablog on the second domain so im trying to export my catablog items to the new domain but i have made some changes in the catalog template on the second domain. My question is if this import will erase the changes i have made in the template. Thanks

    • Zach says:

      The import should only create catalog items, it will not create galleries or change your templates. It also will not import any settings in the options panel.

      Please note that you will also have to copy over at the very least the original images for all your catalog items. You can also copy over the thumbnail and lightbox images if you are using the same resolutions. Otherwise the regenerate command in the system tab of options can recreate your thumbnail and lightbox images.

      • Jahaziel says:

        Thanks Zach, one last question: How can i change the permalink of each page because im using the permalink as the link for each item and it still has the link of the old site. Is there any way to automatically update these links by clicking a button or do i have to do it manually item per item?

        • Zach says:

          The permalink is automatically generated using a number of factors: your site’s domain, catablog’s permalink settings and the title of the catalog item. The permalink should be different from one site to another, at least the domain 🙂

          I would check the catablog permalink settings in options, make sure those are correct. Also make sure you are not using the default permalink structure in wordpress, catablog permalinks don’t work well with it.

          If you are talking about the link field for each catalog item, I would recommend editing the exported file and remove the link values before importing them. A csv file can be edited in Excel quite easily.

  16. Steve says:

    This may seem like a remarkably dumb questions but….do I have to upload the images first? If so, where should I put them and do I need to generate the thumbnails myself?

    I tried to just put the URL of the images I wanted in the csv file (stored on amazonaws) but the images didn’t upload when I uploaded the csv file.

    • Zach says:

      Yes, you need to upload the image first. You should upload the image in the “CataBlog Add” panel of your WordPress site’s admin section. All thumbnails will be auto generated to the specs of your CataBlog setting.

    • Zach says:

      Steve, if you want to do a CSV import, you should make sure the image column matches the file name of an image file in your wp-content/uploads/catablog/originals folder. You can auto generate your thumbnails with the regenerate command in the System tab of CataBlog Options.

    • Steve says:

      Worked perfectly…thanks!

  17. Stephen says:

    Hi Zack,
    We are getting acquainted with your great plug in. It appears that when we wish to bulk load multiple sub images via a .csv those sub image names need to be separated with a pipe ” | ” delimiter. The data that I am working with utilizes space delimited values for the image names. Is there an option to use a space delimiter rather than the pipe delimiter? Thanks in advance for your consideration.

  18. Ruben says:

    Great plug in so thanks. I uploaded items with a publish date set in the future, Will they automatically be published? And will this cause any possible problems furthermore?

    • Manuel says:

      Hello Ruben, the answer to your question is no there should be no problems with future published posts.

      This should not cause any problems.

      I hope this puts you at ease.

      Kind regards

  19. Hi Zach,
    I created some custom fields/tokens on the codes of the plugin. I exported and imported from this site to a new one and all the default fields transfered correctly but the ones i had created didn’t transfer the info inside them. I checked the XML and CSV files and this info is not there. So, my question is: Which file is the one in charge of exporting the data to the export CSV?

  20. Ruben says:


    I was wondering if it’s possible to edit the plugin to make it have more colums (and corresponding tokens) and if so if it’s doable.
    Also I’m looking for a way to transform the catablog pages into normal wordpress pages, any thoughts on that?

  21. fabio says:

    Hi Zach,
    Thanks for this plugin.
    I have some problem with special characters.
    Data are exported without managing special characters. So,for example, this character “à” is not exported correctly. The problem is that it’s not possible to re-import data.

    Another question, how it’s possible to modify permalink? I have two product with same name and the permalink has to be different.

    thank you

Leave a Reply

Your email address will not be published. Required fields are marked *

Please wrap any HTML markup or code with the pre-formatted tag: <pre> </pre>