Import wordpress attachment without download images

Import wordpress attachment without download images

Everybody knows how to use the wordpress import and export functionality. When you don’t want to download the wordpress post attachment (images, files) then you should follow my steps. Using following steps you are able to import all the attachment data without downloading the images.

Import wordpress attachment without download images

First Open your old wordpress installation and then go to wordpress panel. Then open your phpmyadmin of old wordpress installation and run following query.

update `wp_posts` set `post_type`='image' where `post_type`='attachment';
Import wordpress attachment without download images
Import wordpress attachment without download images

This query will create the image post type and attachments will become like post type. Then use the wordpress export and download exported xml.

 

Then open your new wordpress admin and click on import button and import the whole xml file.

You will see the you selected the download and import file attachments option but files are not downloaded.

Then through ftp client transfer all your image and files to new installation. Then open phpmyadmin of new wordpress panel and use following command.


update `wp_posts` set `post_type`='attachment' where `post_type`=image';

Now you are able to see the images in new wordpress panel and website.

Import wordpress attachment without download images
Import wordpress attachment without download images

Published by

Purab

I am Purab from India, Software development is my profession and teaching is my passion. Programmers blog dedicated to the JAVA, Python, PHP, DevOps and Opensource Frameworks. Purab's Github Repo Youtube Chanel Video Tutorials Connect to on LinkedIn

One thought on “Import wordpress attachment without download images”

Leave a Reply

Your email address will not be published.