• Resolved nubiesan

    (@nubiesan)


    Hi, I am building a clean version of my existing site since the old one is so full of excess “junk” that I can’t get rid of. My media library is unnecessarily huge and I would like to clean house.

    Is there a way to only import my new product images and not the old ones? Do I have to go in and manually detach the unused images from the product?

    Thanks for any suggestions

    The page I need help with: [log in to see the link]

Viewing 8 replies - 1 through 8 (of 8 total)
  • Yes, it is possible but you should explain the scenario better.

    Are the products you intend to show already online on the old website or they need to be created (or uploaded by a .csv file) in the new website?

    There are many ways you can achieve what you need, but we need to know the starting point.

    Thread Starter nubiesan

    (@nubiesan)

    The photos are already uploaded to the individual products on the original site. They are replacements for some old photos which I have taken out of the product gallery. They are still in the media library.

    The images are also on my hard drive, so I can upload them from there if it’s easier.

    Any advice on which way to proceed is appreciated

    Ok, then you simply need to export your existing products into a .csv file. The file will contain a column labeled “image” with the media url (the first one will be the featured and the others will be the gallery).

    Now you you have two paths:
    – the new website is using a different domain and/or path -> import the .csv to the new site wihile keeping the old website up and running, so the new site will create products and pull images from the old site.
    – the new website is using the same domain and path -> before you go online with the new website, move your old medias to a different path (e.g. wp-content/uploads/temp), then modify the .csv “image” column urls accordingly (since it’s a .csv it will be a quick find and replace matter, i.e. find wp-content/uploads/ and replace with wp-content/uploads/temp/ – remember to use the same number of slashes). At this point just import the .csv file, woocommerce will pull the right medias from the temporary folder. At the end of the process, you’ll have to just delete the /temp folder with all the medias inside (since woocommerce will recreate its standard path folders with the correct medias inside).

    I hope I’ve been clear, ask for any help.

    • This reply was modified 1 year, 4 months ago by techedge.
    Thread Starter nubiesan

    (@nubiesan)

    Thanks for the reply, but it still doesn’t work. I generate a csv file but when I try to import it to the new site, it says I don’t have permission to upload that file type. I am using the import/export function on the product page in woo commerce.

    Are there any specific columns I should export? Right now I am exporting sku, name, short description, description and images

    The import/export function is the right one. You should export what is relevant for you to transfer to the new site, since the products will be created with those properties.

    Permission error, however, is a different problem. Have you opened/modified the csv? Sometimes manipulating the file (with excel/calc especially) breaks its formatting and cause import errors. Use a text editor to open it (like Notepad++ or the standard Windows notepad).

    You could also quickly try to add

    define( 'ALLOW_UNFILTERED_UPLOADS', true );

    to wp-config.php and retry the upload. Just remember to delete the line after finishing.

    Try and let us know.

    Thread Starter nubiesan

    (@nubiesan)

    Still no luck since I am using a temporary domain and the certificates don’t match and it will not connect to the server.

    It looks like I will either have to migrate the site and manually clean out the garbage files or move the products individually.

    Thanks for the suggestions though

    Thread Starter nubiesan

    (@nubiesan)

    Success! I found an Import/Export Basic plugin by WebToffee and it did exactly what I wanted it to do.

    Thanks again for all the help and suggestions

    Hey, thank you for the tip on the plugin! I usually don’t experience problems with the standard Woocommerce functions, but it’s nice to know there is an alternative!

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Importing Selected Images with Product’ is closed to new replies.